CS FundamentalsVery hardGATE CS (PYQ pattern)
Three processes all arrive at time 0 in the order A, B, C and are scheduled FCFS (non-preemptive on the CPU). Each alternates CPU burst, I/O burst, CPU burst (in ms): A (2, 9, 2), B (3, 5, 1), C (1, 11, 3). Each process has its own I/O device, and a process that finishes I/O joins the tail of the ready queue (a process that finishes I/O while another is running joins the queue in the order I/O completed). What is the total CPU idle time before the last process finishes?
- A. 10 ms
- B. 12 ms
- C. 7 ms
- D. 8 ms
Correct answer: D. 8 ms
Simulation: the last process finishes at t = 20 ms; total CPU work is 2+2+3+1+1+3 = 12, so idle = 20 - 12 = 8.
More Operating Systems questions
- A 3-level feedback queue scheduler uses strict priority between levels. Level 0 has quantum 2 ms, level 1 has quantum 4 ms, level 2 is…
- Two processes i and j (j is the other one) use shared flag[2] (initially false) and turn to guard a critical section. Entry code of four…
- Arrays A and B are 128 x 128 int matrices stored row-major, 4-byte ints, 512-byte pages (each row occupies exactly one page, A and B…
- A Unix-like file system has 1 KB blocks, 4-byte pointers, and inodes with 10 direct pointers and one single-indirect pointer. Every…
- Banker's algorithm with 3 resource types. Allocation: P0 (1,0,0), P1 (1,2,0), P2 (0,0,0), P3 (1,4,3), P4 (3,1,1). Maximum: P0 (5,3,2), P1…
- Every fork() succeeds, wait() blocks until some child has terminated (it returns at once if the caller has no un-waited children), and…