CS FundamentalsVery hardProduct-company MCQ pattern

Processes (arrival, burst) in ms: P1 (arrival 0, burst 5), P2 (arrival 2, burst 2), P3 (arrival 4, burst 9), P4 (arrival 5, burst 4), P5 (arrival 8, burst 3). They are scheduled by preemptive Shortest Remaining Time First (SRTF); ties go to the process that arrived earlier. What are the average waiting time and the average turnaround time?

  1. A. 3.4 ms and 8 ms
  2. B. 5.8 ms and 10.4 ms
  3. C. 4.4 ms and 8 ms
  4. D. 3.4 ms and 7 ms

Correct answer: A. 3.4 ms and 8 ms

Simulating SRTF tick by tick gives completion times P2 4, P1 7, P4 11, P5 14, P3 23; waiting = turnaround − burst, averaging to 3.4 ms waiting and 8 ms turnaround. Running the same processes strictly in arrival order (FCFS) instead gives 5.8 ms waiting, the result of ignoring preemption.

More Operating Systems questions

Exams that ask this topic