All mock tests are FREE till 31 December — register to save your progress

Given the following processes with their burst times and priorities (lower number indicates higher priority), all arriving at time 0, what is the average waiting time using the (non-preemptive) priority scheduling algorithm?
ProcessBurst TimePriority
P1103
P211
P324
P415
P552

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. 8.2

Explanation

Order by priority: P2 (0–1), P5 (1–6), P1 (6–16), P3 (16–18), P4 (18–19). Waiting times: P2 = 0, P5 = 1, P1 = 6, P3 = 16, P4 = 18. Average = 41/5 = 8.2.

More System Software and Operating System questions