Association For Computing Machinery
rafaelhardeman đã chỉnh sửa trang này 2 tuần trước cách đây


Often confused with non-volatile random-entry memory (NVRAM), persistent memory is as a substitute more closely linked to the concept of persistence in its emphasis on program state that exists exterior the fault zone of the process that created it. A course of is a program beneath execution. Efficient, memory-like access is the defining characteristic of persistent memory. It can be supplied utilizing microprocessor memory instructions, such as load and store. It will also be offered using APIs that implement distant direct memory access (RDMA) actions, such as RDMA read and RDMA write. Persistent memory capabilities lengthen beyond non-volatility of stored bits. For example, the lack of key metadata, akin to page table entries or different constructs that translate virtual addresses to physical addresses, Memory Wave clarity support might render durable bits non-persistent. On this respect, persistent memory resembles more summary forms of pc storage, equivalent to file programs. In reality, almost all current persistent Memory Wave clarity support applied sciences implement at the least a basic file system that can be utilized for associating names or identifiers with saved extents, Memory Wave clarity support and at a minimum present file system methods that can be used for naming and allocating such extents.


The learn-of-non-persistent-write problem is discovered for lock-free applications on persistent memory. As examine-and-swap (CAS) operations don't persist the written values to persistent memory, the modified information will be made seen by the cache coherence protocol to a concurrent observer before the modified knowledge could be noticed by a crash observer at persistent memory. If a power failure happens right after the write is made visible but not yet persistent, the learn-of-non-persistent-write problem can occur, i.e., a knowledge variable that is modified by a examine-and-swap operation might be made seen to a concurrent observer before a crash observer, inflicting potential crash inconsistencies. As an instance the problem: for a singly linked lock-free checklist, a node can be inserted by a producer thread A after the head node, the following pointer of the pinnacle node gets atomically switched (CAS) to level to the brand new node A, Memory Wave however, this CAS is not persisted. Then, one other node gets inserted by producer thread B after node A, as CAS for node A is already seen to all concurrent threads.


CAS atomically switches the following pointer of node A to point to node B, and this CAS will get persisted. If a power failure happens at this level, the application that makes use of the linked record can be left in an inconsistent state, with each node A and node B misplaced, as the subsequent pointer from the head node to node A has not been persisted. As node B has been printed but can’t be accessed after a reboot, and other data might have been persisted that are accessed via or dependent on node B, all subsequent accesses to such data will not be possible, inflicting data loss. The read-of-non-persistent-write downside shouldn't be limited to lock-free linked lists, it can be present in any lock-free information buildings where the potential gap between concurrent visibility and persistent visibility can exist.