CS 33211 Operating Systems Project #2 Due via e-mail by 11:59pm on Monday, April 9th, 2007 IMPLEMENTING SECOND CHANCE DEMAND PAGE REPLACEMENT ALGORITHM Write a program that implements the page replacement module of an operating system. Assume that there is a single process that requests program pages. You do not have to differentiate between pages of different segments. Assume that the paged portion of the RAM in your OS has 10 frames (from 0 to 9) and the process has 100 pages (from 0 to 99). Assume that initially all frames are empty and all pages are in the backing store (disk). Your program should accept page requests from standard input (cin) and report its actions to the standard output (cout). The input is a sequence of integers which signify process page requests. If page request is out-of-range (less that 0 or more than 99) your program should print an error message and exit. You should assume that the page requests are arbitrary. That is, these requests do not come in a particular order. Here is a fragment of program input/output (note that memory is already filled). 67 <--- input line 67: page hit, page 67 is in frame 2 <--- output line 22 22: page hit, page 22 is in frame 9 5 5: page miss, page 5 replaces page 11 in frame 4 100 100: memory access violation (page request out of range), exiting You should implement the page table and other necessary data structures as well as the second chance page replacement algorithm as discussed in class. Submitting Your Project and Grading You have to submit your project to the teaching assistant by e-mail. She will acknowledge the receipt of your project within a day. Send her only the source files. You can send them either as tar-achieves or as attachments. The programming project is worth 50 points. Late projects are accepted. Late policies are outlined in the syllabus. The grading will be such that the working program submitted a few days late will receive a higher grade that the program that does not work but is submitted. If your program still does not work, submit a text file specifying how the program fails (does not compile, fails test examples, etc.), what you think the reason is and how it can be fixed. You may be given partial credit.