CS FundamentalsHardGATE CS (PYQ pattern)
SRTF (preemptive shortest remaining time first; ties go to the earlier arrival) is used for processes (arrival, burst) in ms: P1 (0, 9), P2 (1, 4), P3 (2, 2), P4 (4, 6), P5 (5, 3), P6 (7, 1). What is the average waiting time?
- A. 8.83 ms
- B. 5.17 ms
- C. 4.67 ms
- D. 4.17 ms
Correct answer: C. 4.67 ms
Completion times {'P3': 4, 'P2': 7, 'P6': 8, 'P5': 11, 'P4': 17, 'P1': 25}. Waiting = completion - arrival - burst, summed and divided by 6 gives 4.67 ms (the average turnaround would be 8.83).
More Operating Systems questions
- Preemptive priority scheduling (a smaller number means higher priority; equal priorities are served by earlier arrival, without time…
- A lottery scheduler holds a fresh draw every quantum. Process A has 100 tickets, B has 200 and C has 300 (every process always stays…
- Rate-monotonic scheduling (preemptive, deadline = period, all tasks released together at t = 0) is used for T1 (C = 1, period 4), T2 (C =…
- A 3-level paging system has a TLB (1 ns, hit ratio 95%) and a cache in front of memory (10 ns hit time, 90% hit ratio, and a miss costs 10…
- Segment table (base, limit in bytes): seg 0 = (1000, 400), seg 1 = (2400, 100), seg 2 = (3000, 250), seg 4 = (500, 60); segment 3 is not…
- A system uses LRU with 3 frames (initially empty). A dirty page is written back to disk only when it is evicted; a page is dirty if it was…