CS FundamentalsVery hardGATE CS · Advanced
A multilevel feedback queue has three queues: Q0 (round robin, quantum 4 ms), Q1 (round robin, quantum 8 ms) and Q2 (FCFS). Queues are served in strict priority order. Every new process enters Q0; a process that uses its whole quantum drops one queue; a process preempted by a higher queue's arrival rejoins the tail of its own queue with a fresh quantum. When two processes arrive at the same time, the one with the lower id enters first. Processes (arrival ms, CPU burst ms): P1 (9, 14), P2 (9, 3), P3 (17, 10), P4 (0, 15), P5 (3, 5). What is the average turnaround time?
- A. 24.4 ms
- B. 23.0 ms
- C. 26.0 ms
- D. 27.2 ms
Correct answer: C. 26.0 ms
Simulate millisecond by millisecond with the priority rules; the turnaround times are [38, 7, 26, 45, 14], averaging 26.0 ms. Plain round robin or FCFS give different averages (24.4 ms, 23.0 ms).
More Operating Systems questions
- Five processes (arrival time, CPU burst) are: P1 (1, 8), P2 (4, 1), P3 (0, 3), P4 (7, 6), P5 (5, 1). With preemptive…
- The Banker's algorithm is applied to 5 processes P0-P4 and 3 resource types with Available = (1, 1, 3). P0: Allocation (1, 2, 1), Max (1…
- A system with 3 resource types has Available = (0, 0, 1) and 7 processes P0-P6. P0: Allocation (1, 1, 1), Request (1, 0, 0); P1…
- A disk has cylinders 0-199. The head is at cylinder 96 and is moving towards higher numbers; the pending requests are for cylinders 21…
- A file system uses 2 KB blocks and 4-byte block pointers. Each inode has 12 direct pointers plus one single-, one double- and one…
- A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10 bits for the top level, 10 for the second level, 12 for the…