Which of the following scheduling algorithms may cause starvation ? a.…
2017
Which of the following scheduling algorithms may cause starvation ?
a. First-come-first-served
b. Round Robin
c. Priority
d. Shortest process next
e. Shortest remaining time first
- A.
a, c and e
- B.
c, d and e
- C.
b, d and e
- D.
b, c and d
Attempted by 350 students.
Show answer & explanation
Correct answer: B
Concept. Starvation (indefinite postponement) occurs when a scheduling policy lets the choice of who runs next depend on an attribute a process can keep losing on forever — priority or remaining/burst length — so a stream of "more deserving" arrivals can hold a waiting process off the CPU indefinitely. A policy is starvation-free only if every ready process is guaranteed CPU access within a bounded waiting time, independent of the other processes' attributes.
Apply the test to each algorithm:
Priority — can starve. Selection depends on priority. A continuous stream of higher-priority arrivals can postpone a low-priority process forever; its wait is not bounded.
Shortest process next (non-preemptive SJF) — can starve. Selection depends on burst length. If short jobs keep arriving, a long job is never chosen; its wait is unbounded.
Shortest remaining time first (preemptive SJF) — can starve. Selection depends on remaining time, and it preempts. A long job is repeatedly displaced by shorter arrivals and may never finish.
First-come-first-served — cannot starve. Selection depends only on arrival order, which never changes once a process has arrived; every process eventually reaches the front of the queue.
Round Robin — cannot starve. Each ready process is served cyclically for one time quantum, so any process waits at most (n - 1) quanta before it runs again — a bounded wait, independent of other processes' priority or length.
Result. The algorithms whose selection criterion a process can keep losing on are Priority, Shortest process next, and Shortest remaining time first — i.e. c, d and e.
Cross-check. This is also why the cure for starvation is aging — periodically raising a waiting process's effective priority so its wait becomes bounded — which is needed precisely for these three starvation-prone policies and not for FCFS or Round Robin.
A video solution is available for this question — log in and enroll to watch it.