1
4.0kviews
Short Note on Page replacement algorithms.
1 Answer
1
87views
  • When a page fault occurs, page replacement algorithm are used for loading the page in memory and no free page frame exist in the memory.

  • Page fault occur if a running process reference a non resident page.

  • The goal of a page replacement strategy into minimize the fault rate, to evaluate a replacement algorithm, following parameter are used.

  1. The size of page.

  2. A set of reference strings.

  3. The number of page frames.

  • Given there i/p, we can determine the number of page faults & hence the page fault rate.

  • When we find the page frame reference, is in the main memory that we have a page hit and when page fault occurs we say it is page miss.

  • Page replacement algorithm deals with how the kennel decides which page reclaim operating system selects the local or global page replacement policy.

  • Following are different page replacement policies

  1. FIFO

  2. LRU

  3. Optimal page replacement.

  • FIFO page replacement algorithm removes the page that have been in memory, the length.

  • The system keeps track of the order in which pages enter the primary memory.

  • LRO stands for learnt recently used. This replacement policy chooses to replace the page which has not been referenced for the length time.

  • This policy assumes the recent pass will approximate the immediate future, OS keel tracks of when each page was referenced by recording the time of reference or by maintaining a stock of references.

  • In optimal page replacement policy algorithm, the data which will not be accessed permanently or for a longer time should be replaced, optimal page replacement algorithm gives less page fault as compared to FIFO & LRU.

  • The key distinction between FIFO & optimal is that FIFO uses the time when a page is brought into memory where as optimal uses the time when a page is to be used.

  • Optimal page replacement policy is difficult to implement because of future reference.

Please log in to add an answer.