CS FundamentalsHardGATE CS
Under which condition does the clock (second-chance) algorithm make exactly the same replacement decisions as FIFO?
- A. When every resident page has its reference bit set at each replacement, so the hand clears them all and comes back to the oldest page
- B. When no page is ever modified
- C. When the number of frames is 1 more than the number of distinct pages
- D. Never; clock always beats FIFO
Correct answer: A. When every resident page has its reference bit set at each replacement, so the hand clears them all and comes back to the oldest page
If all bits are 1, the hand clears every bit in one sweep and evicts the page it started at, which is the oldest (FIFO order). Clock differs from FIFO only when some pages have bit 0.
More Operating Systems questions
- 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…
- Disk cylinders 0–199, head at 100 moving toward 0. Requests: 23, 89, 132, 42, 187, 9, 155, 61. Under C-SCAN moving DOWN (service while…
- Disk cylinders 0–199, head at 100. Requests: 23, 89, 132, 42, 187, 9, 155, 61. What is the total head movement under FCFS and under SSTF?