16 views2 pages
15 Mar 2019
School
Course
Professor

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).

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents