Processes P1, P2 and P3 all arrive at time 0 with CPU burst times of 10, 4 and 2 ms and are served FCFS in the order P1, P2, P3. What is the average waiting time?
Correct answer D. 8 ms
Under FCFS, P1 runs 0-10, P2 runs 10-14 and P3 runs 14-16, so the waiting times are 0, 10 and 14 ms, giving (0 + 10 + 14) / 3 = 8 ms. The value 13.33 ms is the average turnaround time, not waiting time. Because the long job went first, the short ones waited behind it, which is the convoy effect that makes FCFS averages poor.
Answer checked How we write and check questions
Discussion