Question: Part - 2 ( 9 pts ) - Write a program named: ReplacePage In separate methods, implement the FIFO and LRU page - replacement algorithms
Part pts Write a program named: ReplacePage
In separate methods, implement the FIFO and LRU pagereplacement algorithms as presented in
Chslides and respectively
Allow each method to accept as arguments: a reference string, a desired number of page
frame, and optionally a flag to enabledisable output used for part extra credit
Each method should return the number of page fault
As a test case, use as number of page frame and the exact reference string shown on the slides:
String testRefStr ; in Java
Print out results for both FIFO and LRU. A sample example for FIFO is shown below:
Additionally, for FIFO, show the effect of Belady's Anomaly by using this reference string:
String testRefStr; in Java
Print out results for and page frames they should match the result presented on slide
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
