In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, persistent memory is any method or apparatus for efficiently storing data structures such that they can continue to be accessed using memory instructions or memory APIs even after the end of the process that created or last modified them.
Often confused with
non-volatile random-access memory
Non-volatile random-access memory (NVRAM) is random-access memory that retains data without applied power. This is in contrast to dynamic random-access memory (DRAM) and static random-access memory (SRAM), which both maintain data only for as lon ...
(NVRAM), persistent memory is instead more closely linked to the concept of
persistence in its emphasis on program state that exists outside the fault zone of the process that created it. (A process is a program under execution. The fault zone of a process is that subset of program state which could be corrupted by the process continuing to execute after incurring a fault, for instance due to an unreliable component used in the computer executing the program.)
Efficient, memory-like access is the defining characteristic of persistent memory. It can be provided using microprocessor memory instructions, such as load and store. It can also be provided using APIs that implement
remote direct memory access (RDMA) actions, such as RDMA read and RDMA write. Other low-latency methods that allow byte-grain access to data also qualify.
Persistent memory capabilities extend beyond non-volatility of stored bits. For instance, the loss of key metadata, such as page table entries or other constructs that translate virtual addresses to physical addresses, may render durable bits non-persistent. In this respect, persistent memory resembles more abstract forms of computer storage, such as
file system
In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
s. In fact, almost all existing persistent memory technologies implement at least a basic file system that can be used for associating names or identifiers with stored extents, and at a minimum provide file system methods that can be used for naming and allocating such extents.
The read-of-non-persistent-write problem
The read-of-non-persistent-write problem is found for lock-free programs on persistent memory. As compare-and-swap (CAS) operations do not persist the written values to persistent memory, the modified data can be made visible by the cache coherence protocol to a concurrent observer before the modified data can be observed by a crash observer at persistent memory. If a power failure happens right after the write is made visible but not yet persistent, the read-of-non-persistent-write problem can occur, i.e., a data variable that is modified by a CAS can be made visible to a concurrent observer before a crash observer, causing potential crash inconsistencies.
To illustrate the problem: for a singly linked lock-free list, a node can be inserted by a producer thread A after the head node, the Next pointer of the head node gets atomically switched (CAS) to point to the new node A, however, this CAS is not persisted. Then, another node gets inserted by producer thread B after Node A, as CAS for Node A is already visible to all concurrent threads. CAS atomically switches the Next pointer of Node A to point to Node B, and this CAS gets persisted. If a power failure happens at this point, the application that uses the linked list would be left in an inconsistent state, with both Node A and Node B lost, as the Next pointer from the head node to Node A has not been persisted. As Node B has been published but can’t be accessed after a reboot, and other data may have been persisted that are accessed through or dependent on Node B, all subsequent accesses to such data will not be possible, causing data loss.
The read-of-non-persistent-write problem is not limited to lock-free linked lists, it can be found in any lock-free data structures where the potential gap between concurrent visibility and persistent visibility can exist. For instance, a similar problem can occur with persistent circular buffers
See also
*
NOVA (filesystem)
The NOVA (''non-volatile memory accelerated'') file system is an open-source, log-structured file system for byte-addressable persistent memory (for example non-volatile dual in-line memory module (NVDIMM) and 3D XPoint DIMMs) for Linux.
NOVA is ...
*
Persistent data
Persistent data in the field of data processing denotes information that is infrequently accessed and not likely to be modified.
Static data is information, for example a record, that does not change and may be intended to be permanent. It may ha ...
*
Persistent data structures
In computing, a persistent data structure or not ephemeral data structure is a data structure that always preserves the previous version of itself when it is modified. Such data structures are effectively Immutable object, immutable, as their ope ...
*
Phantom OS
Phantom OS is an operating system (OS) made by mostly Russian programmers (with help of some Uzbeks). It is based on a concept of persistent virtual memory, and uses a virtual machine, managed code, and bytecodes. It is one of a few OSes not base ...
- persistent operating system
References
{{Reflist
External links
Persistent Memory Programming a collection of resources related to persistent memory programming
Containers and persistent data LWN.net
LWN.net is a computing webzine with an emphasis on free software and software for Linux and other Unix-like operating systems. It consists of a weekly issue, separate stories which are published most days, and threaded discussion attached to ever ...
, May 28, 2015, by Josh Berkus
Asynchronous DRAM Refresh (ADR) SNIA, January 2014 (applies to DRAM as well)
Twizzler: An Operating System for Next-Generation Memory Hierarchies University of California, Santa Cruz
The University of California, Santa Cruz (UC Santa Cruz or UCSC) is a public university, public Land-grant university, land-grant research university in Santa Cruz, California. It is one of the ten campuses in the University of California syste ...
Technical Report UCSC-SSRC-17-01, December 5, 2017, by Daniel Bittman, Matt Bryson, Yuanjiang Ni, Arjun Govindjee, Isaak Cherdak, Pankaj Mehra, Darrell D. E. Long, and Ethan L. Miller
Computer file systems
Persistence frameworks