in CO and Architecture edited by
1,816 views
0 votes
0 votes
In a two level hierarchy if the top level has an access time of 8ns and the bottom level has an access time of 60 ns. What is the hit ratio in top level required to give an average access time of 10 ns.
in CO and Architecture edited by
by
1.8k views

2 Answers

2 votes
2 votes
Best answer

Here top level is defined in terms of access time..So if hit occurs only top level will be accessed else the top level as well as the bottom level will be consulted..

Given top level access time = 8 ms

     Bottom level access time  = 60 ms

So if x is the hit rate then effective access time = x * ( top level time time) + (1 - x) * ( top + bottom level access time)

                                                                     =  8x + (1-x) * 68

                                                                     =  68 - 60 x

But given effective access time                       =  10 ms

So,

         68 - 60 x   =  10

==>   60 x    =   58

==>   x        =   58 / 60

==>   x        = 96.67 %

Hence required hit rate  =  96.67 %

selected by
1 vote
1 vote

Average access time = HR * Time(Top Level) + (1 - HR) * [Time(Top Level) + Time(Bottom Level)]

Let p be the required hit ratio.

10ns = p * 8ns + (1 - p) * [8ns + 60ns]

10ns = 8p + 68ns - 68p

10ns = 68ns - 60p

p = $\frac{58}{60}$ = 0.97

Related questions