Skip to main content

Memory Hierarchy Design and Performance Modeling

Explore the fundamental principles of memory hierarchy in computer architecture, including locality, inclusion, and coherence. Learn about performance modeling techniques for two-level and multilevel systems, covering access time, efficiency, and cost.

Save this reading to your study set

Sign up free

In modern computer architecture, a fundamental tension exists between the speed of the processor and the capacity of memory. While processors operate at incredibly high frequencies, the large-scale storage required to hold modern datasets is inherently slower and more expensive. To bridge this "performance gap," designers employ a memory hierarchy—a layered structure of storage elements ranging from small, lightning-fast registers to massive, slower secondary storage.

The goal of a well-designed hierarchy is to provide the processor with the illusion of a memory system that is as fast as its fastest component and as large as its largest component.

Fundamental Design Principles

The effectiveness of a memory hierarchy is not accidental; it relies on three core principles: locality, inclusion, and coherence.

Locality

Locality is the principle that makes hierarchy possible. It refers to the tendency of a processor to access a relatively small subset of data at any given time. There are two primary types:

  • Temporal Locality: If a particular memory location is referenced, it is likely to be referenced again in the near future.
  • Spatial Locality: If a particular memory location is referenced, it is likely that nearby memory locations will be referenced soon.

A graph showing the probability distribution curve decreasing over time to illustrate temporal locality in memory.

This graph illustrates the distribution of instruction and data addresses in memory, showing two distinct peaks representing common address ranges for each.
This graph illustrates the distribution of instruction and data addresses in memory, showing two distinct peaks representing common address ranges for each.

Inclusion

The principle of inclusion dictates how data moves through the layers. Data resides in the most remote (slowest) level, MnM_n, and is copied into closer (faster) levels, such as Mn−1M_{n-1} or Mn−2M_{n-2}, as it is needed for processing.

Keep reading for free.

Create an account to finish this reading and make it part of your study routine.

Continue reading free

Already have an account? Log in

Updated

Study it your way.

Import this reading into your study set to get started with another study mode.

Make it your own.

Keep this reading in a new study set, or add it to one you already use.