CS FundamentalsModerateGATE CS
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 (arrived 8, burst 1). Which job does Highest Response Ratio Next pick?
- A. J1
- B. J4
- C. J3
- D. J2
Correct answer: D. J2
Response ratio = (waiting + burst)/burst: J1 (8 + 6)/6 = 2.33, J2 (5 + 2)/2 = 3.5, J3 (9 + 10)/10 = 1.9, J4 (2 + 1)/1 = 3. J2 wins; SJF would pick J4 and FCFS J3.
More Operating Systems questions
- 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…
- Banker's algorithm, resources (A, B, C). Allocation / Max: P0 (1,0,1) / (4,3,2), P1 (2,1,0) / (3,2,2), P2 (0,1,1) / (2,3,3), P3 (1,1,0) /…
- Deadlock detection, resources (A, B, C), Available = (1, 0, 0). Allocation / Request: P1 (0,1,0) / (1,0,0), P2 (1,0,1) / (0,2,0), P3…