What is paging? Explain LRU, FIFO, OPT page replacement policy for the given page frame sequences .Page frame size is 4. 2, 3, 4, 2, 1, 3, 7, 5, 4, 3, 2, 3, 1 Calculate page hit and page miss.

Mumbai University > COMPS > Sem 5 > Operating System

Marks: 10 M

Year: May 2015

1 Answer


  • Paging is a memory-management scheme which allows the physical address of a process to be non-contiguous.
  • The concept of paging is used to remove the problem of fragmentation. Here we are able to allocate physical memory to the process in a non-contiguous manner wherever memory is available.
  • Paging avoids external fragmentation and the need for compaction.
  • Paging is done by breaking the physical memory into fixed size blocks called frames and breaking the logical memory into blocks of same size called pages.
  • When a process is being executed, the corresponding pages are fetched and loaded into the available memory frames.

FIFO page replacement:

In FIFO page replacement, when a page is needed to be replaced, we select the oldest page.

enter image description here

Page hit: If the file is already present, then it is a Page Hit (indicated by circles in the diagram)

Page Miss: If an entry is not found, then it is a Page miss

No. of page hit=4

No. of page miss=9

Optimal Page replacement:

Here, when a page replacement is needed, it looks ahead in the input queue for the page frame which will be referenced only after a long time. The page with the longest reference is swapped.

enter image description here

No. of page hit=6

No. of page miss=7

LRU page replacement:

This method uses the recent past as an approximation of near future. We replace the page which has not been referenced for a long time in the past.

enter image description here

No. of page hit=4

No. of page miss=9  

Please log in to add an answer.