Answered step by step
Verified Expert Solution
Question
1 Approved Answer
computer of 32 bits with a data cache memory of 32 KB has lines of 64 bytes. The cache is 2-way associative. Consider the following
computer of 32 bits with a data cache memory of 32 KB has lines of 64 bytes. The cache is 2-way
associative. Consider the following code fragment: int m[512][512];
sum = 0;
for (i = 0; i < 512; i ++)
for (j = 0; j < 512; j++) sum = sum + m[i][j];
int m[512][512];
sum = 0;
for (i = 0; i < 512; i ++)
for (j = 0; j < 512; j++)
sum = sum + m[j][i];
Assuming that the sum variable is stored in a register, calculate the hit ratio that produce this code fragment. (the matrix
is stored by rows).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started