0 votes 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 and Architecture least-recently-used cache-memory + – Arjun asked Jan 11, 2016 Arjun 607 views answer comment Share Follow See 1 comment See all 1 1 comment reply Vinay Yadav commented Jan 11, 2016 reply Follow Share 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 votes 0 votes Please log in or register to add a comment.
0 votes 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 See all 2 2 Comments reply Arjun commented Jan 11, 2016 reply Follow Share 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 votes 0 votes adactive18 commented Aug 18, 2017 reply Follow Share 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 votes 0 votes Please log in or register to add a comment.