Make certain to have your name, date, assignment number, and a brief description of the program at the top of your main method. Have separate clearly marked classes, functions, or methods for LRU, FIFO, and Optimal replacement algorithms. Then do the same procedure, except use the following page-reference string instead of the random one: 0,7,0,1,2,0,8,9,0,3,0,4,5,6,7,0,8,9,1,2 and then lastly do it with the page-reference string: 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 The sample output has the correct solutions for LRU and FIFO but nothing for Optimal. Remember to count the first time a page comes in, as this is a page fault in demand paging. Record the number of page faults with each of these different page frames numbers and each of the different algorithms. Implement the replacement algorithms so that the number of page frames goes from 1 to 7 and you must compute the page fault for each of these frame numbers. Apply the random page-reference string to each algorithm, and record the number of page faults incurred by each algorithm. First generate a random page-reference string (this should be 20 entries long) where page numbers range from 0 to 9. Write a Java program that implements the FIFO, LRU, and Optimal page replacement algorithms presented in the links at the end of this assignment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |