Least Recently Used Page Replacement

hi,
I have to implement Least Recently Used Page Replacement
I need ur ideas.someone can explain what can I do?
job:

input.txt holds the memory size and page size in KB as follows: first line indicates total
memory size, and second line has the page size. For example:
1000
4
shows total memory size is 1000KB, and each page is 4KB. Therefore, there are 200 page slots
in the memory.
pages.txt shows the stream of page access requests.
There are three special characters: p, a and
white space (used as separator).
p: print least recently used page.
a: print status of memory. Print free and occupied page slots in the memory. Print access
information for all pages in the memory.
For example:
34 65 2 1 p 145 2 1 65 a
indicates page 34 is accessed by a process, then page 65; followed by pages 2, and 1. When
your program encounters a p, it should print out the least recently used page. In similar manner,
pages 145, 2, 1, and 65 are accessed. When your program reads the character a it should print
out, how many slots are empty, and access time information for each page.
This is to do with memory paging in operating systems right? Are you doing on operating systems course at Uni or College or something?

The first idea I have is that you should pay more attention in class. You'd surely have learned enough in class to at least have some ideas of what to do, rather than asking for them.
The first is that you should put some effort into this and show what you've got so far. Then I'd at least feel comfortable helping you; knowing you weren't just being lazy.

If you are indeed doing a course on operating systems or something, this article will help you to understand how paging works:
http://wiki.osdev.org/Paging
I will check the article,I just ask for source and idea not Code!!!! , so its not about this is my course topic or not.
Topic archived. No new replies allowed.