Making Concurrent Algorithms Detectable
Non-volatile memory (NVM) promises persistent main memory that remains correct despite loss of power. This has sparked a line of research into algorithms that can recover from a system crash. Since caches are expected to remain volatile, concurrent data structures must be redesigned to guarantee that they are left in a consistent state after a system crash (durability), and that the execution can be continued upon recovery (detectability). However, the prospect of redesigning every concurrent data structure before it can be used in NVM architectures is daunting. In this paper, we give a general construction to convert any concurrent algorithm into one that is both durable and detectable. This construction is easy to apply to any algorithm, not requiring any understanding of the algorithm's semantics, and guarantees that the algorithm's structure and correctness are preserved. We also provide an optimized transformation that works for any normalized lock-free data structure, thus allowing more efficient durable and detectable constructions for a large class of algorithms. Lastly, we present the first formal definition of detectability, and show that any detectable algorithm can be safely used inside our transformations.
READ FULL TEXT