CS FundamentalsVery hardGATE CS (PYQ pattern)
Highest Response Ratio Next (non-preemptive; ratio = (waiting time + burst) / burst, evaluated whenever the CPU becomes free) schedules processes (arrival, burst) in ms: A (0, 8), B (1, 5), C (2, 1), D (3, 2), E (4, 3), F (20, 4). Ties go to the earlier arrival. In what order do they run?
- A. A, C, D, B, E, F
- B. A, C, D, E, B, F
- C. A, B, C, D, E, F
- D. A, C, E, D, B, F
Correct answer: B. A, C, D, E, B, F
At t = 8: ratios B (7+5)/5 = 2.4, C (6+1)/1 = 7, D (5+2)/2 = 3.5, E (4+3)/3 = 2.33, so C runs; at t = 11, E (7+3)/3 = 3.33 beats B (10+5)/5 = 3, which is why B is late. The full order is A, C, D, E, B, F (completion times {'A': 8, 'C': 9, 'D': 11, 'E': 14, 'B': 19, 'F': 24}).
More Operating Systems questions
- Four processes with CPU bursts 10, 4, 2 and 1 ms arrive together at time 0 in that order and are scheduled by Round Robin with quantum 3…
- Round Robin, quantum 4 ms, four processes arriving together at time 0 in the order P1..P4 with bursts 9, 5, 2 and 6 ms. Every switch to a…
- A system has 48-bit virtual addresses, 8 KB pages and 2^40 bytes of physical memory. Each page-table entry holds a frame number plus 5…
- A 7200 RPM disk has 500 sectors of 512 bytes per track and an average seek of 8 ms. A 1,048,576-byte file is stored in consecutive sectors…
- A program loops over pages 1, 2, 3, 4, 5 six times in cyclic order (30 references) with 4 frames, initially empty. How many page faults…
- SJF predicts each process's next CPU burst by exponential averaging, tau(n+1) = a x t(n) + (1 - a) x tau(n), with a = 0.5 and tau(0) = 10…