Question: [ 1 0 / 1 0 / 1 0 / 1 5 ] You are trying to appreciate how important the principle of locality is

[10/10/10/15] You are trying to appreciate how important the principle of
locality is in justifying the use of a cache memory, so you experiment with a com puter having an LI data cache and a main memory (you exclusively focus on data accesses). The latencies (in CPU cycles) of the different kinds of accesses are as follows: cache hit, 1 cycle; cache miss, 110 cycles; main memory access with cache disabled, 105 cycles.
a.[10] When you run a program with an overall miss rate of 3%, what will the average memory access time (in CPU cycles) be?
b.[10] Next, you run a program specifically designed to produce completely random data addresses with no locality. Toward that end, you use an array of size 1 GB (all of which fits in the main memory). Accesses to random elements of this array are continuously made (using a uniform random number generator to generate the elements indices). If your data cache size is 64 KB, what will the average memory access time be?

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 Programming Questions!