Consider a system with four page frames and a program that uses eight pages. Con
ID: 3835159 • Letter: C
Question
Consider a system with four page frames and a program that uses eight pages. Consider the reference string 0473230177 and assume that all four page frames are initially empty. How many page faults occur assuming: a. FIFO page replacement. b. LRU page replacement. c. Optimal page replacement. In all cases show a diagram (ASCII art recommended) that shows which pages are in which frames throughout time. For instance: would mean that at step 6 page 5 is in frame 0, page 3 is in frame 1, page 2 is in frame 2, page 1 is in frame 3. At step 1 page 0 is in frame 0, and all other three frames are empty. The goal is to fill this table to see what in memory when and thus infer the number of page faults.Explanation / Answer
a. First-In-First-Out (FIFO) Replacement ---->
So total 8 page faults occur out of 10 page request in FIFO.
b. Least Recently Used (LRU) Replacement----->
So total 8 page faults will occur in LRU.
c. Optimal Replacement ---->
So total 6 page faults will occur in optimal page replacement out of 10 page request.
0 4 7 3 2 3 0 1 7 7 page frame 0 0 0 0 0 2 2 2 2 2 2 page frame 1 4 4 4 4 4 0 0 0 0 page frame 2 7 7 7 7 7 1 1 1 page frame 3 3 3 3 3 3 7 7 page faults * * * * * * * *