in CO and Architecture
941 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
in CO and Architecture
by
941 views

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

4 Comments

@Akash Mittal, I think in miss of read there should be (100+200+10), the 10ns is for cache, 100ns for  memory(as it is hierarchial) and 200ns for transferring from memory to cache(as write allocate policy used).
1
1
how do you know that the access time is per word? nothing is mentioned !.. it can be block access time also..
0
0
you mean to say for miss of write.
0
0
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$

1 comment

edited by

@ mam, in write through for read it is simultaneous right? So miss will be 0.2*(100+10). For no write allocate.

0
0

Related questions