PPT Slide
LRU Approximations
- A useful hardware device is a per-page reference bit that is set to 1 by the paging hardware whenever the page is accessed. It can be read and set to zero by software.
- Crude LRU: Use the reference bit to provide you with one bit of resolution - can use it to split page references into those that have been accessed at least once from those that have not been accessed at all (Figure 12.5).
- LRU page counter: Keep a, say, 8-bit counter that is incremented by an LRU daemon every second or so. If the ref bit == 1, increment & clear the ref bit. This will separate the pages into 256 sets (Figure 12.5).