Last Updated : 22 Nov, 2018

In a newly established memory organization, there are two level, L1 memory is 5 times faster than L2 and its execution time is 30 ns less than the average accessing time. L1 access time is 30 ns. What is the hit ratio of L1?
(A) 0.25
(B) 0.5
(C) 0.75
(D) None of these.


Answer: (C)

Explanation: Hit ratio of L1 = H1= ?
Hit ratio of L2 = H2 = 1 (hit ratio of highest level memory is always 1)
L1 access time T1 = 30 ns
It is 30 ns less than the average access time. So,

T1 = TAvg - 30 ns 
30 = TAvg - 30 
TAvg = 60ns 

Level 1 memory is 5 times faster than level 2. So,

T2 = 5T1
T2 = 5*30 
T2= 150 

Therefore,

TAvg = H1T1 + (1 - H1)*H2*(T2)
TAvg = H1(30) + (1 - H1)*1*(150)
60 = 30H1 +150 -150H1
120H1 = 150 - 60 
H1 = 90 / 120
H1 = 3 / 4
H1 = 0.75 

So, option (C) is correct.

Quiz of this Question


Share your thoughts in the comments