CS FundamentalsHardGATE CS

Processes (arrival, burst) are P1 (0, 8), P2 (1, 4), P3 (2, 9), P4 (3, 5) and P5 (6, 2). What is the average waiting time under preemptive Shortest Remaining Time First?

  1. A. 7.8
  2. B. 6.4
  3. C. 11.0
  4. D. 12.0

Correct answer: B. 6.4

Timeline: P1 0–1, P2 1–5, P4 5–6, P5 6–8 (it preempts P4, which has 4 left), P4 8–12, P1 12–19, P3 19–28. Waiting = 11, 0, 17, 4, 0, so 32/5 = 6.4. 7.8 is non-preemptive SJF, 11.0 is FCFS, and 12.0 is SRTF's average turnaround.

More Operating Systems questions

Exams that ask this topic