CS FundamentalsHardGATE CS · Amazon/Microsoft SDE MCQ
Round Robin with quantum 3; processes (arrival, burst): A (0, 7), B (2, 4), C (4, 6), D (5, 3). A process arriving at the same moment another is preempted joins the queue first. When do C and D complete?
- A. C at 18, D at 15
- B. C at 20, D at 12
- C. C at 20, D at 15
- D. C at 17, D at 15
Correct answer: C. C at 20, D at 15
A 0-3, B 3-6 (C and D arrive meanwhile, queue A C D B), A 6-9, C 9-12, D 12-15 (done), B 15-16, A 16-17, C 17-20. So D finishes at 15 and C at 20.
More Operating Systems questions
- Preemptive priority scheduling (smaller number = higher priority; a running process is not preempted by an equal priority). Processes…
- Non-preemptive SJF; processes (arrival, burst): P1 (0, 3), P2 (5, 6), P3 (6, 2), P4 (7, 1), P5 (8, 4). The CPU idles when nothing is…
- Highest Response Ratio Next (non-preemptive; ratio = (waiting + burst) / burst). Processes (arrival, burst): A (0, 8), B (1, 4), C (2, 2)…
- A multilevel feedback queue has Q0 (RR, quantum 2), Q1 (RR, quantum 4) and Q2 (FCFS); a job that uses its full quantum drops one level…
- Reference string: 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3 with 3 frames, initially empty. How many page faults occur under FIFO…
- For the reference string 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, going from 3 frames to 4 frames changes the FIFO fault count from…