CS FundamentalsVery hardProduct-company MCQ pattern
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 (arrival 8, burst 2). 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.8 ms and 9.6 ms
- B. 7 ms and 11.8 ms
- C. 5.8 ms and 9.6 ms
- D. 4.8 ms and 8.6 ms
Correct answer: A. 4.8 ms and 9.6 ms
Simulating SRTF tick by tick gives completion times P2 6, P3 10, P5 12, P1 17, P4 24; waiting = turnaround − burst, averaging to 4.8 ms waiting and 9.6 ms turnaround. Running the same processes strictly in arrival order (FCFS) instead gives 7 ms waiting, the result of ignoring preemption.
More Operating Systems questions
- 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, priority — a smaller number means higher priority): P1 (arrival 0, burst 8, priority 2), P2 (arrival 3, burst…
- 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…
- Reference string: 1, 4, 1, 6, 2, 3, 6, 1, 2, 4, 3, 6, 4. With 4 frames, initially empty, how many page faults do FIFO, LRU and Optimal…
- Reference string: 1, 4, 1, 6, 2, 3, 6, 1, 2, 4, 3, 6, 4. With 3 frames, initially empty, how many page faults does FIFO replacement cause?
- Reference string: 8, 2, 9, 2, 4, 8, 9, 4, 2, 8, 4, 9, 2. With 3 frames, initially empty, how many page faults do FIFO, LRU and Optimal…