Question: Assume we have a 4 MB cache with 6 4 - byte blocks. How many misses and hits would the below for - loop incur?

Assume we have a 4MB cache with 64-byte blocks. How many misses and hits would the
below for-loop incur? Assume each array element needs 4 bytes of memory.
Hint: note that the loop has a total of 5122=1024 accesses.
Hint: recall the example we solved together in slide 13 in unit 08.
for (i=0;i512;i++)
A[i]=A[i]+10;
A. Number of blocks in the cache is
B. Number of cache misses is
C. Number of cache hits is
Show your work in the space below for all questions A - C.
Assume we have a 4 MB cache with 6 4 - byte

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!