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 _____________6453

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 _____________6453

🧐 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 and count the number of faults using the LRU (Least Recently Used) replacement policy.

  1. Initially, the memory is empty. We add 8 to memory. Fault count = 1.
  2. Next, we add 12 to memory. Fault count = 2.
  3. Now, we need to add 0 to memory. But the memory is full, so we need to replace a block. According to the LRU policy, we replace the least recently used block. Between 8 and 12, 8 was used less recently. So we replace 8 with 0. Fault count = 3.
  4. Next, we access 12. It is already in memory, so no fault occurs.
  5. Finally, we access 8. It is not in memory (we replaced it with 0 in step 3), so we have a fault. We replace the least recently used block, which is 0, with 8. Fault count = 4.

So, the total number of faults for the sequence of block addresses 8, 12, 0, 12, 8 using the LRU replacement policy 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.