CS FundamentalsHardGATE CS (PYQ pattern)

SRTF (preemptive shortest remaining time first; ties go to the earlier arrival) is used for processes (arrival, burst) in ms: P1 (0, 9), P2 (1, 4), P3 (2, 2), P4 (4, 6), P5 (5, 3), P6 (7, 1). What is the average waiting time?

  1. A. 8.83 ms
  2. B. 5.17 ms
  3. C. 4.67 ms
  4. D. 4.17 ms

Correct answer: C. 4.67 ms

Completion times {'P3': 4, 'P2': 7, 'P6': 8, 'P5': 11, 'P4': 17, 'P1': 25}. Waiting = completion - arrival - burst, summed and divided by 6 gives 4.67 ms (the average turnaround would be 8.83).

More Operating Systems questions

Exams that ask this topic