0 votes 0 votes , if the sequence of blocks refered by cpu is given as 1,3,5,6,7,1,5,4. CO and Architecture co-and-architecture + – rahuldb asked Nov 10, 2016 • retagged Nov 13, 2017 by Arjun rahuldb 782 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply srestha commented Nov 10, 2016 reply Follow Share 6 miss 2 hit 1 votes 1 votes rahuldb commented Nov 10, 2016 reply Follow Share please can u explain 0 votes 0 votes Habibkhan commented Nov 10, 2016 reply Follow Share The block arrangement manner i.e. direct , associative or set associaitve should also be mentioned as the answer will vary in each case 1 votes 1 votes Please log in or register to add a comment.
Best answer 1 votes 1 votes LIFO policy is the property of stack. If we want to replace any block, then we have to remove the block which is referred last. The cache is 4-blocked & initially empty. So first 4 blocks are all different. No hits. All misses. Total Hits = 0, Total Misses = 4 (Referred first) 1 3 5 6(last referred) Next block is 7. It is a miss. So now we should replace 6 with 7. Total Hits = 0, Total Misses = 5 (Referred first) 1 3 5 7(last referred) Next 2 blocks are already present in the cache. So no need for replacement. Total Hits = 2, Total Misses = 5 Last block is 4. Its a miss. So we can replace 7 with 4. Total Hits = 2, Total Misses = 6 (Referred first) 1 3 5 4(last referred) vamsi2376 answered Nov 10, 2016 • selected Nov 12, 2016 by rahuldb vamsi2376 comment Share Follow See all 3 Comments See all 3 3 Comments reply saurabh rai commented Nov 10, 2016 reply Follow Share @vamsi how u know that LIFO page replacement policy is implemented here and cache is 4-blocked . 0 votes 0 votes Arjun commented Nov 10, 2016 reply Follow Share it is in question title. 0 votes 0 votes saurabh rai commented Nov 11, 2016 reply Follow Share ok... 0 votes 0 votes Please log in or register to add a comment.