Memoria est thesaurus ominum rerum e custos
Memory is the treasury and guardian of all things.
-- Cicero
A memory is what is left when something happens and does not completely unhappen
-- Edward De Bono
Mnemosyne provides a simple interface for programming with persistent memory. Mnemosyne addresses two challenges: how to create and manage such memory, and how to ensure consistency in the presence of failures. Without additional mechanisms, a system failure may leave data structures in SCM in an invalid state, crashing the program the next time it starts.
In Mnemosyne, programmers declare global persistent data with the keyword persistent or allocate it dynamically. Mnemosyne provides primitives for directly modifying persistent variables and supports consistent updates through a lightweight transaction mechanism. Compared to past work on disk-based persistent memory, Mnemosyne is much lighter weight, as it can store data items as small as a word rather than a virtual memory page. In tests emulating the performance characteristics of forthcoming SCMs, we find that Mnemosyne provides a 20--280 percent performance increase for small data sizes over alternative persistence strategies, such as Berkeley DB or Boost serialization that are designed for disks.