Page Replacement Algorithm in OS

Page Fault-


  • When a page referenced by the CPU is not found in the main memory, it is called as a page fault.
  • When a page fault occurs, the required page has to be fetched from the secondary memory into the main memory.

Reference String

The string of memory references is called reference string. Reference strings are generated artificially or by tracing a given system and recording the address of each memory reference. The latter choice produces a large number of data, where we note two things.
  • For a given page size, we need to consider only the page number, not the entire address.
  • If we have a reference to a page p, then any immediately following references to page p will never cause a page fault. Page p will be in memory after the first reference; the immediately following references will not fault.
  • For example, consider the following sequence of addresses − 123,215,600,1234,76,96
  • If page size is 100, then the reference string is 1,2,6,12,0,0
---> page Replacement Algorithm is used to  reduced page fault.
Various page Replacement Algorithm we are discussing in next topic..

Thank you viewers..
This is contributed by soumy Sinha..

Comments

Popular posts from this blog

Introduction of Digital computer

INTRODUCTION OF DBMS

Introduction to cache memory