Font Size: a A A

Techniques for Constructing Efficient Lock-Free Data Structure

Posted on:2018-07-15Degree:Ph.DType:Dissertation
University:University of Toronto (Canada)Candidate:Brown, TrevorFull Text:PDF
GTID:1478390020957651Subject:Computer Science
Abstract/Summary:
Building a library of concurrent data structures is an essential way to simplify the difficult task of developing concurrent software. Lock-free data structures, in which processes can help one another to complete operations, offer the following progress guarantee: If processes take infinitely many steps, then infinitely many operations are performed. Handcrafted lock-free data structures can be very efficient, but are notoriously difficult to implement. We introduce numerous tools that support the development of efficient lock-free data structures, and especially trees.;We address the difficulty of using single-word compare-and-swap (CAS) to develop lock-free graph-based data structures by introducing multiword synchronization primitives called LLX and SCX. These primitives fall between multi-compare-single-swap and full multiword-CAS in expressiveness, and can be implemented much more efficiently than multiword-CAS. We use them to implement a tree update template that can be followed to produce lock-free implementations of arbitrary updates in down-trees, and use this template to produce the first lock-free implementations of several advanced trees: chromatic search trees, relaxed AVL trees, and relaxed (a,b)-trees. We also introduce a new variant of a B-tree, called a relaxed B-slack tree, which has significantly better worst-case space complexity, and produce a lock-free implementation using our template.;In these implementations, operations dynamically allocate memory for nodes. Additionally, in our implementation of LLX and SCX, each SCX operation allocates a descriptor, which contains information that another process can use to help the SCX operation complete. These implementations must perform dynamic lock-free memory reclamation, but traditional lock-free memory reclamation algorithms are either inefficient or cannot be used with our implementations. So, we introduce a fast epoch-based reclamation (EBR) algorithm called DEBRA+, which is the first lock-free EBR algorithm that can be used with trees.;We also devise two techniques for accelerating lock-free data structure implementations. Using the first technique, we can efficiently eliminate dynamic allocation and reclamation of descriptors in SCX, and a large class of other algorithms. Using the second, we exploit hardware transactional memory support in modern processors to produce accelerated implementations of the template.
Keywords/Search Tags:Data, Lock-free, Implementations, SCX, Efficient, Memory, Using, Template
Related items