Knowee
Questions
Features
Study Tools

For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. How many page faults does the LRU page replacement algorithm produce?A.12B.15C.11D.9

Question

For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. How many page faults does the LRU page replacement algorithm produce?A.12B.15C.11D.9

🧐 Not the exact question you are looking for?Go ask a question

Solution

The LRU (Least Recently Used) page replacement algorithm replaces the page that has not been used for the longest period of time. Let's calculate the number of page faults for the given reference string using 3 page frames.

  1. 7 - Page fault (Page frame: 7 _ _)
  2. 0 - Page fault (Page frame: 7 0 _)
  3. 1 - Page fault (Page frame: 7 0 1)
  4. 2 - Page fault, replace 7 (Page frame: 2 0 1)
  5. 0 - No page fault (Page frame: 2 0 1)
  6. 3 - Page fault, replace 2 (Page frame: 3 0 1)
  7. 0 - No page fault (Page frame: 3 0 1)
  8. 4 - Page fault, replace 3 (Page frame: 4 0 1)
  9. 2 - Page fault, replace 1 (Page frame: 4 0 2)
  10. 3 - Page fault, replace 4 (Page frame: 3 0 2)
  11. 0 - No page fault (Page frame: 3 0 2)
  12. 3 - No page fault (Page frame: 3 0 2)
  13. 2 - No page fault (Page frame: 3 0 2)
  14. 1 - Page fault, replace 3 (Page frame: 1 0 2)
  15. 2 - No page fault (Page frame: 1 0 2)
  16. 0 - No page fault (Page frame: 1 0 2)
  17. 1 - No page fault (Page frame: 1 0 2)
  18. 7 - Page fault, replace 2 (Page frame: 1 0 7)
  19. 0 - No page fault (Page frame: 1 0 7)
  20. 1 - No page fault (Page frame: 1 0 7)

So, the total number of page faults is 9. Therefore, the correct answer is D.9.

This problem has been solved

Similar Questions

Consider the following page reference string. 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 For FIFO page replacement algorithms with 3 frames, the number of page faults is?a.15b.14c.11d.16

the page faults.(c) Repeat (b) above for the LRU page replacement algorithm. (d) What would be the lowest number of page faults achievable in this example, assuming an optimal page replacement algorit

The sequence of pages which are to be referred by microprocessor is as follows:D,C,B,A,D,C,E,D,C,B,A,BThe number of page faults that will occur in the algorithm LRU with three page frames will beSelect one:a. 9b. 10c. 8d. 7

The system uses 5 page frames with the page reference string as follows:0,1,2,3,0,1,4,0,1,2,3,7Find the number of page hits in FIFO Replacement Policy.

Consider main memory with a total of 2 blocks. LRU replacement policy is used for choosing the block to be replaced. The number of faults for the following sequence of block addresses 8, 12, 0, 12, 8 is _____________4635

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.