Rating : ⭐⭐⭐⭐⭐
Price : \$10.99
Language:EN
Pages: 3
Words: 641

# Cache Hierarchy Analysis Assignment Answers

Problem 2: Suppose that we can design a cache hierarchy with 1 or more of the following devices Cache Size 32 KB 128 KB 512 KB 2 MB 8 MB Latency (Clock Cycles) Misses Per Thousand Instructions (MPKI) 100 80 50 4 16 Assume that accessing off-chip memory takes 200 clock cycles For the following cache configurations, calculate the average time spent accessing the cache hierarchy. What do you observe about the downsides of a cache hierarchy that is too shallow or too deep? (Here, too shallow means having only a small number of levels and deep means having many levels.) 32 KB L1; 8 MB L2; off-chip memory 32 KB L1; 512 KB L2; 8 MB L3; off-chip memory C. 32 KB L1; 128 KB L2; 2 MB L3; 8 MB L4; off-chip memory

# Assignment Help Answers with Step-by-Step Explanation:

- Miss Penalty is the time it takes to fetch data from the next level of cache or off-chip memory.

- Miss Rate is the probability of a cache miss for a given level.

- L2 Hit Time = 4 clock cycles

- L2 Miss Rate = MPKI for L2 / 1000 = 16 / 1000 = 0.016

- L2 Hit Time = 4 clock cycles

- L2 Miss Rate = MPKI for L2 / 1000 = 16 / 1000 = 0.016

- L1 Hit Time = 100 clock cycles

- L1 Miss Rate = 0.016 (from L2 calculations)

- L4 Hit Time = 4 clock cycles

- L4 Miss Rate = MPKI for L4 / 1000 = 4 / 1000 = 0.004

3. A deeper cache hierarchy (like configuration C) can offer more capacity but comes with higher average access times, making it suitable for cases with larger working sets and higher memory demands.

In summary, the downside of a too shallow cache hierarchy is limited capacity and potential for more frequent cache misses, while the downside of a too deep cache hierarchy is increased average access times due to the cascading miss penalties. The choice of cache hierarchy depth should be based on the specific workload and performance requirements of the system.

How It Works