0 0 votes In LRU policy for cache replacement. the least recently used block is replaced. So, what happens when all the slots are empty at beginning? Is LRU or MRU easier to implement? Why? CO & Architecture least-recently-used cache-memory + – Arjun 1.2k views answer comment Share Follow Print See 1 comment 1 1 comment reply V Y commented Jan 11, 2016 reply Follow flag Replacement policy are used when all the positions that a new block may occupy in a cache are full or occupied by old blocks . As in question cache slots are empty so in beginning there is no need of replacement policy and if need arises after some blocks are brought into cache than LRU is easier to implement because it choose the best block to be removed which is least recently used.( I tried is it right ,Sir ). 0 0 replyShare Please log in or register to add a comment.
0 0 votes No need for replacement initially as they are already empty. we see replacement when the memory is full. And the second one i think both are of same cost in implementation. just a guess. Tendua answered Jan 11, 2016 Tendua comment Share Follow See all 2 Comments 2 2 Comments reply Arjun commented Jan 11, 2016 reply Follow flag yes, first part is correct and I guess if asked like this most people get it right. But it created a lot of confusion for the 2014 GATE question. For the second part, which requires more storage- LRU or MRU? 0 0 replyShare adactive18 commented Aug 18, 2017 reply Follow flag Sir, Is MRU easier to implement? I just guess so because extra Data Structure is needed in LRU. But in MRU, last block placed is to be replaced. 0 0 replyShare Please log in or register to add a comment.