Practice mode Operating Systems

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

Explanation

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.