CS FundamentalsHardGATE CS

Under which condition does the clock (second-chance) algorithm make exactly the same replacement decisions as FIFO?

  1. 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
  2. B. When no page is ever modified
  3. C. When the number of frames is 1 more than the number of distinct pages
  4. 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

Exams that ask this topic