All mock tests are FREE till 31 December — register to save your progress

Directions (Q96–100): Consider the following set of processes with arrival time and CPU burst time given in milliseconds (ms):

ProcessArrival TimeBurst Time
P105
P223
P322
P453
P561

What is the average waiting time for these processes with non-preemptive Shortest Job First (SJF) scheduling?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. 3.2 ms

Explanation

P1 0–5. At 5: P3 (2) is shortest → 5–7. At 7: P5 (1) → 7–8. Then P2 (3, arrived earlier than P4) 8–11, P4 11–14. Waiting: P1 0, P2 6, P3 3, P4 6, P5 1. Average = 16/5 = 3.2 ms.

More System Software and Operating System questions