We have spent the whole module hiding it, but here it finally is: the floor of the hierarchy, the "main
memory" that every cache miss eventually falls through to.
The entire trick of DRAM is its cell: a single transistor gating a single tiny
capacitor. A charged capacitor is a 1, a drained one is a 0. Compare that to
| DRAM cell | SRAM cell | |
|---|---|---|
| Devices per bit | 1 transistor + 1 capacitor | 6 transistors |
| Density / cost | very high / cheap | low / expensive |
| Speed | slow (tens of ns) | fast (≈1 ns) |
| Needs refresh? | yes — the capacitor leaks | no (as long as powered) |
| Used for | main memory | caches, registers |
That capacitor is DRAM's blessing and curse. It leaks — charge drains away in milliseconds — so every cell must be periodically read and rewritten: refresh. The "dynamic" in DRAM is exactly this need to be constantly topped up. Refresh steals a small slice of bandwidth and power, and it grows more troublesome as chips get denser.
A DRAM chip is organised into a 2-D grid of cells arranged in rows and columns, plus a critical piece of SRAM-speed circuitry: the row buffer (a line of sense amplifiers). You cannot read a single DRAM bit directly — the process is two-step:
The row buffer is effectively a tiny cache of the last-opened row. If your next access hits the same open row (a row buffer hit), you pay only the fast CAS. If it needs a different row in that bank (a row buffer conflict), you pay PRECHARGE + ACTIVATE + CAS — much slower. Spatial locality at the DRAM level is all about staying within the open row.
A single bank can only do one thing at a time, so DRAM is replicated for parallelism, in a neat hierarchy:
| Level | What it is | Buys you |
|---|---|---|
| Bank | one cell array + one row buffer | an independent open row; overlap ACTIVATE of one with CAS of another |
| Rank | a set of chips operated together (banks share the data bus) | more banks to interleave across |
| Channel | an independent memory bus + controller | true parallel bandwidth (accesses proceed fully in parallel) |
This is why DRAM bandwidth has grown enormously (more channels, wider buses, faster signalling) while latency — the time for one lonely access to that leaky capacitor and slow sense amp — has stubbornly stalled. You can pour data through many pipes at once, but the length of any single pipe barely shrinks. Bandwidth is a matter of parallelism you can buy; latency is physics you cannot.
Between the last-level cache and the DRAM sits the memory controller, and it is far cleverer than a passer of requests. It holds a queue of pending accesses and reorders them to exploit exactly the structure above — a policy called FR-FCFS (first-ready, first-come-first-serve): prioritise requests that hit the currently open row (they're "ready", cheap), and interleave across banks and channels to keep them all busy. It also decides the page policy:
Add refresh scheduling, write draining, and power management, and the memory controller becomes one of the most performance-critical schedulers on the chip. Run the model below to watch open-page policy reward locality — and punish a row-thrashing stream.
Because DRAM latency is dominated by analog physics, not digital cleverness. Sensing a tiny
capacitor's charge through a long, thin bitline is slow, and slower as cells shrink (the capacitor holds
less charge, harder to sense). Manufacturers optimise DRAM for the metric customers pay for —
density and bandwidth (bits per dollar, bits per second) — not the latency of a single access, which would
require larger, costlier cells. So each generation packs more bits and streams them faster, while the raw
time to reach one bit for the first time (roughly the CAS + activate) stays near
The headline number on a memory stick (DDR4-3200, DDR5-6400) is the transfer rate — how many mega-transfers per second it streams, i.e. bandwidth. It says almost nothing about latency, the time to the first byte, which is set by the CAS/activate timings (the "CL16" style numbers) and has hardly changed. A faster DDR generation moves more data per second but a single random access still takes tens of nanoseconds — often the same tens of nanoseconds as the previous generation. This is why doubling your memory's rated speed rarely doubles a latency-bound program: you bought a wider firehose, not a shorter one. Bandwidth and latency are independent axes; know which one your workload is starved for.
You have now walked the whole memory hierarchy top to bottom — from