PMDK C++ bindings  1.13.0-git107.g7e59f08f
This is the C++ bindings documentation for PMDK's libpmemobj.
Synchronization Primitives

Persistent memory resident implementation of synchronization primitives. More...

Classes

class  pmem::obj::condition_variable
 Persistent memory resident condition variable. More...
 
class  pmem::obj::mutex
 Persistent memory resident mutex implementation. More...
 
class  pmem::obj::shared_mutex
 Persistent memory resident shared_mutex implementation. More...
 
class  pmem::obj::timed_mutex
 Persistent memory resident timed_mutex implementation. More...
 

Detailed Description

Persistent memory resident implementation of synchronization primitives.

In concurrent programming, we often require mechanisms for synchronizing access to shared resources. Typically to solve such issues we use synchronization primitives like mutexes and condition variables. As persistent memory offers bigger capacity than DRAM it may be useful to store synchronization primitives on it. Unfortunately such approach may cause performance degradation due to frequent writes to a memory with relatively higher latency (it's because taking a lock or signaling a conditional variable often requires additional writes). Few extra words how locks can be used in libpmemobj-cpp can be found in Transactions.

It's worth noticing that pmem locks are automatically released on recovery or when crash happened.

Additional resources