CS FundamentalsVery hardGATE CS

Processes (arrival, burst): P1 (0, 3), P2 (2, 6), P3 (4, 4), P4 (6, 5), P5 (8, 2). Under non-preemptive Highest Response Ratio Next (response ratio = (waiting + burst) / burst), in what order do the processes run?

  1. A. P1 → P2 → P5 → P3 → P4
  2. B. P1 → P2 → P3 → P5 → P4
  3. C. P1 → P2 → P3 → P4 → P5
  4. D. P1 → P2 → P5 → P4 → P3

Correct answer: B. P1 → P2 → P3 → P5 → P4

Schedule: P1 0-3 | P2 3-9 | P3 9-13 | P5 13-15 | P4 15-20. At each decision point compute (W + S)/S for every waiting process; e.g. at time 9 P3 has (5+4)/4 = 2.25, P4 (3+5)/5 = 1.6, P5 (1+2)/2 = 1.5, so P3 runs. Pure SJF would instead give P1 → P2 → P5 → P3 → P4.

More Operating Systems questions

Exams that ask this topic