Question: The following C program is run (with no optimization) on a processor with a direct- mapped data cache with a size of 1 KiB

The following C program is run (with no optimization) on a processor

The following C program is run (with no optimization) on a processor with a direct- mapped data cache with a size of 1 KiB and a block size of 32 bytes: int i, j, array[256*256]; /*... */ for (i = 1; i < 256 ; i++) { for (j = 0 ; j < 256 ; j++) { array[256*j] = array[256*j+i]; } } Assume sizeof(int) == 4 and array == 0x4000. 1a: For the first iteration of the outer loop (1 = 1), what is the hit rate of this code? n= Hit Rate= 1b: After the first n iterations of the outer loop, the hit rate changes. What is n, and what is the new hit rate of each iteration of the outer loop? Hit Rate= 1c: What is the overall hit rate of this code? Hit Rate= ? x 0% ? ? x 0%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The following C program is run with no optimization on a ... View full answer

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 Physics Questions!