CS FundamentalsVery hardGATE CS

Preemptive priority scheduling (smaller number = higher priority; equal priority is FCFS and does not preempt). Processes (arrival, burst, priority): A (0, 4, 2), B (1, 2, 1), C (2, 3, 3), D (3, 5, 1), E (5, 1, 0). What is the average waiting time?

  1. A. 3.6 ms
  2. B. 6.8 ms
  3. C. 3.8 ms
  4. D. 4.4 ms

Correct answer: C. 3.8 ms

Schedule: A 0-1 | B 1-3 | D 3-5 | E 5-6 | D 6-9 | A 9-12 | C 12-15. E (priority 0) preempts D at 5, and the lower-priority A and C wait until D finishes. Average waiting = 3.8 ms; non-preemptive gives 3.6.

More Operating Systems questions

Exams that ask this topic