CSC 4103 Chapter : PA2
Document Summary
To implement page replacement algorithms used by operating systems. If total memory requirements exceed the physical (main) memory, it is necessary to replace pages from memory to free frames for new pages. Two common algorithms are least-recently-used (lru) and its approximation, the. We have learned these algorithms in the class and applied them to a reference string to calculate the total number of page faults. Refer to the lecture notes and the textbook for more information about the two algorithms. Write a program (in c or java) that implements the lru and clock page-replacement algorithms. 0, 1, 2, 3, 2, 4, 5, 3, 4, 1, 6, 3, 7, 8, 7, 8, 4, 9, 7, 8, 1, 2, 9, 5, 4, 5, 0, 2 where page numbers range from 0 to 9. Report the number of page faults incurred by each algorithm. Implement the replacement algorithms so that the number of available page frames can vary as specified (e. g. , 5).