CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ
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 ready. What is the average turnaround time?
- A. 5.0
- B. 6.6
- C. 6.4
- D. 3.2
Correct answer: C. 6.4
P1 0-3, idle 3-5, P2 5-11 (only job ready at 5, not preempted), then P4 11-12, P3 12-14, P5 14-18: turnarounds 3, 6, 8, 5, 10, average 6.4. Preemptive SRTF gives 5.0, FCFS 6.6, and 3.2 is the average waiting time.
More Operating Systems questions
- 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…
- A system has 40-bit virtual addresses, 8 KB pages and 4-byte page-table entries, and every page-table level must fit in one page. How many…
- TLB lookup takes 10 ns and is done first; memory access takes 100 ns; paging is two-level; the TLB hit ratio is 90%. Ignoring page faults…