Consider three processes: P0 (arrival 0 ms, burst 7 ms), P1 (arrival 1 ms, burst 3 ms), P2 (arrival 2 ms, burst 7 ms). Pre-emptive shortest job first scheduling is used, and scheduling happens only at arrival or completion of a process. What is the average waiting time?

Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. 3.67 ms
Explanation
P0 runs 0–1; P1 (3) preempts and runs 1–4; then P0 (6 left) runs 4–10; P2 runs 10–17. Waiting: P0 = 10 − 7 = 3, P1 = 0, P2 = 17 − 2 − 7 = 8. Average 11/3 ≈ 3.67 ms.
More System Software and Operating System questions
- Match List I with List II. List I: A. RAID level 2, B. RAID level 4, C. RAID level 5, D. RAID level 3. List II: I. Bit-interleaved parity,…
- Match List I with List II. List I: A. Critical region, B. Wait/signal, C. Working set, D. Deadlock. List II: I. Hoare's monitor, II. Mutual…
- Consider a disk system with cylinders. The request to access the cylinders occurs in the following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6…
- How many page faults will be encountered?
- What is fault ratio of row major to column major arrangements ?
- What is the main memory hit ratio?