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
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q22: Rather than a two-level page table, what
Q23: Caching. "One of the keys to happiness
Q24: You are given an empty 16K 2-way
Q25: Assume an instruction cache miss rate for
Q26: Invalidation vs. Update-based Protocols.
(a) As miss latencies
Q28: Virtual Memory
(a) 32-bit Virtual Address Spaces. Consider
Q29: Consider an architecture that uses virtual memory,
Q30: How many total SRAM bits will be
Q31: TLB's are typically built to be fully-associative
Q32: Describe the general characteristics of a program
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents