The Gateway to Computer Science Excellence
+1 vote
2.7k views

The access time of cache memory is 100 ns and that of main memory 
1000 ns. it is estimated that 80% of the memory requests are for read 
and the remaining 20% for write. the hit ratio for read access only is 
0.9. A write -through procedure is used. 

a- what is the average access time of the system considring only 
memory read cycles? 
b-what is the average access time of the system for both read asn 
write requests? 
c-what is the hit ratio taking into consideration the write cycles? 

 

in CO and Architecture by Active (3.8k points) | 2.7k views

1 Answer

+1 vote

hit ration h=0.8 the miss ratio =0.1

since it is write through

so avg access time = h*cache access time + (1-h)*(cache access time+main memory access time)

for only read cycles :

0.8*((0.9*100)+0.1*(100+1000)) = 0.8 * 200 =160

for only write :

0.2*((0.9*100)+0.1*(100+1000)) = 0.2 * 200 =40

for both read and write :

avg access time = 160 + 40

                           =200

by Loyal (8.5k points)
+4
@cse23. I disagree with you.

When they have asked only for read, it means that the probablity of read operations is 1.

So, only for read operations, effective read time

= (hit ratio for cache)(cache access time) + (cache miss ratio)(Cache time + M.M time)

= 0.9 * 100   +    (1 - 0.9)(100 + 1000)

= 200ns

SImilarly, only for write, effective write time = 1000 ns( because its the write through cache and largest of the cache time and M.M time is considered).

Now, effective access time(considering a mix of read and write)

= (probablity of read operations)* (effective read operation time)

   + (probablity of write operations)* (effective write operation time)

= 0.8 * 200 + 0.2 * 1000

= 360 ns
0
yes, u r right.
0

@Sushant Gokhale , @Kapil why have u considered cache access time also on the cache miss......By default shouldn't we consider parallel accessing instead of Hierarchical access?

Correct me if I'm wrong.

0
How did you know that it's a cache miss? You checked the cache ,right?
0
What is the meaning of write through procedure ??
0
But write thorough uses simultaneously access, right?
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,339 answers
198,449 comments
105,204 users