Starting from:
$35

$29

Programming Assignment #4 Solution

You will implement the programming assignment using C on the genuse machines provided by the school. When you are done, create a text file <yourname_ID.txt in the programming directory and put your full name and ID number in the file. Include this file when you turn in your programming assignment. Do not turn in your assignment as separate files. Include all the files in a .zip folder and upload it to Canvas.







Page Replacement




Write a program that implements the FIFO, LRU, and optimal page-replacement algorithms presented in chapter 9. First, generate a random page-reference string where page numbers range from 0 to 9. Apply the random page-reference string to each algorithm, and record the number of page faults incurred by each algorithm. Implement the replacement algorithms so that the number of page frames can vary from 1 to 7. Assume that demand paging is used.







Reminder: Although most or all of the programming assignments should "just work" in many other environments (cygwin, OSX, solaris, etc.), note that (1) I will not be able to assist in setting up or debugging problems caused by differences in the environment and

statements like "it worked on my home machine" will not be considered in the grading process. If you choose to do development in an unsupported environment, it is your responsibility to leave adequate time to port your solution to the supported environment, test it there, and fix any problems that manifest.

More products