Consider an array has 100 elements and each element occupies 4 words .A 32 word cache is used and divided into a block of 8 words .What is the hit ratio for this statement
for(i=0; i<100; i++)
A[i] = A[i]+10;
I just want to ask that whenever a cache miss occur, consecutive 8 words ,( ie 2 elements) are fetched and placed in cache,so why we are doing like this is it because we have to follow law of spatial locality ?