CS FundamentalsHardTCS NQT · Infosys pattern
Processes: P1 (arrival 0, burst 7), P2 (arrival 2, burst 4), P3 (arrival 4, burst 1), P4 (arrival 5, burst 4) (ms). Using Round Robin with time quantum 2 ms, what is the average turnaround time? A process arriving at the same instant a quantum expires joins the ready queue before the preempted process.
- A. 8.75 ms
- B. 9.00 ms
- C. 11.00 ms
- D. 5.00 ms
Correct answer: B. 9.00 ms
Gantt: P1 0–2, P2 2–4, P1 4–6, P3 6–7, P2 7–9, P4 9–11, P1 11–13, P4 13–15, P1 15–16. Completion 16, 9, 7, 15 → turnaround 16, 7, 3, 10 = 36/4 = 9 ms. 5 ms is the average waiting time.
More Operating Systems questions
- Cylinders 0–199, head at 72. Requests: 110, 25, 160, 47, 130, 8, 95, 185. What is the total head movement under SSTF?
- Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4. With 3 frames, initially empty, how many page faults does FIFO produce?
- A paging system with a single-level page table has a TLB lookup time of 10 ns, a memory access time of 80 ns, and a TLB hit ratio of 85%…
- Memory access time is 100 ns and servicing a page fault takes 10 ms. If 1 access in 1,000 causes a page fault, the effective access time…
- Five processes P0–P4 and three resource types A, B, C. Allocation: P0 (1,0,1), P1 (2,1,1), P2 (0,1,2), P3 (1,1,0), P4 (0,0,2). Max: P0…
- Two processes must run statements S1 (in P1) and S2 (in P2) such that S2 never executes before S1. Using one semaphore sync, which is…