Yet another excerpt (previous articles here and here) from the well known “Modern Operating Systems” book at InformIT (free registration required): “When a page fault occurs, the operating system has to choose a page to remove from memory to make room for the page that has to be brought in. This sample chapter from Modern Operating Systems looks at a variety of page replacement algorithms designed to tackle this problem.” InformIT also features two more excerpts this week: “Multithreading and the C++ Type System” from the “Modern C++ Design” book and “Solaris: Cluster and Complex Design Issues” from the “Designing Solutions with Sun Cluster 3.0” book.
Eugenia, you must realise that you are posting the link with your session-id embedded in the URL. For the InformIT site, everyone who visits using this URL is YOU – I found this while trying to post a comment when I saw ‘[email protected]’ as the poster’s email-id.
Ranjit.
Thank you for letting me know this. It is pretty bad idea for InformIT to put the session ID on the url, while a session can be obtained in the ‘background’, without exposing it…
Probably a better idea would be just to create a ‘generic’ user and use that sessionid link so others of us won’t have to submit to their rectal exam just to read the article
Why not use two tables?
by -Charlie- on 2/12/2002 5:42:11 AM
You could have your 1 clock like table that goes around searching for unused entries, then another table where NRU pages are added to as and when you clock cycle comes across them.
So, if the ‘clockhand’ comes across an page with R set to 0, it sees if it’s older than the top entry of your NRU table and then adds it to the top or bottom of the NRU table. (cyclic table or maybe a linked list would be more appropriate?)
When a cached page is used, if it is in the NRU table, it is removed.
I’m sure there’s a flaw with the two-table concept though. Otherwise somebody would have implemented it by now.