946 views
0 votes
0 votes
Consider the following specifications:

Hit ratio for read = 0.8,

Hit ratio for write = 0.9

Block size =2 words,

cache of 10 ns is 10 times faster than main memory

On any miss entire block is moved from main memory to cache memory

20% references are for write operations

What is avg access time with write through using

1) Write allocate

2) No write allocate

2 Answers

3 votes
3 votes

cache access time (tc) = 10ns

MM access time (tm) = 100ns

Block size = 2W

Accessing 2 Words from MM = 2*100 = 200ns

Tavg read= 0.8*10 + 0.2* (200+10) =50ns

{simultaneous writing time Max(Tc,Tm)  = 100ns}

Tavg write = 0.9 * 100 + 0.1( 200 +100)  = 120ns  {write allocate policy}

as given,

20% references are for write operations, means 80% are read

Tavg=0.8 * 50ns + 0.2* 120ns

=64ns

edited by
0 votes
0 votes
Avg. access time for read $=(0.8*10+0.2*100)=28ns$

Avg. access time for write $=(0.9*10+0.1*100)=19ns$

Total Avg. access time with write through policy (where $20$% references are for write operations) $=(0.8*28+0.2*19)=26.2ns$

Related questions

0 votes
0 votes
1 answer
1
2 votes
2 votes
0 answers
3
Shubhanshu asked Aug 5, 2017
761 views
According to my calculation, the time required in write back is 240ns and for write through it should be 1920ns. Is it correct or not?
1 votes
1 votes
1 answer
4