Open In App

Cache Memory Performance

Types of Caches :

           Cache that is built into the CPU is faster than separate cache. Separate cache is faster than RAM. Built-in Cache runs as a speed of a microprocessor.



The performance of the cache memory is measured in terms of a quantity called Hit Ratio. When the CPU refers to the memory and reveals the word in the cache, it’s far stated that a hit has successfully occurred. If the word is not discovered in the cache, then the CPU refers to the main memory for the favored word and it is referred to as a miss to cache.

Hit Ratio (h) = Number of Hits / Total CPU references to memory = Number of hits / ( Number of Hits + Number of Misses )

The Hit ratio is nothing but a probability of getting hits out of some number of memory references made by the CPU. So its range is 0 <= h <= 1.



tavg =  h X tc  + ( 1- h )  X  ( tc + tm )  =   tc +  ( 1- h ) X  tm

Let tc, h and tm denote the cache access time, hit ratio in cache and and main access time respectively. 

Average memory access time = Hit Time + Miss Rate X Miss Penalty

Miss Rate : It can be defined as he fraction of accesses that are not in the cache (i.e. (1-h)).

Miss Penalty : It can be defined as the addition clock cycles to service the miss, the extra time needed to carry the favored information into cache from main memory in case of miss in cache.

Cache Memory Structure

Types of Cache misses :

CPU Performance :
CPU time divide into clock cycles that spends for executing packages/programs, and clock cycles that spend for waiting for memory system. Cache hits are part of regular CPU cycle.

CPU time = ( CPU execution clock cycles + memory stall clock cycles ) X Clock Cycle time

1. Memory Stall Clock cycles ( for write-back cache ) :

2. Memory Stall Clock cycles ( for write-through cache ) :

Measuring and Improving Cache Performance :

1. Technique used to minimize the average memory access time :

2. Techniques for reducing Hit time :

3. Techniques for reducing Miss Penalty :

4. Techniques for reducing Miss Rate :

5. Techniques for reducing ( Miss Rate X Miss Penalty ) :

Article Tags :