Clock Beats LRU
Three frames, initially empty. Reference string:
2, 3, 1, 2, 4, 3, 5, 2, 1, 4
The clock variant is the standard one: frames are numbered f0, f1, f2 and filled in that order while any are empty, the hand is left pointing just past the frame it last filled, a reference sets that frame's use bit, and on a fault the hand advances, clearing each use bit it finds set, until it reaches a frame whose use bit is already 0 and evicts it.
How many page faults do optimal, clock and LRU take on this string?
Sign in to answer questions and track your progress
Sign In