edited by
39,714 views
75 75 votes
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 memory request are for read the rest for write. The hit ratio for the read access only is $0.9$ and a write-through policy (where both main and cache memories are updated simultaneously) is used. Determine the average time of the main memory (in ns).

9 Answers

Best answer
93 93 votes

Average memory access time $=$  Time spend for read $+$ Time spend for write

$=$ Read time when cache hit $+$ Read time when cache miss $+$ Write time when cache hit $+$ Write time when cache miss

$= 0.8 \times 0.9 \times 50 + 0.8 \times 0.1 \times (500+50) $

(assuming hierarchical read from memory and cache as only simultaneous write is mentioned in question) $+ 0.2 \times 0.9 \times 500 + 0.2 \times 0.1 \times 500 $ (simultaneous write mentioned in question)

$= 36 + 44 + 90 + 10 = 180$ ns.

Reference: http://www.howardhuang.us/teaching/cs232/24-Cache-writes-and-examples.pdf

edited by
111 111 votes
They are asking for the average memory access time.

 

If nothing is mentioned whether it is a simultaneous memory access or hierarchical memory access, we need to consider it as hierarchical memory access only. Here in this question nothing is given about read operation so we need to take it as hierarchical memory access for read operation. But for write it is given as write through policy, which will result in simultaneous memory access. Also for write operations write-through cache always go to the main memory, in main memory its hit rate is 100%. Hence Hit rate for write= 1.

 

Since there are 80% read operations and 20% write operations,

Average memory access time =  0.8 * Time spent for read + 0.2 * Time spent for write

 

Time spent for read = Hit-rate-for-read * cache access time + Miss-rate-for-read(cache access time + main memory access time)

= ( 0.9 ⨯ 50 + 0.1 ⨯ (500+50) )

= 45+55 = 100

 

Time spend for write = 500ns (simultaneous write mentioned in question)

 

Average memory access time =  0.8 * 100 + 0.2 * 500 = 80+100 = 180ns
24 24 votes
when write through is implemented in a simultaneous access memory organization ,then hit ratio for write operation always become 1.(There is nothing given about write hit ratio)

$T_{avg\ write }$=500 ns.

$T_{avg \ read}=h_1*T_c+(1-h_1)*T_m$

                 $=.9*50 ns+.1*500 ns$

                 $=95ns$

 the average time of the main memory$=.8*95ns+.2*500ns$

                                                            $=176ns$

correct me if done any mistake.thank you
edited by
1 1 vote
answer is 200ns=50+ 0.2x500x0.9(write through that are in cache)+ 0.8x0.1x500(read misses)+0.2x(500+500)x0.1(write through that are not in cache)
0 0 votes

Ans

Answer:
Position:
Show:

Related questions

57 57 votes
6 answers 6 answers
20.0k
20.0k views
Kathleen asked Sep 12, 2014
19,977 views
In an $11$-bit computer instruction format, the size of address field is $4$-bits. The computer uses expanding OP code technique and has $5$ two-address instructions and ...
2 2 votes
0 0 answers
1.3k
1.3k views
Arjun asked Dec 19, 2015
1,266 views
Three devices $A, B$ and $C$ are connected to the bus of a computer, input/output transfers for all three devices use interrupt control. Three interrupt request lines INT...
0 0 votes
1 1 answer
2.5k
2.5k views
Kathleen asked Sep 12, 2014
2,530 views
Bit-slice processorscan be cascaded to get any desired word length processorspeed of operation is independent of the word length configureddo not contain anything equival...
20 20 votes
3 answers 3 answers
3.2k
3.2k views
Kathleen asked Sep 12, 2014
3,246 views
Many microprocessors have a specified lower limit on clock frequency (apart from the maximum clock frequency limit) because _____