When more memory causes more page faults
8 November 2026 · 1 min read
- Operating Systems
- Page replacement
It sounds obvious that more memory should never hurt. If a program has more frames to keep pages in, it should fault less often. For some page replacement algorithms this is true, but not for FIFO.
A quick reminder
A page fault happens when the program asks for a page that is not in memory. If every frame is full, the system must remove one page to make room. FIFO removes the page that has been in memory the longest, without checking how useful it still is.
The example
Use this list of page requests:
1 2 3 4 1 2 5 1 2 3 4 5- With 3 frames, FIFO causes 9 page faults.
- With 4 frames, FIFO causes 10 page faults.
One extra frame made the result worse. This is known as Belady's anomaly.
Why it happens
FIFO only looks at when a page arrived, not at how often it is used. With 4 frames, the pages in memory at each moment are different from the pages kept with 3 frames, and here that difference leads to removing pages that are needed again soon.
LRU and Optimal do not have this problem. Whatever frames they have with a smaller memory are always also kept with a larger one, so adding memory can never increase their faults.
Try it yourself
Open the Page Replacement experiment, enter the list above, and compare FIFO with 3 frames and with 4 frames. Then switch to LRU and see how the numbers change.