-->

Tuesday, October 1, 2013

How to calculate hit ratio of cache memory

Hit ratio Calculation of Cache Memory and Main Memory.

ExampleThere are two systems A and B whose access times of cache and main memory are shown in the table. When a certain program runs on these systems, the cache hit ratio and the effective access time are the same on both systems. What is the cache hit ratio in this case?


Unit: nsec. Cache memory : System A=15 System B= 10
Main memory: System B=50System B= 70
Solution: Hit Ratio Calculation Formullah
Tavg= hc+(1-h)M
Here, h-> hit ratio, c-> Time to access from cache,
M-> Time to access from main Memory,
Since, this question h is same of both in cache and main memory so we neglect it
Tavg for System A = 15+50=65
Tavg for System B = 70+10=80
Ratio= 65/80=.81
Ans: 0.81

1 comment:

  1. Hi, Thanks for you nice solution. It's very cool to understand. Thanks a lot

    ReplyDelete