2 votes 2 votes A processor refers to the cache memory 1000 times. Out of which 150 references are resulting in misses due to conflicts, 100 of them are due to capacity limitations and 100 of them are due to compulsory page faults. Calculate the hit ratio for direct mapping and associative mapping. $ourav asked May 18, 2016 edited May 18, 2016 by $ourav $ourav 1.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes In direct mapping capacity limitation is not there but it is there in associative mapping n conflict and compulsary page fault is there in both so hit ratio in DM=(1000-250)/1000=0.75 in AM hit ratio=(1000-200)/1000=0.80 __ answered Jul 12, 2016 __ comment Share Follow See all 5 Comments See all 5 5 Comments reply Ravi Kaushik commented Feb 10, 2017 reply Follow Share You said conflict and compulsary misses are there in both case, then why didn't you include conflict misses in associative mapping? I think there are no conflict miss in associative mapping and no capacity misses in direct mapping. And all these exist in set-associative mapping. Correct me if wrong. 0 votes 0 votes yg92 commented Feb 10, 2017 reply Follow Share Why no capacity miss for direct mapping? 0 votes 0 votes Ravi Kaushik commented Feb 10, 2017 reply Follow Share because in direct mapping even if the cache is full it will map only to that cache line where that block belongs, will not check whole cache for empty spaces, So in other words capcity misses are also conflict misses in direct mapping. and also capacity is never checked. 0 votes 0 votes yg92 commented Feb 10, 2017 reply Follow Share @Ravi I think you are right. But then conflict miss should not be there in Associative mapping because we are going to search entire cache for free cache block. If the complete cache is full it leads to capacity miss but not conflict miss 0 votes 0 votes Ravi Kaushik commented Feb 10, 2017 reply Follow Share yes , agree 0 votes 0 votes Please log in or register to add a comment.