CS FundamentalsVery hardGATE CS
Processes (arrival, burst): P1 (0, 2), P2 (1, 9), P3 (2, 1), P4 (3, 1), P5 (4, 1). Rank FCFS, non-preemptive SJF, SRTF and RR (q = 1) by average waiting time, lowest first.
- A. SRTF < SJF < RR q=1 < FCFS
- B. SJF = SRTF < FCFS < RR q=1
- C. SJF = SRTF < RR q=1 < FCFS
- D. RR q=1 < SRTF < SJF < FCFS
Correct answer: C. SJF = SRTF < RR q=1 < FCFS
Averages: FCFS 5.6, SJF 0.8, SRTF 0.8, RR q=1 2. Under SJF, P2 never gets the CPU before the 1-unit jobs that arrive while P1 runs, so SRTF has nothing to preempt and ties with SJF; FCFS lets P2 block all three short jobs.
More Operating Systems questions
- Reference string: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. With 4 frames (initially empty), how many page faults…
- Under which condition does the clock (second-chance) algorithm make exactly the same replacement decisions as FIFO?
- A two-level page table, TLB lookup 10 ns, memory 80 ns, TLB hit ratio 90%. On a TLB miss, a page-walk cache holding outer-level entries…
- Two-level paging, TLB lookup 5 ns, memory access 100 ns, TLB searched first. What minimum TLB hit ratio keeps the effective access time at…
- Reference string (times 1–12): 1, 2, 3, 1, 2, 4, 1, 2, 5, 6, 5, 6. With working-set window Δ = 3 (the current and previous two…
- Resources A, B, C, D. Available = (1,5,2,0). Allocation: P0 (0,0,1,2), P1 (1,0,0,0), P2 (1,3,5,4), P3 (0,6,3,2), P4 (0,0,1,4). Max: P0…