Knowee
Questions
Features
Study Tools

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

Question

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

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

Solution

The sequence of block addresses is: 8, 12, 0, 12, 8.

Let's go through the sequence:

  1. The first block address is 8. Since the memory is initially empty, this will cause a page fault. So, we have 1 page fault and the memory now contains block 8.

  2. The next block address is 12. This will also cause a page fault because block 12 is not in memory. So, we now have 2 page faults and the memory contains blocks 8 and 12.

  3. The next block address is 0. This will cause another page fault because block 0 is not in memory. According to the LRU policy, the least recently used block is 8, so it will be replaced. We now have 3 page faults and the memory contains blocks 12 and 0.

  4. The next block address is 12. This will not cause a page fault because block 12 is already in memory. So, we still have 3 page faults.

  5. The last block address is 8. This will cause a page fault because block 8 is not in memory. According to the LRU policy, the least recently used block is 0, so it will be replaced. We now have 4 page faults and the memory contains blocks 12 and 8.

So, the total number of page faults for the given sequence of block addresses is 4.

This problem has been solved

Similar Questions

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

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,EThe number of page faults that will occur in the algorithm LRU with four page frames will be

[8, 6, 2, 2, 1, 3, 6, 8, 5, 3, 3, 0, 1] page sequence is executed on two processors with memory space of 3K and 4K each for processor A and processor B respectively. Page replacement policy takes recent usage while replacing pages in blocks. What seems to be true?10 faults are observed in 4K memory space12 faults are observed in 3K memory space2K page size is efficient than 4K memory space4K memory space is efficient than 3K memory space

The algorithm which replaces the block which has not been referenced for awhile is called ……… ans. Random Replacement FIFO Optimal Page Replacement LRU

1/1

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.