retagged by
315 views

1 Answer

0 votes
0 votes

Number of Cache Blocks =  32/8 = 4 Blocks

One Block contains = 8 words

So Number of elements in One Block=  8 /4    =  2 Elements

A[0][0]

A[0][2]

A[0][4]

A[0][6]

A[0][8]

A[1][0]

……………..

A[9][8]

Miss

Miss

Miss

Miss

Miss

Miss

...................

Miss

Block 0 is transferred having A[0][0] & A[0][1]

Block 1 is tansferred having A[0][2] & A[0][3]

Block 2 is transferred having A[0][4] & A[0][5]

Block 3 is transferred having A[0][6] & A[0][7]

Block 4 is transferred having A[0][8] & A[0][9] And replaces Block 0 as it is Least recently used

Block 5 is transferred having A[1][0] & A[1][1] And replaces Block 1 as it is Least recently used

....................

Last is transferred having A[9][8] & A[9][9] And replaces Least recently block.

 

 

So no Hits occurs and Hit Ratio = 0

Correct my if i am wrong!!

Related questions

0 votes
0 votes
1 answer
1
Anuranjan asked Mar 17, 2019
243 views
How to improve cache hit rate in case of transfer of element from 2-D array to matrix.? (Consider the column major order in 2D array)
0 votes
0 votes
0 answers
3
amitqy asked Mar 16, 2019
294 views
Can someone please provide a link to an article or a video explaining cache and arrays concept. Im having a hard time understanding that concept.
0 votes
0 votes
0 answers
4