Practice free →
HomeGATE CSEcomputerscienceOperating Systems › The SHORTEST JOB FIRST (SJF) scheduler addresses…

The SHORTEST JOB FIRST (SJF) scheduler addresses the convoy effect by

Arunning the longest remaining job first
Bround-robining with a 1-tick quantum
Cpreempting at every clock interrupt
Drunning the shortest available job first
Answer & Solution
Correct answer: D. running the shortest available job first
1. OSTEP §7.4 introduces SJF: of all jobs that have arrived, run the one with the smallest run time first; non-preemptive. 2. SJF is PROVABLY OPTIMAL for minimising average turnaround when all jobs arrive at the same time. 3. Example: jobs (A,B,C) = (100,10,10) arriving at t=0. SJF runs B (10), C (20), A (120). Average = (10+20+120)/3 = 50, much better than FIFO's 110. 4. Option A is the opposite (worst-case scheduling). Option B is round-robin. Option D is timer-driven preemption (RR-style), not SJF. _Source: OSTEP Ch 7, §7.4 (Shortest Job First), p. 4-5._
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions