CS FundamentalsHardGATE CS · Amazon/Microsoft SDE MCQ

Preemptive priority scheduling (smaller number = higher priority; a running process is not preempted by an equal priority). Processes (arrival, burst, priority): P1 (0, 5, 3), P2 (1, 3, 1), P3 (2, 4, 2), P4 (4, 2, 1), P5 (6, 3, 0). What is the average waiting time?

  1. A. 3.2
  2. B. 3.8
  3. C. 4.6
  4. D. 2.4

Correct answer: B. 3.8

P1 0-1, P2 1-4 (P4 arrives at 4 with equal priority but P2 is done), P4 4-6, P5 6-9, P3 9-13, P1 13-17. Waiting: P1 12, P2 0, P3 7, P4 0, P5 0, total 19, average 3.8.

More Operating Systems questions

Exams that ask this topic