CS FundamentalsVery hardIBM · Deloitte pattern
Processes (arrival, burst, priority — a smaller number means higher priority): P1 (arrival 0, burst 8, priority 2), P2 (arrival 3, burst 3, priority 1), P3 (arrival 4, burst 4, priority 4), P4 (arrival 6, burst 7, priority 3), P5 (arrival 8, burst 2, priority 2). Preemptive priority scheduling is used. At what time does P5 complete, and what is the average response time (first time on the CPU minus arrival) over all processes?
- A. P5 completes at 13; average response time 6.2 ms
- B. P5 completes at 11; average response time 4.2 ms
- C. P5 completes at 13; average response time 5.2 ms
- D. P5 completes at 14; average response time 5.2 ms
Correct answer: C. P5 completes at 13; average response time 5.2 ms
Simulating with a preemption check on every priority change gives completion times P2 6, P1 11, P5 13, P4 20, P3 24 and response times (first run − arrival) P1 0, P2 0, P3 16, P4 7, P5 3, averaging 5.2 ms. Treating the scheme as non-preemptive would move P5's completion time.
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…
- 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…
- Reference string: 8, 2, 9, 2, 4, 8, 9, 4, 2, 8, 4, 9, 2. With 4 frames, initially empty, how many page faults does LRU replacement cause?
- Reference string: 3, 8, 2, 8, 9, 3, 2, 9, 3, 8, 2, 9, 8. With 4 frames, initially empty, how many page faults do FIFO, LRU and Optimal…