in CO and Architecture retagged by
6,809 views
19 votes
19 votes

64 word cache and main memory is divided into 16 words block.The access time of cache is 10ns/word and for main memory is 50ns/word. The hit ratio for read operation is .8 and write operation is.9. Whenever there is a miss in cache, associated block must be brought from main memory to cache for read and write operation. 40% reference is for write operation. Avg access time if write through is used.

in CO and Architecture retagged by
6.8k views

4 Comments

what is the default memory organization- simultaneous or hierarchical?? this is the biggest doubt.. PLzzz Plzzz some one clear it.
0
0

Sir i have small confution

TavgR=hr×tc+(1−hr)×(tm+tc)  in given formula what tc is. tc=cache access time before new block come to main memory or cache acces time after new block is come to MM and then access is taken from cache.

I think in given formula will be hr*tc + (1-hr)*(tm+2*tc) bcoz in case of miss cache is access 2 time, before block came from MM and after block come into MM.

please clear my confution @Arjun

2
2
by default we use simultaneous .
–1
–1
edited by
By default we use hierarchical, it is more practical.

simultaneous is like parallel access which is not easily practical inside a CPU where things happen at nanosecond intervals.
7
7

2 Answers

25 votes
25 votes
Best answer
Cache access time = 10 ns
1 block main memory access time $= 50\times 16 = 800 ns$ (as from main memory, entire cache block is retrieved)

Then use this formula
$T_{avg_R} = h_r \times t_c+(1-h_r)\times (t_m + t_c) = 0.8 \times 10 + 0.2 \times (800 + 10) = 170 ns$ (Hierarchical access is default in case of read)

Whenever cache is missed, data (entire cache block) must come from main memory for write as per question. Also for all write operations, one word of data is written to main memory as cache is WRITE THROUGH. In WRITE THROUGH cache since main memory is always updated, memory arrangement is simultaneous and hence cache access time need not be considered (as it should be smaller than main memory access time and both happens in parralel).

$T_{avg_W} = h_w\times t_m + (1-h_w)  (t_m + 800 )$

$= 0.9 \times 50 + 0.1 \times 850 = 130 ns$

$T_{avg}= f_r\times T_{avg_R}+ f_w\times T_{avg_W} = 0.6 \times 170 + 0.4 \times 130 = 154 ns.$
edited by

4 Comments

But how will we come to know when in write through policy we have to use write allocate or not
0
0
Okk got it here in write through policy in question it has been  asked to consider the write  allocate  policy
0
0
edited by

TavgW=hw×tm+(1−hw)(tm+800)

=0.9×50+0.1×850=130ns
Why 800, we already accessed the word which we are going to write, by sniffing it will be available at cpu and  cache at the same time . But we have to transfer remaining 15 words which takes 750ns .. so total  acces time ={0.9*50+0.1(50+750)} 

 @Arjun sir some times you dumb some times.. please answer this , your answer may clear90% cache memory doubts.. 

@Arjun@Arjun@Arjun@Arjun@Arjun@Arjun@Arjun

​​

0
0
0 votes
0 votes
Yes in this we work on simultaneously updation technique
Answer:

Related questions