CS FundamentalsVery hardGATE CS

Processes (arrival, burst): P1 (0, 12), P2 (2, 4), P3 (3, 6), P4 (8, 5), P5 (10, 2). Under SRTF, which process waits the longest, and for how long?

  1. A. P1, 17 ms
  2. B. P3, 20 ms
  3. C. P3, 3 ms
  4. D. P1, 29 ms

Correct answer: A. P1, 17 ms

SRTF: P1 0-2 | P2 2-6 | P3 6-12 | P5 12-14 | P4 14-19 | P1 19-29. Waiting times: P1 17, P2 0, P3 3, P4 6, P5 2. The long job P1 keeps being overtaken by shorter arrivals.

More Operating Systems questions

Exams that ask this topic