Question: Consider a direct mapped L1 data cache of 8KB with blocks of 32 bytes. Assume write-allocate policy is used. How many misses are caused by
Consider a direct mapped L1 data cache of 8KB with blocks of 32 bytes. Assume write-allocate policy is used. How many misses are caused by the following code sequence? Note that each integer has four bytes.
int a[2048]; int b[2048]; int c[2048];
for(i=0;i<2048;i++) C[i]=A[i]+B[i];
Padding and offset changes may improve the performance of the code. Try to reduce cache misses with these techniques. How many misses does the new code have? What types of cache misses are reduced?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
