Essay
Caches: Misses and Hits
int i;
int a[1024*1024]; int x=0;
for(i=0;i<1024;i++)
{
x+=a[i]+a[1024*i];
}
Consider the code snippet in code above. Suppose that it is executed on a system with a 2-way set associative 16KB data cache with 32-byte blocks, 32-bit words, and an LRU replacement policy. Assume that int is word-sized. Also assume that the address of a is 0x0, that i and x are in registers, and that the cache is initially empty. How many data cache misses are there? How many hits are there?
Correct Answer:

Verified
The number of sets in the cache = (16 * ...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q6: Caching. "One of the keys to happiness
Q7: Caches and Address Translation. Consider a 64-byte
Q8: For a data cache with a 92%
Q9: In what pipeline stage is the branch
Q10: Design a 8-way set associative cache that
Q12: Calculate the performance of a processor taking
Q13: Assume an instruction cache miss rate for
Q14: (a) What is the hit and miss
Q15: You are given an empty 16K 2-way
Q16: Virtual Memory<br>(a) 32-bit Virtual Address Spaces. Consider