CS FundamentalsVery hardGATE CS
Round Robin with quantum 2 runs A (arrival 0, burst 5), B (1, 3), C (2, 6) and D (4, 2). A newly arrived process joins the ready queue before a process preempted at the same moment, and every switch between DIFFERENT processes costs 1 time unit (none at time 0). In what order do they finish, and when does the last one finish?
- A. D, B, A, C; last at 16
- B. A, D, B, C; last at 22
- C. D, B, A, C; last at 24
- D. B, D, A, C; last at 24
Correct answer: C. D, B, A, C; last at 24
Schedule: A 0–2, B 3–5, C 6–8, A 9–11, D 12–14 (done), B 15–16 (done), C 17–19, A 20–21 (done), C 22–24 (done): 8 switches. 16 ignores the switch cost, and A, D, B, C comes from queueing the preempted process ahead of new arrivals.
More Operating Systems questions
- At time 10 the CPU becomes free and four jobs wait: J1 (arrived 2, burst 6), J2 (arrived 5, burst 2), J3 (arrived 1, burst 10), J4…
- With 3 frames, initially empty, the reference string 4, 7, 0, 7, 1, 0, 1, 2, 1, 2, 7, 1, 2, 0, 4, 7 is run under FIFO, LRU and Optimal…
- A clock (second-chance) algorithm has frames f0–f4 holding P3 (R = 1), P8 (R = 0), P5 (R = 1), P1 (R = 1) and P6 (R = 0). The hand points…
- A system has a TLB lookup of 20 ns, memory access of 100 ns, single-level paging and a TLB hit ratio of 90%, so a reference costs 130 ns…
- A 40-bit virtual address space uses 8 KB pages and 8-byte page-table entries, and every page-table node at every level must fit in exactly…
- Banker's algorithm, resources (A, B, C). Allocation / Max: P0 (1,0,1) / (4,3,2), P1 (2,1,0) / (3,2,2), P2 (0,1,1) / (2,3,3), P3 (1,1,0) /…