A variation of the LRU page replacement algorithm is known as the clock page
replacement policy because it is implemented with a circular queue and uses a pointer
to step through the reference bits of the active pages, simulating a clockwise motion.
The algorithm is paced according to the computer’s clock cycle, which is the time span
between two ticks in its system clock. The algorithm checks the reference bit for each
page. If the bit is one (indicating that it was recently referenced), the bit is reset to zero
and the bit for the next page is checked. However, if the reference bit is zero (indicating
that the page has not recently been referenced), that page is targeted for removal.
If all the reference bits are set to one, then the pointer must cycle through the entire
circular queue again giving each page a second and perhaps a third or fourth chance.
Figure 3.10 shows a circular queue containing the reference bits for eight pages currently
in memory. The pointer indicates the page that would be considered next for
removal. Figure 3.10 shows what happens to the reference bits of the pages that have