Skip to content
About
Main content

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.

PartQuestionMechanismsWhat the application knows that the layer below does not
OwnershipWho allocates, who frees, where do the bytes physically sit?/regions, off-heap, tuning vs. manual management, Arrow-style pooling, string / dictionary reuse, placementlifetime and shape of data in advance
ResidencyOf the data that does not fit, which part is in memory right now?buffer-pool replacement (, LRU-K, Clock, , ), pinning and unpinningthe future reference pattern, and the fact that this access is a scan
RationingWho gets how much, decided when?memory grants and reservations, admission control by footprint, pressure signalling and operator cooperationan estimate of the footprint before execution
DegradationWhat happens at the boundary?spill-to-disk for hashes, sorts, joinswhich 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 trade-off is the one on which this mechanism is finally judged:

Reservations buy isolation at the cost of utilization; buys utilization at the cost of (the core tension of rationing).