Practice free →
HomeGATE CSEcomputerscienceOperating Systems › When jobs arrive at DIFFERENT times, non-preempt…

When jobs arrive at DIFFERENT times, non-preemptive SJF can still suffer from a long job running before a short one arrives. The PREEMPTIVE version that addresses this is

AFIFO with priority
BShortest Time-to-Completion First (STCF)
CRound-Robin with priority boost
DMulti-Level Feedback Queue (MLFQ)
Answer & Solution
Correct answer: B. Shortest Time-to-Completion First (STCF)
1. OSTEP §7.5 introduces STCF: every time a NEW job arrives, the scheduler checks if its remaining time is less than the currently-running job's remaining time. If so, it PREEMPTS and runs the new (shorter) job. 2. STCF is also called Preemptive Shortest Job First (PSJF) or Shortest Remaining Time to Completion First. 3. STCF is PROVABLY OPTIMAL for minimising average turnaround in the general case (variable arrival times) — assuming you know job lengths. 4. Option A is wrong policy. Option C describes MLFQ. Option D is a different multi-queue strategy. _Source: OSTEP Ch 7, §7.5 (Shortest Time-to-Completion First), p. 5-6._
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions