Operating System - FIFO (First-In-First-Out) Page Replacement Algorithm
Definition:
FIFO is one of the simplest page replacement algorithms used in virtual memory management. It works on the principle of replacing the oldest page in memory — the one that was loaded first.
How It Works:
-
Pages are stored in a queue.
-
When a new page needs to be loaded:
-
If there’s space, it's simply added.
-
If memory is full, the oldest page (front of the queue) is removed and the new page is added to the end.
-
Example
Pros:
-
Simple and easy to implement.
Cons:
-
Doesn’t consider page usage frequency.
-
Can suffer from Belady’s anomaly (more frames can lead to more faults!