Question: For a 6 4 - Kbyte, 2 - way set associative cache, calculate the cache miss rate for the following loop. Make the following assumptions:

For a 64-Kbyte, 2-way set associative cache, calculate the cache miss rate for the following loop. Make the following assumptions:
1. There is no entry in the cache initially;
2. Integers are 4 bytes long and two-dimensional arrays are stored in row-major order.
int array[32][1024]; // An integer array with 32 rows and 1024 columns
```
for (int i =0; i 32; i++){
for (int j =0; j 1024; j++){
array[i][j]=(array[i][j]+ array[31- i][1023-j])/2;
}
}
```
a. What is the cache miss-rate for 32-byte cache blocks?
b. What is the cache miss-rate for 16-byte cache blocks?
c. Can you re-write the program, so that the final program performs the same computations and memory accesses but with fewer cache misses.
For a 6 4 - Kbyte, 2 - way set associative cache,

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!