The Hand Sweeps Once

Four frames in a circular list, with their use bits. The clock hand currently points at slot 0, and a page fault needs a victim.

slot page use bit
0 A 1
1 B 0
2 C 1
3 D 1

Which page is evicted, and what do the use bits look like afterwards?

A

C is evicted; the hand skips B because a use bit of 0 means the page was never loaded

B

A is evicted, since the hand points at it and the hand advances one slot per fault

C

B is evicted; A's use bit is now 0, C and D are still 1

D

B is evicted, and all four use bits are cleared as part of the sweep