Detectable Data Structures for Persistent Memory
Loading...
Date
2021-05-14
Authors
Li, Nan
Advisor
Golab, Wojciech
Journal Title
Journal ISSN
Volume Title
Publisher
University of Waterloo
Abstract
Persistent memory is a byte-addressable and durable storage medium that provides both performance benefits of main memory and durability of secondary storage. It is possible for a data structure to recover near-instantly after a system failure by accessing recovery data directly in persistent memory through memory operations. A variety of researches have been working on building persistent data structures for persistent memory. Some persistent data structures are said to be detectable, which means they can tell whether the last operation invoked before crash took effect or not. In this thesis, I propose an abstract data type DetectableT with its sequential specification, which can be composed with a base data type to make the base data type detectable. To show how to design detectable data structures based on DetectableT, a detectable lock-free queue algorithm called Detectable Queue, which composes DetectableT with Queue, is presented. One difficulty in the implementation of Detectable Queue is to get the result of a compare-and-swap (CAS) operation after a crash since the result of CAS is stored in volatile CPU registers. To help detectable data structures handle this common problem, I provide a synchronization primitive called CASWithEffect, which executes a CAS operation and stores the result into persistent memory atomically using private variables. With CASWithEffect, another detectable queue algorithm called CASWithEfffect Queue is provided as a substitute for Detectable Queue with a simpler design. Regarding correctness, I prove that both Detectable Queue and CASWithEffect satisfy strict linearizability. The data structure implementations are evaluated using Intel Optane Persistent memory. I compare both Detectable Queue and CasWithEffect queue with another queue algorithm - Log Queue. The result shows that Detectable Queue has the best performance.