FIFO

Downward Arrow

About

FIFO

Stands for "First In, First Out." This is the simplest page replacement algorithm. In this algorithm, the operating system keeps track of all pages in the memory in a queue, the oldest page is in the front of the queue. When a page needs to be replaced page in the front of the queue is selected for removal.


Advantages

  1. It is simple and easy to understand & implement.

Disadvantages

  1. The process effectiveness is low.

  2. When we increase the number of frames while using FIFO, we are giving more memory to processes. So, page fault should decrease, but here the page faults are increasing.

  3. Every frame needs to be taken account off.

Algorithm

  1. FIFO algorithm can be implemented by creating a FIFO queue to store all pages in memory.

  2. We replace the page from the top of the FIFO queue.

  3. When a page is brought into memory, it will be inserted at the end of the FIFO queue.

Implementation

Reference String:
Frames: