Question: ( cache ) Consider the following code: ( 2 0 points ) ( 1 ) Assume that the system has a 8 1 9 2

(cache) Consider the following code: (20 points)
(1) Assume that the system has a 8192-byte, direct-mapped data cache with 16-byte blocks.
Assuming that the cache starts from initial state (i.e. initially empty), what is the series of data
cache hits and misses for the above code (i.e. number of misses and number of hits)? Assume
that the ints are 32-bits.
(2) Assume that an iteration of a loop in which the load hits takes 10 cycles but that an iteration of
a loop in which the load misses takes 100 cycles. What is the execution time (cycles) of this
code with the aforementioned cache?
(3) Repeat part (1) except assume that the cache is 2-way set associative with an LRU replacement
policy and 16-byte sets (8-byte blocks).
(4) Repeat part (2) using the cache described in part (3). Is the direct-mapped or the set-associative
cache better?
 (cache) Consider the following code: (20 points) (1) Assume that the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!