retagged by
15,443 views
18 votes
18 votes
A direct mapped cache memory of $1$ MB has a block size of $256$ bytes. The cache has an access time of $3$ ns and a hit rate of $94 \%$. During a cache miss, it takes $2$0 ns to bring the first word of a block from the main memory, while each subsequent word takes $5$ ns. The word size is $64$ bits. The average memory access time in ns (round off to $1$ decimal place) is______.
retagged by

5 Answers

Best answer
43 votes
43 votes
Block size is 256 Bytes,word size is 64 bits or 8 bytes. So Block size in words is 8 words.

Number of words per block=32

Time to fetch a word from main-memory to cache is: $20+31 \times 5=175$ns because first word takes 20ns and rest each subsequent words take 5ns each.

So average Memory acces time is

$0.94(3)+0.06(3+175)=13.5$ ns
selected by
7 votes
7 votes
Considering simultaneous access

Cache m/m = 1 MB

Block = 256 B

Word = 64 b = 8 B

1 Block = 256/8 = 32 words

$T_{access}$ = 3 ns

$T_{mem}$ = 20 ns (first word) + 5 ns (each of the rest 31 words)

T = 0.94 * (3) + 0.06 * (20 + 5 * 31) = 13.3 (ans)
5 votes
5 votes
Block size = $256$ B

Word size = $64$ bits = $8$ B

Number of words in a block= $256/8$ = $32$ words i.e whenever a miss occurs a block will be fetched from the memory containing $32$ words in which first word will take $1$ ns and rest $31$ words will take $5$ ns each.

Average m/m access time = $0.94 * 3 + 0.06 * [1*20 + 31 * 5 + 3] = 13.5 ns$
Answer:

Related questions

21 votes
21 votes
3 answers
1