CS FundamentalsVery hardGATE CS
Processes on one CPU, Round Robin quantum 2: A arrives at 0 and needs CPU 3, then I/O 2, then CPU 1; B arrives at 1 and needs CPU 4. A process returning from I/O joins the tail of the ready queue; a process arriving at the same instant a quantum ends is queued before the preempted process. When does A finish?
- A. 7
- B. 5
- C. 4
- D. 8
Correct answer: D. 8
A 0–2 (B arrived at 1, queue: B, A). B 2–4 (queue: A, B). A 4–5 finishes its first burst and starts I/O 5–7. B 5–7 finishes at 7. A returns at 7 and runs 7–8, finishing at 8. 7 is B's finish, 5 is when A starts its I/O, and 4 is A's total CPU need.
More Operating Systems questions
- Processes (arrival, burst): P1 (0, 2), P2 (1, 9), P3 (2, 1), P4 (3, 1), P5 (4, 1). Rank FCFS, non-preemptive SJF, SRTF and RR (q = 1) by…
- Reference string: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. With 4 frames (initially empty), how many page faults…
- Under which condition does the clock (second-chance) algorithm make exactly the same replacement decisions as FIFO?
- A two-level page table, TLB lookup 10 ns, memory 80 ns, TLB hit ratio 90%. On a TLB miss, a page-walk cache holding outer-level entries…
- Two-level paging, TLB lookup 5 ns, memory access 100 ns, TLB searched first. What minimum TLB hit ratio keeps the effective access time at…
- Reference string (times 1–12): 1, 2, 3, 1, 2, 4, 1, 2, 5, 6, 5, 6. With working-set window Δ = 3 (the current and previous two…