Visual guide to Address Translation, Paging, Virtual Memory, Page Faults, and Replacement Policies.
| Algorithm | How It Works | Pros / Cons | Belady's Anomaly? |
|---|---|---|---|
| FIFO | Replaces the oldest page in memory. | Simple to implement. Wastes frames; suffers from Belady's Anomaly. | Yes |
| LRU | Replaces the page not referenced for the longest time. | Excellent performance, stack algorithm. Hard to implement in hardware. | No |
| Optimal (OPT) | Replaces page that will not be used for longest time in future. | Guarantees lowest possible fault rate. Impossible to build (requires future knowledge). | No |