2-Mark Questions and Answers — Process & CPU Scheduling
1. Define a process. List the components that are included in a process.

A process is a program in execution. A process contains program counter, stack, data section, text section, and heap. The program counter specifies the next instruction to execute.

2. List the five states in the life cycle of a process.

The five process states are New, Ready, Running, Waiting, and Terminated. A process moves between these states during its execution.

3. Draw and label the process state transition diagram.

admitted

+----------------------+ | ↓ NEW → READY → RUNNING → TERMINATED ↑ | | | I/O done | I/O request | ↓ +---- WAITING

The main transitions are New → Ready → Running → Terminated, while a running process may move to Waiting for an I/O operation and return to Ready after I/O completion.

4. List any four fields present in a Process Control Block (PCB).

Any four fields of a Process Control Block (PCB) are process state, program counter, CPU registers, and CPU scheduling information. The PCB stores the information required by the OS to manage a process.

5. What is a parent process and a child process? State the significance of the Process Identifier (PID).

A parent process is a process that creates another process, while the newly created process is called a child process. The PID provides a unique identification number for each process and is used to access its attributes in the kernel.

6. State any two reasons why a parent process may terminate one of its child processes.

A parent may terminate a child process when the child has exceeded its allocated resources or when the task assigned to the child is no longer required.

7. Differentiate Symmetric Multiprocessing from Asymmetric Multiprocessing.
Symmetric Multiprocessing (SMP) Asymmetric Multiprocessing
All processors are peers. One processor acts as the boss processor.
Each processor can perform OS tasks. The boss processor controls and assigns work to other processors.
There is no boss-worker relationship. There is a boss-worker relationship.
8. Define concurrent processing. Name any two environments in which concurrency occurs.

Concurrent processing means multiple processes or tasks can make progress at the same time. It occurs in multiprocessor systems and distributed processing environments.

9. Explain the CPU–I/O burst cycle in process execution.

In the CPU–I/O burst cycle, a process alternates between CPU execution and I/O waiting. Execution begins with a CPU burst, followed by an I/O burst, and this continues until the final CPU burst completes the process.

10. Distinguish between preemptive and non-preemptive CPU scheduling.
Preemptive Scheduling Non-Preemptive Scheduling
A running process can be forced to release the CPU. A process keeps the CPU until it terminates or enters waiting state.
Scheduling can occur when a process moves from running to ready or waiting to ready. Scheduling occurs when a process moves from running to waiting or terminates.
Example: higher-priority process can interrupt the current process. Example: the current process continues until it voluntarily releases the CPU.
11. What is a dispatcher? Define dispatch latency.

A dispatcher is the OS module that gives CPU control to the process selected by the short-term scheduler. Dispatch latency is the time taken by the dispatcher to stop one process and start another process.

12. List any four scheduling criteria used to compare CPU scheduling algorithms.

Four scheduling criteria are:

CPU Utilization

Throughput

Turnaround Time

Waiting Time

Response Time is another important criterion.

13. Define turnaround time and waiting time.

Turnaround time is the total time from the submission of a process until its completion. Waiting time is the amount of time a process spends waiting in the ready queue.

14. What is meant by the convoy effect in FCFS scheduling?

The convoy effect occurs in FCFS scheduling when a long process gets the CPU first and makes many shorter processes wait behind it. This can result in lower CPU and device utilization.

15. Differentiate the preemptive and non-preemptive versions of SJF scheduling.
Non-Preemptive SJF Preemptive SJF
The process with the shortest CPU burst is selected. The process with the shortest remaining CPU time is selected.
Once started, the process continues until its CPU burst finishes. A running process can be preempted if a new shorter process arrives.
It does not interrupt the current process. It is also called Shortest Remaining Time First (SRTF).

The file specifically illustrates preemptive SJF where a newly arriving shorter process preempts the current process.

16. What is starvation in priority scheduling, and how is it resolved?

Starvation occurs when a low-priority process waits for a very long time because higher-priority processes continue to execute. It is resolved using aging, where the priority of the waiting process is gradually increased.

17. Define time quantum in Round Robin scheduling and state the effect of choosing it too large or too small.

Time quantum is the fixed amount of CPU time given to each process in Round Robin scheduling. If it is too large, Round Robin behaves like FCFS; if it is too small, there will be more context switching and overhead. The notes describe Round Robin as giving each user's work a specific amount of time before moving to the next job.

18. What is a multilevel queue scheduling algorithm?

A multilevel queue scheduling algorithm divides processes into different queues based on their type or characteristics. For example, queues may contain system processes, interactive processes, batch processes, and student processes.

19. List any four parameters that define a multilevel feedback queue scheduler.

The parameters include:

1. Number of queues

2. Scheduling algorithm for each queue

3. Method to determine when to upgrade a process

4. Method to determine when to demote a process

5. Method to determine which queue a process enters when it needs service.

20. Differentiate hard real-time scheduling from soft real-time scheduling.
Hard Real-Time Soft Real-Time
Has strict time constraints. Does not require strictly bounded delays.
Critical tasks must be completed on time. Critical real-time tasks are given higher priority.
Has bounded delay for input, execution, and output. Missing a deadline is possible.
Used for critical applications. Useful in multimedia, virtual reality, and similar applications.