Tianzheng Wang (Simon Fraser University)
“Building lock-free data structures for persistent memory (PM) requires extra efforts in handling crash consistency, race conditions and memory management issues. This requires support from new PM programming libraries. One of them is the persistent multi-word compare-and-swap (PMwCAS): it allows programmers to atomically change multiple 8-byte words in PM with crash consistency guarantees. PMwCAS potentially eases the making of lock-free data structures in PM and frees programmers from handling various race conditions explicitly.
Recently, we implemented the BzTree—a new persistent, lock-free B+-tree based on PMwCAS. We integrated PMwCAS and PMDK to properly handle persistent memory management, and found that despite PMwCAS does ease the handling of race conditions and crash consistency, and with the help of PMDK it also eases the handling of durability, our experience showed a number of new restrictions and pitfalls these PM libraries may impose, that may potentially render the BzTree even harder to implement.
The presentation will start with the background of our work on implementing the BzTree using PMwCAS. Then we will show what the actual code looks like in our implementation and highlight the caveats and pitfalls new PM libraries may impose on the data structure, and summarize the lessons learned and future directions.”
Slides: https://pirl.nvsl.io/PIRL2019-content/PIRL-2019-Tianzheng-Wang.pdf