5

Page Replacement Algorithm in Operating Systems

 2 years ago
source link: https://www.geeksforgeeks.org/videos/page-replacement-algorithm-in-operating-systems/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Page Replacement Algorithm in Operating Systems

Page Replacement Algorithm in Operating Systems
Hello everyone. Welcome to geek soggy
  • 40 Views
  • 11/06/2022

In this video, we will be discussing what is Page Replacement & what are the different algorithms which come under the Page replacement algorithm.

Page replacement is the process of bringing a page from the secondary memory to the main memory by replacing a page existing in the main memory. Page Replacement is required if the Operating System uses Virtual Memory and Demand Paging for memory management.

The following page replacement algorithms are used in operating system: - First In First Out (FIFO) - Optimal Page Replacement - Least Recently Used - Last In First Out (LIFO) - Random Page Replacement

FIFO: The page that was brought into the memory first, will be the first one to be replaced by the FIFO algorithm. The oldest page is present at the front of the queue, it will be replaced when a new page has to be brought into the main memory.

Optimal Page Replacement: Optimal Page Replacement algorithm replaces the page that will not be used for the longest time in the future. The page which will be referred to at the farthest time is the one that will be replaced by this algorithm.

Least Recently used: LRU algorithm replaces that page from the main memory which has not been used for a longest time in the past. This algorithm assumes that the pages that have been recently used, will be required again in near future.

Last in First Out: LIFO algorithm replaces the page that was most recently inserted into the main memory. A stack is maintained by the LIFO algorithm to track the recency of pages. Every new page is inserted at the top of the stack.

Random Page replacement: This algorithm randomly selects one of the pages present in the main memory for replacement. This algorithm may generate different results even for the same series of pages requested by the CPU.

Page replacement algorithm: https://www.geeksforgeeks.org/page-replacement-algorithms-in-operating-systems/


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK