Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-07-2012, 05:39 PM   PM User | #1
godz1990
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
godz1990 is an unknown quantity at this point
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):

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.
godz1990 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:22 PM.


Advertisement
Log in to turn off these ads.