retagged by
30,880 views
49 49 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______.

8 Answers

Best answer
89 89 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
21 21 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)
11 11 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$
1 1 vote
ans is 13.5  consider sequential setup of heirarchy

Explaination : h1*t1 + (1-h1)(t1+t2) = avd access time for the given hierarcy of memeory.

so, 0.94*3 + 0.06(3ns + 20 + 31*5) = 13.5 ns

t2 = first word(20 ns) + 5* remaining words (2pow 5 -1) ; 2 pow 5 = no of words in block.
0 0 votes

Let me simplify the solution .so tell me you know the formula for average memory access time is Average access time = h1*tcm+(1-h1)(tcm+tmm)

so to calculate average memory time we need hit ratio ,cache memory access time and main memory access  time.

now read question and try  to figure out what are the things we have .so we have hit ratio given ,cache memory time given and some info about main memry access time given but not clear . 

it takes 20 ns to bring the first word of a block from the main memory, while each subsequent word takes 5ns .

Now we have to take care of this line and find main memory access time.As after reading the line you know that it is taking about words in memory so for first work it takes 20ns and for remaning it takes 5ns each .So you have figured out that you need to calculate no of words.

no of words:

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

so tmm=20+31*5=175ns

now simply apply the formula and you will get the answer

tavg= 0.94 * (3) + 0.06 * (20 + 5 * 31) = 13.5(ans)

 

Answer:
Position:
Show:

Related questions

59 59 votes
4 answers 4 answers
24.9k
24.9k views
Arjun asked Feb 12, 2020
24,905 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
51 51 votes
4 answers 4 answers
26.2k
26.2k views
Arjun asked Feb 12, 2020
26,219 views
A computer system with a word length of $32$ bits has a $16$ MB byte- addressable main memory and a $64$ KB, $4$-way set associative cache memory with a block size of $25...
75 75 votes
9 answers 9 answers
39.6k
39.6k views
Kathleen asked Sep 13, 2014
39,600 views
The access times of the main memory and the Cache memory, in a computer system, are $500$ n sec and $50$ nsec, respectively. It is estimated that $80\%$ of the main memor...
59 59 votes
5 answers 5 answers
31.0k
31.0k views
Arjun asked Feb 12, 2020
30,961 views
Consider a non-pipelined processor operating at $2.5$ GHz. It takes $5$ clock cycles to complete an instruction. You are going to make a $5$- stage pipeline out of this p...