Question

Consider the following page reference string, for a process with 5 virtual pages, and three frames in memory, and fill in the tables for the LRU.

B. LRU. Reference string: ABCBDEABCDA Page Page Reference Fault Total Page Faults

0 0
Add a comment Improve this question Transcribed image text
Answer #1

When a page reference is not in the frames, we report a page fault with X, unless a frame is empty and the frame is filled with that page reference. When a page fault occurs, the page reference which was used least recently is replaced with the current page reference.

Page Reference Frame 1 Frame 2 Frame 3 Page Fault Reason
A A X Since all frames are empty, We fill Frame 1 with A.
B A B X Since two frames are empty, We fill Frame 2 with B.
C A B C X Since one frame is empty, We fill Frame 3 with C.
B A B C B is present in Frame 2, so no page fault.
D D B C X Since A is referenced least recently compared to B and C, it is replaced with D.
E D B E X Since C is referenced least recently compared to B and D, it is replaced with E.
A D A E X Since B is referenced least recently compared to D and E, it is replaced with A.
B B A E X Since D is referenced least recently compared to A and E, it is replaced with B.
C B A C X Since E is referenced least recently compared to B and A, it is replaced with C.
D B D C X Since A is referenced least recently compared to B and C, it is replaced with D.
A A D C X Since B is referenced least recently compared to D and C, it is replaced with A.

Total page faults is 10.

Add a comment
Know the answer?
Add Answer to:
Consider the following page reference string, for a process with 5 virtual pages, and three frames...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT