CS FundamentalsHardGATE CS
Round Robin with quantum 3 ms; processes (arrival, burst): P1 (0, 8), P2 (2, 5), P3 (4, 2), P4 (6, 4). A process arriving at the instant a quantum ends is queued ahead of the preempted process. What is the waiting time of P1?
- A. 12 ms
- B. 10 ms
- C. 13 ms
- D. 18 ms
Correct answer: B. 10 ms
Gantt chart: P1 0-3 | P2 3-6 | P1 6-9 | P3 9-11 | P4 11-14 | P2 14-16 | P1 16-18 | P4 18-19. P1 completes at 18, so its waiting time is 18 - 0 - 8 = 10 ms.
More Operating Systems questions
- SJF predicts the next CPU burst by exponential averaging: τ(n+1) = α·t(n) + (1 − α)·τ(n), with α = 0.75 and initial guess τ(1) = 10 ms…
- Four processes arrive at time 0 in the order A (6), B (3), C (1), D (7) (bursts in ms) and are scheduled Round Robin with no switching…
- Reference string: 1, 3, 5, 4, 2, 4, 3, 2, 1, 0, 5, 3, 5, 0, 4, 3. With 3 frames (initially empty), how many page faults does LRU produce?
- Reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. With 4 frames (initially empty), how many page faults does…
- Reference string: 3, 2, 1, 0, 3, 2, 4, 3, 2, 1, 0, 4. How many page faults does FIFO produce with 3 frames and with 4 frames (both…
- Reference string: 4, 5, 2, 3, 4, 2, 3, 2, 1, 3, 5, 4, 1, 0, 3 frames, initially empty. Using the clock (second-chance) algorithm, where a…