For the following scenario find is the hitrate in percentage

For the following scenario, find is the hit-rate (in percentage). A processor has 64 memory locations. It also has a direct mapped cache with 4 sets. The cache is initially empty. The following CACHE searches are generated: $00 $01 $02 $03 $04 $01 $05 $06 $09

Solution

It ia just like page replacement algorithm, now initially cache is empty and $00 has come since nothing is in cache this first request is miss and second request for cache is $01 which is also cache miss and this repeats untill $04 .upto now total cache miss are 5.

>>>sixth request become hit since $01 is already in cache

>>> next all the requests are cache misses.

So hit Ratio is (Number of Hits / Total requests made to caches)*100.

(1/9) * 100 = 11.11%

>>> here direct mapped cache has four sets that means for each block it has 16 entries ,and totally 4*16=64 memory entries.

 For the following scenario, find is the hit-rate (in percentage). A processor has 64 memory locations. It also has a direct mapped cache with 4 sets. The cache

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site