Persistent Memory Systems
Persistent memory adds a crash-ordering problem to ordinary memory visibility. Restart correctness depends on which writes reached a specified persistence domain before power loss.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 1 min
In this article3 chapters
Persistence is an extra ordering relation
A store can become visible to another core while its data remains in a volatile cache. A persistence model defines which components count as durable and how software establishes persistence order. Cache writeback and a completion fence can play different roles. Exact guarantees depend on the platform, the persistence domain and the operations used. A fence specifying memory visibility does not automatically give every durability guarantee an application needs.
Crash-consistent ordering describes why recovery must find data before a durable publication points to them. Write-ahead logging gives a database example in which a durable record closes that dependency.
A log must become durable before its commit record
Suppose an update uses a redo record \(R\) and a commit marker \(C\). The intended crash invariant includes
\[ R\prec_{\mathrm{persist}} C . \]
If the marker is durable, the record must already be sufficient to replay the update. If a crash leaves only an uncommitted record, recovery ignores it under this protocol. Log reuse needs another rule ensuring old records are not reclaimed until the data or a checkpoint is itself durable. Recovery must also tolerate being interrupted and started again.
Persistent data structures need invariants across prefixes
A pointer to a new node should not become durable before the node is initialized durably. Copy-on-write designs can publish a new root after its children are ready. Logging can instead keep enough information to undo or redo a multi-location change. The necessary ordering is about recovery-visible states, while cache coherence and weak memory models govern live observers. Similar recovery arguments apply to logs in distributed transactions.[1][2]