CS FundamentalsHardGATE CS · Advanced

Five processes (arrival time, CPU burst) are: P1 (1, 8), P2 (4, 1), P3 (0, 3), P4 (7, 6), P5 (5, 1). With preemptive shortest-remaining-time-first scheduling (ties go to the earlier arrival, then the lower process number), what is the average waiting time, where waiting time is turnaround minus burst?

  1. A. 8.2
  2. B. 4.4
  3. C. 3.0
  4. D. 2.0

Correct answer: D. 2.0

Simulate unit by unit, always running the ready process with least remaining time; waiting time = completion - arrival - burst. The non-preemptive SJF average is 4.4.

More Operating Systems questions

Exams that ask this topic