Virtual Memory and Demand Paging
page 6 of 8
by Joydip Kanjilal
Average Rating: 
Views (Total / Last 10 Days): 99441/ 74

Page Replacement Algorithms

The Page Replacement strategies deal with which pages need to be swapped out and which are the ones that need to be swapped in or brought in to the memory from the backing store. The efficiency of a page replacement strategy lies in the least time that is wasted for a page to be paged in to the memory from the backing store and with the minimum IO.  Page Replacement algorithms can be either of the following two.

·         Local Page Replacement Strategy

·         Global Page Replacement Strategy

In a Local replacement strategy, the Operating System decides on the number of pages to be allocated to a process on a process-to-process basis.  Hence, this is process specific and each process can handle the page faults that can occur.  The page that has to be swapped out from the memory is taken from the same process.  In the Global Replacement strategy however, the Operating System allocates a fixed number of pages to each of the processes irrespective of the specific memory requirements of a particular process.  As far as Page Replacement is concerned, the Operating System decides to swap out a page that belongs to any of the processes that are loaded in the memory.

There are many Page replacement algorithms of which the most commonly used are the following:

·         Last In First Out (LIFO)

·         Least Recently Used (LRU)

·         Not Recently Used (NRU)

The LIFO page replacement strategy decides to replace the page that has been swapped in to the memory last.  Therefore, it works in a LIFO principle (similar to how a stack works).  The LRU page replacement algorithm is an algorithm which swaps the pages that have been used the least over a period of time.  The NRU page replacement algorithm is an algorithm which swaps the pages that have not been recently used over a period of time.

View Entire Article

User Comments

Title: virtual memory and paging concepts   
Name: Suganthi Velusamy
Date: 2006-12-28 1:10:43 AM
This is very very useful for me to know about the virtual memory concets and paging concepts clearly. Thanks a lot for you to make me to get a clear idea of what is virtul memory and all of its corresponding operations. Can u please guide me by an article for threading concepts in detailed manner?
Title: Mapping virtual address to physical   
Name: Swetha
Date: 2006-10-15 3:07:27 PM
Hello Sir,

The article is very good for beginners like me.But ca you tell me whether can I write a code to map virtual address to physical addres.

Warm Regards
Title: Suggestion   
Name: Sandeep Acharya
Date: 2006-08-30 12:30:59 PM
The article is really good. We all know that covering the paging concept in a small article is very tough. But I guess it could be better if you can throw some more light on the "Pure demand Paging" and how it could "Thrash" an application. I guess a pictorial/graphical explanation could be better. ANyway its a suggestion only. And I am really appriciating the article. Hoping to have some good articles like this in future.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2023  |  Page Processed at 2023-12-06 3:38:14 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search