When physical RAM fills up but processes need more pages, the OS must evict a resident page to make room — writing it to swap (disk) if it's dirty. Which page to evict is the page replacement decision, and getting it wrong wrecks performance.
Replacement policies
The theoretical optimum is to evict the page used furthest in the future () — impossible, since you can't see the future. So we approximate : evict the page unused for the longest time. True LRU needs a timestamp on every access (too costly), so real kernels use the :
