recategorized by
333 views
0 votes
0 votes

Consider a fully-associative data cache with $32$ blocks of $64$ bytes each. The cache uses $\text{LRU}$ (Least Recently Used) replacement. Consider the following $\text{C}$ code to sum together all of the elements of a $64$ by $64$ two-dimensional array of $64-$ bit double-precision floating point numbers.

double sum (double A[64][64]) {
int i, j;
double sum = 0;
for (i=0; i<64; i++)
        for (j=0; j<64; j++)
            sum += A [i] [j];
return sum;
}

Assume all blocks in the cache are initially invalid. How many cache misses will result from the code?

  1. $256$
  2. $128$
  3. $1024$
  4. $512$
recategorized by

Please log in or register to answer this question.

Answer:

Related questions

1 votes
1 votes
1 answer
3