CS FundamentalsHardAmazon · Microsoft MCQ pattern
Processes: P1 (arrival 0, burst 7), P2 (arrival 2, burst 4), P3 (arrival 4, burst 1), P4 (arrival 5, burst 4) (ms). Round Robin with quantum 3 ms. A process arriving at the same instant a quantum expires joins the ready queue before the preempted process. What is the completion time of P2, and what is the average response time (first run − arrival)?
- A. P2 completes at 9; average response 1.50 ms
- B. P2 completes at 14; average response 2.75 ms
- C. P2 completes at 13; average response 2.75 ms
- D. P2 completes at 14; average response 3.00 ms
Correct answer: B. P2 completes at 14; average response 2.75 ms
Gantt: P1 0–3, P2 3–6, P1 6–9, P3 9–10, P4 10–13, P2 13–14, P1 14–15, P4 15–16. P3 and P4 arrive during P2's slice and join the queue behind P1, so P2's second turn comes only at 13. Response times 0, 1, 5, 5 → 11/4 = 2.75 ms.
More Operating Systems questions
- Processes: A (arrival 0, burst 5), B (arrival 1, burst 3), C (arrival 2, burst 8), D (arrival 3, burst 6). Priorities A = 3, B = 1, C = 4…
- Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4, 3 frames, initially empty. Which statement is correct?
- Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4. With 3 frames, initially empty, how many page faults does the Optimal (OPT)…
- Assertion (A): For FIFO page replacement, increasing the number of frames can increase the number of page faults. Reason (R): FIFO is a…
- Five processes P0–P4 and three resource types A, B, C. Allocation: P0 (1,0,1), P1 (2,1,1), P2 (0,1,2), P3 (1,1,0), P4 (0,0,2). Max: P0…
- A system has 6 identical tape drives. Each of n processes needs at most 2 drives. What is the maximum n for which the system is guaranteed…