retagged by
3,057 views
1 votes
1 votes

Hit ratio of the cache memory read request is 85% and the cache memory is 5 times faster than main memory. Block size in memory organization is 4 words. The access time of the main memory is 72 ns per word. Write through protocol (simultaneous memory organization) is used in the system. CPU generates 60% of the read requests to read the data and the remaining for write operation. What is the average access time (in ns) of the memory when considering both read and write operations?

retagged by

3 Answers

Best answer
2 votes
2 votes

Average Memory Access Time = 0.6 * Avg. time for read + 0.4 * Average Time for write

Main memory access time = 72 ns per word

Cache access time = Main memory access time/5 (Given in question) = 14.4 ns

Avg. time for read = 0.85 * 14.4 + 0.15(14.4+ * 72 * 4) (On a cache miss entire cache block is taken from main memory)

= 57.6 ns

 (simultaneous memory organization  is given in question for writing as all writes are going to memory irrespective of cache hit/miss. So, we can assume read is hierarchical access though it won't change the answer much)

Avg. time for write = 72 ns (No need to update the whole cache block- we are given main memory access time per word meaning a word can be directly accessed and there is no point updating the whole block in write through cache)

So, Average memory access time = 0.6 * 57.6 + 0.4 * 72 = 63.36 ns

selected by
2 votes
2 votes

read hit (hr) =0.85

write hit (hw)= 1 because of simultaneous memory orgn

read frequency (fr)= 0.6     write frequency (fw)= 1-0.6=0.4

mm access time (tm)= 72 ns per word

so time to access a block = 4 * 72= 288 ns per block

s= tm/tc

5=288/tc

tc=288/5=57.6  so cm access time= 57.6 ns per block

so tavg read =hr*tc+(1- hr)*tm   = 0.6*57.6 +0.4*288 =92.16 ns  (block wise access)

   tavg write =hw*t= 1* 72 =72 ns   (because in simultaneous orgn  in case of write opn  hit ratio is always one.because data block need not required write in cm . you go directly at mm and wriite your required word not block be careful )

total tavg= fr* tavg read + fw*tavg write =0.6*92.16 + 0 .4*72 =84.09 ns

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
2 answers
3