The four questions, and the shift from efficiency to arbitration
Why is memory management finally judged on isolation versus utilization?
The mechanisms here are not independent topics. They fall into four questions. The order is also the order in which each presupposes the previous one.
| Part | Question | Mechanisms | What the application knows that the layer below does not |
|---|---|---|---|
| Ownership | Who allocates, who frees, where do the bytes physically sit? | arenas/regions, off-heap, GC tuning vs. manual management, Arrow-style pooling, string interning / dictionary reuse, NUMA placement | lifetime and shape of data in advance |
| Residency | Of the data that does not fit, which part is in memory right now? | buffer-pool replacement (LRU, LRU-K, Clock, 2Q, ARC), pinning and unpinning | the future reference pattern, and the fact that this access is a scan |
| Rationing | Who gets how much, decided when? | memory grants and reservations, admission control by footprint, pressure signalling and operator cooperation | an estimate of the footprint before execution |
| Degradation | What happens at the boundary? | spill-to-disk for hashes, sorts, joins | which state can be rebuilt and at what cost |
Ownership and Residency are about one consumer being efficient. Rationing and Degradation are about many consumers sharing. That shift, from efficiency to arbitration, is the real spine of this mechanism. It also explains why the isolation versus utilization trade-off is the one on which this mechanism is finally judged:
Reservations buy isolation at the cost of utilization; over-commit buys utilization at the cost of correlated failure (the core tension of rationing).