in CO and Architecture retagged by
1,266 views
1 vote
1 vote
A computer has a cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache, 60 ns are needed to load it into the cache, and then the reference is started again. If the word is not in main memory, 12 ms are required to fetch the word from disk, followed by 60 ns to copy it to the cache, and then the reference is started again.The cache hit ratio is 0.9 and the main memory hit ratio is 0.6.What is the average time in nanoseconds required to access a referenced word on this system.

According to me, the answer should be:-

Tavg = 0.9(20) + 0.1( 20 + 0.6(60+20) + 0.4(60+12ms +60+20)).

Please tell me whats wrong in this approach.
in CO and Architecture retagged by
by
1.3k views

4 Comments

joshi_nitish the system design here is herarical, in which if the data is not in Level 1 then we have copy data from Level 2 to Level 1 and then start ref again.

And it is obvious that we will access the disk only when data is not is both cache and MM, then only we will go for disk access otherwise there is no need to access the disk.

0
0

@joshi_nitish 

Tavg = 0.9(20ns) + 0.1(0.6(60ns + 20ns) + 0.4(12ms + 60ns + 20ns))

 why to not add 20ns to it, if it hierarchical access then the cache miss penalty needs to be added in the second block? 

0
0
@xylene

Either search time is implicit in question  or very less in comparison to access time

so if it is mention we use it otherwise we ignore it  ...

That's it , there is no other reason.
1
1

1 Answer

3 votes
3 votes

 The answer should be:-

Tavg = 0.9(20) + 0.1( 0.6(60+20) ) + 0.4 * 0.1 ( 12ms + 60ns + 20ns )

= 480026

Read https://gateoverflow.in/11137/coa

edited by
Answer:

Related questions