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):

3 20
1 0 R \\ process 1 reads from VP 0
1 0 W \\ process 1 writes to VP 0
1 1 R \\ process 1 reads from VP 1
1 2 R
1 3 R
1 4 R
2 0 W \\ process 2 writes to VP 0
1 4 W
2 1 R
3 0 R
1 0 R

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.