retagged by
580 views
0 votes
0 votes
In a system, cache memory access time is $100ns$ and the main memory is $10$ times slower than cache memory. The hit ratio for read request is $0.92$.

Of the memory requests generated by CPU, $85 \%$ are for read and the remaining are for write. The average access time (in ns) considering both read & write requests (using write-through policy) is ______.
retagged by

2 Answers

Best answer
1 votes
1 votes

Here Write Through technique is used , for write through cache  write operation  is simultaneous only .

" cache memory access time is 100 ns and main memory is 10 time slower than cache memory. "

means main memory access time is 100 * 10 = 1000 ns ( due to 10 times slower )

In order to find avg time we have a formula

Tavg = hc+(1-h)M where
h = hit rate
(1-h) = miss rate
c = time to access information from cache
M = miss penalty (time to access main memory)

In Write through operation : cache and main memory  is updated simultaneously.

It is given that 85% request generated by CPU is read request and 15% is write request.   

 Avg read time will be : 0.92 * 100 + 0.08 * (1000 + 100 ) = 92 + 88 = 180

here by default cache access is hierarchical so 100 is added with 1000 . And hit ratio for read request is 0.92 is given .

  • Avg Write Time = 1000 ns (write Through use write no allocate technique means main memory and cache is updated at the same time ) so to calculate avg time for write , we took MM access time that is 1000 ns . Here we take simultaneous approach .
  • It came this way ( 0 * 100 + 1 * 1000 = 1000 )  as nothing is given about hit ratio in case of write request , so we can take it as 0 and for miss it is 1-hit = 1-0 =1 . 

Tavg = 0.85(avg time for read request)+ 0.15(avg time for write request)

= 0.85(0.92*100 + 0.08* 1100)+ 0.15(avg time for write request)

= 0.85 * 180 + 0.15 * 1000 

= 153 + 150

= 303

The average access time  is  303 ns

selected by
0 votes
0 votes
In write-through caches, writes are performed simultaneously on the MM (or higher level of cache; in case of cache hierarchy)

 

For read:

$0.92[100]+0.08[100+1000]=180ns$

For write:

$1000ns$ //each write has to be done on MM, and it is simultaneous. So, $1180ns$ would be incorrect.

 

85% of the times, we get read requests. Remaining 15% of the time, we get write requests.

$0.85*180+0.15*1000=303$
Answer:

Related questions

1 votes
1 votes
3 answers
4