I need help with the following question: 1) You have a 2-level cache. Level 1 ca
ID: 3863510 • Letter: I
Question
I need help with the following question:
1)You have a 2-level cache. Level 1 cache is 1MB and level 2 cache is 2MB. Level 1 cache has a mean access time of 20 nsec, level 2 200 nsec, and cache misses 10 µsec. L1 cache got 10,000 cache hits, L2 cache got 90 cache hits and there were 10 double-cache misses.
a)Calculate the hit-ratio for level-1 cache to 4 significant digits
b)Calculate the hit-ratio for level-2 cache to 4 significant digits
c)Calculate the mean access time to 4 decimal digits. Assume pipelining. i.e., we begin memory accesses while initiating cache accesses
Explanation / Answer
a) Cache hit ratio of level 1 cache
Total number of attempts to access the memory= 10000+90+10= 10100
in which level-1 cache hit is= 10000, so the level-1 cache hit ratio is= 10000/10100= 0.990099
In percentage it is 99.0099 %
b) Similarly for level-2 total number of attempts are 100, because only 100 times operation is requested so
the hit ratioh level-2 is 90%
c) Access time= 0.990099*20+ 0.009900((0.90*2200)+0.1(20+2200+10000))= 51.50178 ns