Reminder of the first assignment, due in 21st September 2000. The assignment is to write a program that simulates part of the virtual memory system in order to count the number of page faults that would be caused by a particular program running. The input to your program should just be a list of numbers. The first gives the number of entries available in the page translation hardware, the others are the sequence of virtual page numbers that the program accesses when it runs (so you don't have to deal with a real program in any way) The output should be just two lines, one saying how many page faults there would have been if the FIFO page replacement strategy had been used, the other saying the number for the LRU page replacement strategy. For extra credit you can also calculate the numbers for Random and Optimal page replacements. For example, suppose the following program is loaded into memory starting at address 600, and is about to run: LOAD 1030 ADD 2051 ADD 1040 STORE 2066 (LOAD n means read the contents of memory location n into the accumulator) (ADD n means add the contents of memory location n to the value already in the accumuator) (STORE n means store the value that is in the accumulator into memory location n) Each of the program's four instructions are in page 1 (512-1023) loactions 1030 and 1040 are in page 2 (1024-1536), and locations 2051 and 2066 are in page 4 (2048-2560). So, the sequence of virtual page accesses for the example program are: first page 0 (to read the first instruction) then page 2 (to read location 1030) then page 0 (to read the second instruction) then page 4 (to read location 2051) then page 0 (to read the third instruction) then page 2 (to read location 1040) then page 0 (to read the last instruction) finally page 4 (to write into location 2066) If the hardware in use had only three entries in its page translator, the input to your program would be presented as: 3 0 2 0 4 0 2 0 4 (if you are not happy with reading an indeterminate number of numbers, it is OK to insist that a special value, such as -1 or "end" appears at the end of the list, but your program must warn users of this requirement when it is run) The output from your program, for this example input should be something very much like: Number of page faults using FIFO = 3 Number of page faults using LRU = 3 Don't just test your program with this little example!