In: Computer Science
In a memory system, when the access time of the cache is 10ns and the access time of the main memory is 50ns, what is the hit ratio of the cache if the effective access time is 10% larger than the access time of the cache? (Up to 4 digits below the decimal point)
please detail explanation
Given :-
access time of cache = 10ns
access time of main memory = 50 ns
effective access time of cache = access time of cache + (access time of cache * 10)/100
= 10ns + (10 * 10)/100
= 10 + 1
= 11 ns
Now, we know that,
effective access time = (hit raio * cache access time) + (miss rate * Miss penalty)
The fraction or percentage of accesses that result in a hit is
called the hit rate or hit ratio.
The fraction or percentage of accesses that result in a miss is
called the miss rate or miss ratio
It follows that hit ratio + miss ratio = 1.0
(100%).
then, miss ratio = 1 - hit ratio
The difference between lower level access time and
cache access time is called the miss
penalty.
Effective access time is a standard effective average.
Let hit ratio of the cache = x
then, miss ratio will be = 1 -
Miss penalty( lower level access time) is defined as the difference between lower level access time and cache access time. Then the above equation becomes.
Since " means the time to access the cache while and mean the (miss) penalty to access cache and main memory, respectively".
And Miss penalty(lower level access time) will be = +
Then, above formula can be written as:-
effective access time of cache
Now,
effective access time of cache
=> 11 = (x * 10) + (1 - x) ( 10 + 50)
=> 11 = 10x + 60 (1- x)
=> 11 = 10x + 60 - 60x
=> 11 = 60 - 50x
=> 50x = 60 -11
=> 50 x = 49
=> x = 49 / 50
=> x = 0 .98
Hence, hit ratio of the cache is 0.9800