The loop appearing below is executed on a machine that has a 1-K-word data cache with four

Question:

The loop appearing below is executed on a machine that has a 1-K-word data cache with four words per cache line.

a. How must x and a be placed relative to each other in memory to produce a conflict miss every time the inner loop’s body is executed?

b. How must x and a be placed relative to each other in memory to produce a conflict miss one out of every four times the inner loop’s body is executed?

c. How must x and a be placed relative to each other in memory to produce no conflict misses?

for (i = 0; i < 50; i++)

for (j = 0; j < 4; j++)

x[i][j] = a[i][j] * c[i];

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: