Skip to main content

Memory Management

Page Replacement Algorithms

0:00
LearnStep 1/2

Page Replacement Algorithms

Page Replacement Algorithms

When memory is full, which page to evict?

1. FIFO (First-In, First-Out)

Belady's Anomaly: More frames can cause more faults!

2. Optimal (OPT)

Replace page not used for longest time (theoretical best):

3. LRU (Least Recently Used)

Replace page not used for longest time in past:

Comparison

AlgorithmFaultsPractical?
FIFO9Yes, simple
Optimal6No (needs future)
LRU8Yes, common