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