If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Operating Systems Page Fault Handler

Hello there, this post is mostly related to someone with operating systems experience. For my assignment, I need to create a page fault handler which reacts to the sequence of the virtual page references provided on standard input, and implement local page replacement algorithm using clock with modify bit replacement strategy. A virtual page reference has the following format:
<process id> <VPNumber> <type of access>
where
<process id> is a nonnegative integer, unique for each process
<VPNumber> is a nonnegative integer
<type of access> is either R (Read) or W (Write)
The first line of the input contains two integers: M > 2 (number of frames given to a single
process for use in local replacements) and N > 2 (total number of frames in the RAM).
Here is an example of several first lines of the input (comments are here for explanation
only):

Your PageFaultHandler will change processes page tables, if a particular page reference is a
PageFault. It will also accumulate information on the number of page replacements per process,
separately counting number of disk reads and number of disk writes performed (recall that not
every page needs to be written to swapping disk when being replaced). When all lines of the input
are processed (empty line is signal of the end of input), your program will print the following
information for each process:
<process id> <Number of Page faults> <number of Disk Reads> <number of Disk Writes>
and content of each process page table at the end of processing.
You can assume that at the beginning all frames (frame numbers start with 0) are free. If
there are not enough free frames to admit all processes mentioned in input, admit as many of
them as possible on first come first served basis.

That's the requirements of the assignment and I don't really know where to begin. I don't need help with coding really I just need to know how to begin writing the assignment, what sort of classes I should use, and a better explanation of the logic behind the code. Any help is appreciated.