Page Replacement Algorithms

  • Post author:
  • Post category:Operating System
  • Reading time:4 mins read

Page Replacement Algorithms

The page replacement algorithms actually elects which memory page is to be replaced. The replacement process is sometimes called as swap out/write to disk. Page replacement is done whenever the requested page is not-found in the main memory.

Page Replacement Algorithms

If the algorithm is not optimal?

  1. In case if the number of frames which are allotted to a process is not adequate or precise then there exist possibility of thrashing problem. Just because of lack of frames the most of the pages will be existing in the primary memory and thus more page faults will occur. But, if OS allots more frames to the process then there are more chances of internal-fragmentation.
  2. Uncertainty the page replacement algorithm is not optimal then there will also be thrashing problem. In case if the number of pages that are replaced by the requested pages would be referred in the nearby future then there will be additional number of swap-in and swap-out and then the OS has to perform additional replacements then usual which causes performance lack. As a result, the task of an optimal page replacement algorithm is to elect the page which can bound the thrashing.

Page Replacement

Types of Page Replacement Algorithms

There are several page replacement algorithms while each and every algorithm has a different technique by which the pages can be replaced.

Algorithm Description
Optimal Page Replacement Algorithm OPR algorithm replaces the page which would not be referred for so long in forthcoming. Even though it cannot be practically implementable but it can be used as a standard.
Least-recent-used (LRU) Algorithm LRU algorithm that changes the page which has-not been referred for a long-time. This algorithm is quite opposite to the OPR algorithm.
FIFO  In this algorithm, a queue is maintained. The page that is assigned the first frame will be replaced first. Simply the page which exist at the rare end of the queue will be replaced on the every single page fault.

Deadlock Detection and Recovery



We are a team of writers, researchers, and editors who are passionate about helping others live their best lives. We believe that life is a beautiful gift. We try to live our lives to the fullest and enjoy every moment. We are always learning and growing, and we cherish the relationships we have with our family and friends.