Four processes arrive at time 0 with burst times P1 = 6, P2 = 2, P3 = 4, P4 = 3 ms and priorities 3, 1, 4, 2, where a smaller number means higher priority. What is the average waiting time under non-preemptive priority scheduling?
Correct answer D. 4.5 ms
The order by priority is P2 (0-2), P4 (2-5), P1 (5-11) and P3 (11-15). Waiting times are P1 5, P2 0, P3 11 and P4 2 ms, a total of 18, so the average is 4.5 ms. The value 8.25 ms is the average turnaround time. Priority scheduling ignores burst length, so a long high-priority job can delay short low-priority ones.
Answer checked How we write and check questions
Discussion