Taxonomy of Cache Misses

A detailed illustration of different types of cache misses

--

Photo by Scott Graham on Unsplash

Introduction to Cache Memory

Majority of the modern-day computers have three levels of cache memories namely L1, L2, and L3 caches. Often, L1 and L2 caches reside on-chip while L3 cache resides off-chip. These cache memories play an important role in creating the illusion of having a fast main memory. But, why do they have to create such an illusion?

There has always been a significant gap between the performance of the CPU and the main memory, and as a result, the main memory has become a performance bottleneck. The rate at which CPU processes data is much higher than the rate at which the main memory can provide data. Accessing the main memory is approximately 100 times slower than accessing the L1 cache.

When the CPU needs to access some data, first it would check in the caches. If the data is present, we call it a cache hit which would result in faster data access. If the required data is not present in any level of cache, we call it a cache miss. Then the data should be fetched from the main memory which is relatively very slow. The cache misses have been categorized into 4 types namely:

  • Cold miss (a.k.a. compulsory miss)
  • Capacity miss

--

--

Gunavaran Brihadiswaran
The High Performance Computing Forum

A Computer Science Research Student who loves to do Research, Write and Travel