Question: The topic for this question is Operating Systems - Virtual Memory I have the answer key. I tried working out their proposed solution but I

The topic for this question is Operating Systems - Virtual Memory

I have the answer key. I tried working out their proposed solution but I ended up getting the same number of page faults for LFU and LRU for both types of string sequence. What did I do wrong?

The topic for this question is Operating Systems - Virtual Memory I

4. Discuss situations in which the least frequently used (LFU) page-replacement algorithm generates fewer page faults than the least recently used (LRU) page-replacement algorithm. Also discuss under what circumstances the opposite holds. Answer Answer: Consider the following sequence of memory accesses in a system that can hold four pages in memory: 1 1 2 3 4 5 1. When page 5 is accessed, the least frequently used page-replacement algorithm would replace a page other than 1, and therefore would not incur a page fault when page 1 is accessed again. On the other hand, for the sequence "12 3452," the least recently used algorithm performs better. LRu Repaement LFu Replacenent 1.2 3 4 5 11 2 3 5 13131313 7F FFFFFFF= Fage faults 7 Page foutts = 7 Frequencies Conclusion: Accordim b the oncwer LFu Shuld perforn beter bu gendrgn less pane fouts ton R ut s thot LFu ond LAu oenerates the Sn pe aut h'te seayence 112345. Unless I made o wicte Worl LRU LFU LRu Replacoment Lu Replacement 2 3 5 2 Poge fault 5 FFFFF =5F encies Conclusion: Accordig to the ansuer ke, LRu on tHe sequence 23 452" Should perform better Thu h Hw my work, both generates the same Page fautts,5 unleasnde a mistake

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!