Page fault page replacement operating systems OS

Page fault and page replacement in operating systems (OS)

In this tutorial, we will try to answer the following questions;

  1. What is page fault?
  2. Page replacement algorithm

What is page fault?

If a process tries to get a page from memory and the page is not in memory, the page fault occurs. A page fault is a condition in which required page for a process is not in memory.

optimal page replacement algorithm operating systems
Figure: optimal page replacement algorithm operating systems

In the figure, PF means page fault, and PH means page hit.

Page replacement algorithm

Most famous page replacement algorithms are mentioned here;

  1. First in, First out (FIFO) Page replacement algorithm.  Read More 
  2. Optimal Page replacement algorithm.  Read More 
  3. Least Recently Used (LRU) Page replacement algorithm.  Read More