Page Replacement Algorithms
- LRU (Least Recently Used) Page Replacement.
- Here, we will replace the page that wasn't used by the process for the longest time duration.
- Note the distinction between FIFO and LRU: The former looks at the oldest load time, and the latter looks at the oldest use time.
- LRU is considered a good replacement policy, and is often used.
- To implement the algorithm, we use either counters (1 counter per page) that tell how much time passed since a page was used, or use a stack to pull a page from the middle of the stack and place it on the top when the page is used, and replace those pages located at the bottom of the stack.
- LRU doesn't suffer from Belady's anomaly as well.