CS FundamentalsModerateGATE CS

Five processes arrive with burst times: P1 (arrival 0, burst 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (4, 2). Under preemptive SJF (SRTF), the average waiting time is:

  1. A. 8.2 ms
  2. B. 11.4 ms
  3. C. 6.6 ms
  4. D. 5.4 ms

Correct answer: C. 6.6 ms

The schedule is P1(0-1), P2(1-5), P5(5-7), P4(7-12), P1(12-19), P3(19-28). Completion times 19, 5, 28, 12, 7 give waiting times 11, 0, 17, 4, 1, average 33/5 = 6.6 ms. 11.4 is FCFS and 8.2 is non-preemptive SJF.

More Operating Systems questions

Exams that ask this topic