CS FundamentalsHardGATE CS
Processes (arrival, burst) are P1 (0, 8), P2 (1, 4), P3 (2, 9), P4 (3, 5) and P5 (6, 2). What is the average waiting time under preemptive Shortest Remaining Time First?
- A. 7.8
- B. 6.4
- C. 11.0
- D. 12.0
Correct answer: B. 6.4
Timeline: P1 0–1, P2 1–5, P4 5–6, P5 6–8 (it preempts P4, which has 4 left), P4 8–12, P1 12–19, P3 19–28. Waiting = 11, 0, 17, 4, 0, so 32/5 = 6.4. 7.8 is non-preemptive SJF, 11.0 is FCFS, and 12.0 is SRTF's average turnaround.
More Operating Systems questions
- Round Robin with quantum 2 runs A (arrival 0, burst 5), B (1, 3), C (2, 6) and D (4, 2). A newly arrived process joins the ready queue…
- At time 10 the CPU becomes free and four jobs wait: J1 (arrived 2, burst 6), J2 (arrived 5, burst 2), J3 (arrived 1, burst 10), J4…
- With 3 frames, initially empty, the reference string 4, 7, 0, 7, 1, 0, 1, 2, 1, 2, 7, 1, 2, 0, 4, 7 is run under FIFO, LRU and Optimal…
- A clock (second-chance) algorithm has frames f0–f4 holding P3 (R = 1), P8 (R = 0), P5 (R = 1), P1 (R = 1) and P6 (R = 0). The hand points…
- A system has a TLB lookup of 20 ns, memory access of 100 ns, single-level paging and a TLB hit ratio of 90%, so a reference costs 130 ns…
- A 40-bit virtual address space uses 8 KB pages and 8-byte page-table entries, and every page-table node at every level must fit in exactly…