Skip to content
BIASED

Caches

Block 1 of 5~2 min

The memory wall

Registers and the stack treated memory as uniform. Real DRAM is not: an L1 hit is ~4 cycles; a miss that reaches DRAM costs 50–200.

Notation. Blocks of B=2bB=2^b bytes; S=2sS=2^s sets of EE ways; capacity C=S⋅E⋅BC=S\cdot E\cdot B. Address → tag / index / offset. Hit time TT, miss rate MM, miss penalty PP.

In 1985 a DRAM access ≈ one 80286 cycle (~200 ns vs ~166 ns); by 2015 Core i7 cycles were ~0.33 ns while DRAM latency had fallen only about 10× to ~20 ns — about 60 cycles of chip latency, and a miss through the memory controller costs 50–200 cycles. Wulf and McKee (1995) named the widening gap the memory wall. Typical hierarchy (Bryant & O’Hallaron Core i7 figures): registers → L1 32 KiB / 4 cycles → L2 256 KiB / 10 → shared L3 8 MiB / 40–75 → DRAM → SSD (25–75 µs, ~10510^5 cycles at 3 GHz). An Apple M1 performance core reports 128 KiB L1D, 12 MiB L2 shared by four P-cores, and 128-byte lines — sizes vary; the pattern of “each level slower and larger” does not.

Answers are saved on the server and tied to this browser until you sign in.

Go deeper — optional

Code and labs do not count toward the main percentage or the certificate.

  • Direct-mapped cache hit/miss traceoptional

    On an address trace compute tag/index/offset; mark hit/miss and conflict victim.

    ~25 min · easier on a computer · The matching course topic has been read.

    Self-check in the notebook — not part of mastery or the certificate.