CS570 Summer 2009 Assignment 2
This page last modified 15 June, 2009
You shall implement and analyze Page Replacement Algorithms for OS Virtual Memory Management
You shall create a program which implements the following Page Replacement Algorithms: OPT (Optimal) LRU Clock This program shall read from a file, "pages.txt", which will be located in the same directory as the executable and shall contain a series of positive integers representing page numbers of pages being referenced. These integers shall be in the range of 1..99, each one will be seperated by a space character. Note, only one string of integers will exist in this file.
2. The program shall perform the following:
Upon startup, prompt the user for number of frames of memory the system will have read the sequence of pages accessed from the file "pages.txt" Run each of the algorithms (OPT, LRU, Clock) on the same input string from the step above Printout the number of faults each algorithm generates In your README file (your README file may be a plain text file or MS Word formatted file), include a summary of your findings. Run your algorithms on at least two input data sets and at least two different number of frames of memory and compare the performance of the algorithms. If you use a Word formatted file, you may also include spreadsheets, charts, or graphs to support your explanations.
I will test your program by compiling it and executing it on rohan. Your program shall be written such that it compiles and executes cleanly when using any compiler/interpretor available on rohan. Note - you still must use a Makefile. You shall create a sub-directory named "a2" in your home directory. In it, you shall place all of your project files, including your Makefile and a README file. . Your source files SHALL CONTAIN sufficient comments for making the source easy to read. Points will be taken off for poorly (or non) commented source. Name the executable "a2"(if applicable).
Create ~/a2 by hand. Create all necessary project files. Put them into ~/a2. The Makefile shall create an executable (if applicable) named "a2" in this same directory (~/a2). The system call "system()" will NOT be allowed You are working in teams of two on this assignment. You may use cc, CC, gcc, or g++ compiler on this assignment. The assignment is due on Tuesday, 30 June 2009 by 1800
TURNING IN YOUR WORK:
Place all of your files (all source files, Makefile, README file, test files, etc) into a zip file and follow the turn-in procedures on my website.
Use Patent Claims
Include Install Instructions
These details are provided for information only. No information here is legal advice and should not be used as such.