The memory hierarchy is the layered arrangement of a computer’s storage, ordered so that each level trades speed for capacity and cost against the one below it.1
Overview
At the top sit the CPU registers and cache memory: tiny, blisteringly fast, and expensive per byte. Below them is main memory, RAM, which is larger but slower. Further down comes persistent storage — a solid-state drive, then a hard disk drive, and finally archival magnetic tape — each step larger and cheaper but slower to reach. The hierarchy works because programs exhibit locality: they tend to reuse the same data and nearby data, so keeping hot items in the fast upper levels gives most of the speed of fast memory at most of the cost of slow storage.
Where it fits
The hierarchy is the unifying framework for the whole storage-and-memory category: every device here is really a point on this speed-versus-capacity curve, with the volatile/non-volatile split cutting across it. The operating system and hardware constantly shuttle data between levels — caching disk blocks in RAM, paging RAM to disk. GopherTrunk benefits the same way: hot decode state stays in RAM and cache, the working call database lives on fast SSD, and bulk captures sink to cheap disk or tape.
Sources
-
Memory hierarchy — Wikipedia, on the layered organisation of computer storage by speed and cost. ↩