CS FundamentalsVery hardProduct-company MCQ pattern
Processes (arrival, burst) in ms: P1 (arrival 0, burst 7), P2 (arrival 2, burst 2), P3 (arrival 2, burst 4), P4 (arrival 5, burst 8). 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. 4 ms and 9.25 ms
- B. 5 ms and 10.25 ms
- C. 5 ms and 9.25 ms
- D. 4 ms and 8.25 ms
Correct answer: A. 4 ms and 9.25 ms
Simulating SRTF tick by tick gives completion times P2 4, P3 8, P1 13, P4 21; waiting = turnaround − burst, averaging to 4 ms waiting and 9.25 ms turnaround. Running the same processes strictly in arrival order (FCFS) instead gives 5 ms waiting, the result of ignoring preemption.
More Operating Systems questions
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 7), P2 (arrival 2, burst 2), P3 (arrival 2, burst 4), P4 (arrival 5, burst 8)…
- Processes (arrival, burst, priority — a smaller number means higher priority): P1 (arrival 0, burst 7, priority 1), P2 (arrival 2, burst…
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 7), P2 (arrival 2, burst 2), P3 (arrival 2, burst 4), P4 (arrival 5, burst 8). They…
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 4), P2 (arrival 2, burst 6), P3 (arrival 4, burst 2), P4 (arrival 7, burst 8). They…
- Processes (arrival, burst) in ms: P1 (arrival 0, burst 4), P2 (arrival 2, burst 6), P3 (arrival 4, burst 2), P4 (arrival 7, burst 8)…
- Processes (arrival, burst, priority — a smaller number means higher priority): P1 (arrival 0, burst 4, priority 1), P2 (arrival 2, burst…