Question: Assume we execute the following program under the given conditions: Size of (int) = 4 bytes Cache is initially empty Array x begins at memory

Assume we execute the following program under the given conditions:

Size of (int) = 4 bytes

Cache is initially empty

Array x begins at memory address 0x0.

The only memory accesses are to the entries of the array x, and all other variables are in registers.

int x[2][128];

int i, sum = 0;

for(i = 0; i < 128; i++){

sum += x[0][i] * x[1][i];

}

3.1 Assume the cache size is 512 bytes, direct-mapped with 16-byte block size. What is the miss rate?

3.2 What is the miss rate if we double the cache size to 1024 bytes?

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!