Three Thousand
2 min readDec 15, 2019


Computer Scientist Weekly (2019–0)

A typical memory hierarchy is shown below. In general, the storage devices get slower, cheaper, and larger as we move from higher to lower levels. Also, each higher level holds cache retrieved from its nearest lower level.

Memory Hierarchy

Speaking of cache, there’re two important key words, cache hit and cache miss, while cache miss can be divided into different types, such as cold miss, conflict miss and capacity miss.

Caching in modern computer systems

Different cache has different cache management, and the key to distinguish different cache managements is the organization of the cache. Generally, a cache is an array of sets, while each set contains one or more lines, and each line contains a valid bit, some tag bits and a block of data. Caches are grouped into different classes based on the number of cache lines per set, so we have direct-mapped cache, set associative caches, fully associative caches.

Cache performance is evaluated with a number of metrics, like miss rate, hit rate, hit time, miss penalty, and the performance can be impacted by the cache size, the block size, the write strategy and the associativity which is the number of cache lines per set.

CSAPP Chapter 6