Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

If cache access time is lOOns, main memory access time is 1000 ns and the hit ratio is 0.9. Find the average access time and also define hit ratio.

Hit ratio

Hit ratio is a measure of how often a requested data item is found in a cache. It is defined as the ratio of the number of cache hits to the total number of memory access requests.

In this case, the hit ratio is given as 0.9, which means that 90% of memory access requests result in a cache hit. Therefore, the remaining 10% of memory access requests result in a cache miss, which requires accessing the main memory.

The average access time can be calculated as follows:

Average Access Time = Hit Time + Miss Rate x Miss Penalty

where:

Hit Time = time to access data in cache = 100 ns
Miss Rate = (1 – Hit Ratio) = 0.1 (i.e., 10% of memory access requests result in a cache miss)
Miss Penalty = time to access data in main memory = 1000 ns
Plugging in the values, we get:

Average Access Time = 100 ns + 0.1 x 1000 ns
= 100 ns + 100 ns
= 200 ns

Therefore, the average access time is 200 ns.