edited by
408 views
0 votes
0 votes
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 ?
edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
2
Alina asked Jan 6, 2019
397 views
What is formula of Average memory access time?And formula of effective access time?And the difference between them . I always mix them .
0 votes
0 votes
1 answer
4
MayankSharma asked Sep 14, 2018
856 views
What happens on write miss in a write back cache?First write in main memory then bring the block to cache (dirty bit = 0) orFirst bring the block to cache then write it (...