Venabili, thanks for doing cleanup on this one. I had forgotten about it.
Main Topics
Browse All TopicsI'm curious on how the clock replacement algorithm and Optimal replacement algorithm is implemented. I'm not looking for any code in any particular language, but pseduo-code would be fine. I can implement the LRU as I know the algorithm checks the frame for a particular page that has been in the frame longest; that can be determinisitc. However, for the optimal, it requires the knowledge of which pages will not be used the longest. How can I devise a pseduo-code that traces this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: coderlenPosted on 2005-08-20 at 07:45:41ID: 14715757
This is a very unusual question! Are you writing an operating system? I've never seen anybody here at EE with your deep level of understanding, although surely they exist. I would think that a better TA (Topic Area) for you in EE would be "Programming".
ki/Page_re placement_ algorithms
ulty/khuri /cse99_b.p df
edu/~billa rd/cs4560/ node15.htm l
ones/opsys /fall95/no tes/0908.h tml
ooks/mos2/ sample-4.p df
Anyway, I found some stuff for you. I fear that you already know a lot of this, and that I might be insulting your intelligence with some of these links! But maybe you haven't seen some of them, and it will be helpful to you.
This link, perhaps the best one I found for your purposes, has some excellent links at the bottom of the page, many of which have pseudocode, and very technical explanations:
http://en.wikipedia.org/wi
This link explains the Page Replacement Algorithms, with charts and pictures:
http://www.cs.sjsu.edu/fac
This one explains FIFO with pseudocode:
http://www.sci.csuhayward.
This is a nice short article, with pseudocode:
http://www.cs.uiowa.edu/~j
This one explains Page Replacement Algorithms, with emphasis on LRU, although there is no pseudocode:
http://www.cs.vu.nl/~ast/b