CS FundamentalsHardGATE
Processes (arrival, burst) in ms: P1 (arrival 0, burst 6), P2 (arrival 1, burst 8), P3 (arrival 2, burst 7), P4 (arrival 3, 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?
- A. 6.25 ms and 11.25 ms
- B. 6.25 ms and 12.25 ms
- C. 8.75 ms and 14.75 ms
- D. 7.25 ms and 12.25 ms
Correct answer: B. 6.25 ms and 12.25 ms
Simulating SRTF tick by tick gives completion times P1 6, P4 9, P3 16, P2 24; waiting = turnaround − burst, averaging to 6.25 ms waiting and 12.25 ms turnaround. Running the same processes strictly in arrival order (FCFS) instead gives 8.75 ms waiting, the result of ignoring preemption.
More Operating Systems questions
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 6), P2 (arrival 1, burst 8), P3 (arrival 2, burst 7), P4 (arrival 3, burst 3)…
- Processes (arrival, burst, priority — a smaller number means higher priority): P1 (arrival 0, burst 6, priority 4), P2 (arrival 1, burst…
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 6), P2 (arrival 1, burst 8), P3 (arrival 2, burst 7), P4 (arrival 3, burst 3). They…
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 6), P2 (arrival 1, burst 8), P3 (arrival 2, burst 7), P4 (arrival 3, burst 3)…
- 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…
- 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…