Processes P1, P2 and P3 arrive at time 0 in that order with burst times 10, 5 and 8 ms. Using round robin with a time quantum of 4 ms, what is the average waiting time?
Correct answer D. 12.67 ms
The Gantt chart is P1 0-4, P2 4-8, P3 8-12, P1 12-16, P2 16-17, P3 17-21, P1 21-23. Completion times are P1 23, P2 17, P3 21, so waiting times (completion minus burst, since all arrive at 0) are 13, 12 and 13 ms, averaging 38 / 3, about 12.67 ms. The value 20.33 ms is the average turnaround time.
Answer checked How we write and check questions
Discussion