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._
Keep practising Operating Systems
Browse all Operating Systems questions for GATE CSE, or explore more Computer Science topics.
Related questions
On a MULTI-CORE system, a SPIN LOCK is generallyA LIVELOCK differs from a DEADLOCK in thatSuppose thread A acquires lock L1, then thread B acquires lock L2. Now A tries to acquire A CRITICAL SECTION isA LOCK is considered FAIR ifA LOCK (mutex) is used by concurrent threads toWhich of the following is NOT typically minimised by a CPU scheduler?The PRIMARY DISADVANTAGE of FIFO scheduling is