The GATE Grind

GATE 2014 CS (CS1) – Question 42

Operating System · CPU and I/O Scheduling · 2 marks · Numerical answer

Single-CPU processes A,B,C,D,E have (arrival,execution) times in ms: A(0,6), B(3,2), C(5,4), D(7,6), E(10,3). Find average turnaround time under shortest-remaining-time-first scheduling (ms).

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 7.2 to 7.2

Explanation

The schedule is A0–3,B3–5,A5–8,C8–12,E12–15,D15–21. Completion times for A,B,C,D,E are8,5,12,21,15. Subtract arrivals0,3,5,7,10 to get8,2,7,14,5ms; their average is36/5=**7.2ms**.