Memory-hierarchy

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.

References
CSAPP Chapter 6

--

--

--

programmer, writer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Three Thousand

Three Thousand

programmer, writer

More from Medium

Using JavaScript and window.postMessage() for Safe Cross-Domain Communication

Typescript with Grafikart, my resume

Split is not a function Error in JavaScript

JS-09 — JavaScript for Programmers, Chapter7