in CO and Architecture retagged by
532 views
0 votes
0 votes
Consider a two level memory hierarchy having only one level cache and main memory. Cache and Main memory access times are $20$ ns and $120$ ns/word respectively. The size of cache block is $4$ words .

If main memory is referenced $40 \%$ of the times, then average access time is _______ ns
in CO and Architecture retagged by
by
532 views

2 Answers

4 votes
4 votes
Best answer

Tavg = Hit rate * Cache access time + Miss rate * ( Cache access time + MM access time ) 

       = 0.6 * 20 + 0.4 * (480+20)   [ as MM access time 120 ns/word so for a particular block access tme is 120 * 4=480 ns ]

       = 12 + 200

       =  212

As it says " Consider a two level memory hierarchy having only cache and main memory. " means if there is a cache miss we can find the block in MM only .

Cache and MM access times are provided in the question, so when there is a cache miss only then we can access the main memory that means here Hierarchical access is used.

By Default cache access is Hierarchical --> https://gateoverflow.in/36416/effective-access-time-vs-average-access-time 
 Hence we need to use hierarchical formula here ..

selected by

4 Comments

In cache block , there are no words given in question . So consider it a single cache block only .
1
1

 

@srestha Ma'am , 

Please guide 

When there is a miss in Cache, then the Cache Line will be transferred from Memory to Cache,

here size of cache line is not mentioned , why we have taken of 4 words?

 

0
0
Cache line is synonym to cache block.
1
1
0 votes
0 votes
I am getting :

20*0.6 + (120)*4*0.4 = 204.

4 Comments

@Arpit 

Here Hierarchical access policy is used .

Tavg = Hit rate * Cache access time + Miss rate * ( Cache access time + MM access time ) 

       = 0.6 * 20 + 0.4 * (480+20)   [ as MM access time 120 ns/word so for a particular block access tme is 120 * 4=480 ns ]

       = 12 + 200

       =  212

1
1
edited by

@Edit 

For those who have the same question 

https://gateoverflow.in/36416/effective-access-time-vs-average-access-time

Hello Bikram,

how you came up with the Hierarchical access policy is used.

0
0
@arpit

Here in the question Cache and MM access times are provided , so when there is a cache miss only then we can access the main memory that means here Hierarchical access is used.
1
1
And yeah @arpit

By Default cache access is Hierarchical , and in this question nothing is mention so we can assume by default here Hierarchical method is used.
2
2
Answer:

Related questions