Given the following code sequence calculating a matrix norm.
double c[96], a[96][96];
for (i=0; i<95; i=++ ) {
c[i] = c[i] + a[i][i]*a[i][i+1];
}
with a and c being arrays of double precision floating point numbers with each element being 8 bytes. No element of a or cis in the cache before executing this code. Assume row-major ordering. Assuming that the cache is large enough to hold both a and c, and has a cache block size of 64 bytes, determine
–the number of cache misses for the variable a
–the total number of memory access for the variable a
–the number of cache misses for the variable c
–the total number of memory access for the variable c
–the cache miss rate for this code sequence (combined for a and c)

Respuesta :

Number of cache misses for the variable a: 95

Total number of memory access for the variable a: 759

Number of cache misses for the variable c: 95

Total number of memory access for the variable c: 95

Cache miss rate for this code sequence (combined for a and c): 95/854 = 0.1114

what is cache miss?

A cache miss occurs whenever a processor as well as computer tries to access information from its memory space but is unsuccessful in doing so. As a result, there is a delay as the processor as well as computer must seek main memory or another external device to obtain the data or instruction.

Cache misses can happen for a number of reasons, including when data is removed from the cache as make way for fresh data, when the requested data is not available in the cache, or when a processor is unable to obtain the information because of a dispute involving more than one processor.

The processor as well as computer should access main memory whenever a cache miss occurs.

To learn more about cache miss

https://brainly.com/question/22099150

#SPJ4