CS FundamentalsHardGATE CS

Processes (arrival, burst) in ms: P1 (0, 10), P2 (1, 6), P3 (3, 2), P4 (5, 4), P5 (6, 1). Under preemptive SJF (SRTF), what is the average waiting time? (Ties in remaining time go to the process that arrived earlier.)

  1. A. 4.2 ms
  2. B. 7.2 ms
  3. C. 10.2 ms
  4. D. 8.4 ms

Correct answer: A. 4.2 ms

SRTF schedule: P1 0-1 | P2 1-3 | P3 3-5 | P2 5-6 | P5 6-7 | P2 7-10 | P4 10-14 | P1 14-23. Waiting = turnaround - burst for each process; the average is 4.2 ms. The trap values are non-preemptive SJF (7.2), FCFS (10.2) and RR q=2 (8.4).

More Operating Systems questions

Exams that ask this topic