- Year not given
Preemptive vs non-preemptive; process states
Short answer
Preemptive scheduling lets the OS forcibly remove the CPU, while non-preemptive leaves a process running until it yields. A process is a program in execution; its states are New, Ready, Running, Blocked/Waiting, and Terminated.
Differentiate between preemptive and non-preemptive scheduling. Define process and explain its possible states.
Preemptive vs non-preemptive scheduling
In non-preemptive scheduling a process keeps the CPU until it finishes or blocks; the OS cannot take it away. In preemptive scheduling the OS may remove a running process from the CPU, for instance when its quantum expires or a higher priority process arrives.
| Basis | Preemptive | Non-preemptive |
|---|---|---|
| CPU release | Forced by OS | Voluntary (end or wait) |
| Response time | Good, suits interactive/real-time | Poor for short jobs behind long ones |
| Context switches | More overhead | Fewer |
| Synchronization | Needed for shared data | Simpler |
| Fairness | Better | Convoy effect possible |
| Examples | Round robin, SRTF, preemptive priority | FCFS, SJF, non-preemptive priority |
Process and its states
A process is a program in execution, including the program counter, registers, stack, data and resources.
Possible states (five-state model):
- New: the process is being created.
- Ready: waiting in memory for the CPU.
- Running: instructions are being executed.
- Blocked/Waiting: waiting for an event such as I/O completion.
- Terminated: execution has finished.
New --admit--> Ready --dispatch--> Running --exit--> Terminated
^ <---timeout---- |
| | wait for event
+---- Blocked <------+
(event occurs)
Further states exist in systems with swapping: suspended ready and suspended blocked, when the process is moved from memory to disk.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Preemptive vs non-preemptive; real-time scheduling · Operating System, chapter 2
- Process states and process hierarchy · Operating System, chapter 2
- RR, preemptive priority, preemptive SJF · Operating System, chapter 2
- Preemptive priority and SRTF Gantt · Operating System, chapter 2
- Non-preemptive priority scheduling (10, 5, 7 ms) · Embedded System, chapter 6 · asked 2×
- Non-preemptive SJF with P4 arriving · Embedded System, chapter 6 · asked 2×
- Preemptive priority scheduling with P4 (6 ms) · Embedded System, chapter 6 · asked 2×
- Preemptive priority scheduling (4, 10, 5 ms) · Embedded System, chapter 6 · asked 2×