A Template for Implementing Fast Lock-free Trees Using HTM
Loading...
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Association for Computing Machinery
Abstract
Algorithms that use hardware transactional memory (HTM) must provide a software-only fallback path to guarantee progress. The design of the fallback path can have a profound impact on performance. If the fallback path is allowed to run concurrently with hardware transactions, then hardware transactions must be instrumented, adding significant overhead. Otherwise, hardware transactions must wait for any processes on the fallback path, causing concurrency bottlenecks, or move to the fallback path. We introduce an approach that combines the best of both worlds. The key idea is to use three execution paths: an HTM fast path, an HTM middle path, and a software fallback path, such that the middle path can run concurrently with each of the other two. The fast path and fallback path do not run concurrently, so the fast path incurs no instrumentation overhead. Furthermore, fast path transactions can move to the middle path instead of waiting or moving to the software path. We demonstrate our approach by producing an accelerated version of the tree update template of Brown et al., which can be used to implement fast lock-free data structures based on down-trees. We used the accelerated template to implement two lock-free trees: a binary search tree (BST), and an (a,b)-tree (a generalization of a B-tree). Experiments show that, with 72 concurrent processes, our accelerated (a,b)-tree performs between 4.0x and 4.2x as many operations per second as an implementation obtained using the original tree update template.
Description
PODC 2017 author’s accepted manuscript, 10 pages. Copyright 2017 the author; publication rights licensed to ACM. This author version is posted for personal use and not for redistribution. Definitive Version of Record: https://doi.org/10.1145/3087801.3087834. Includes the 2-page accepted manuscript of “Brief Announcement: Faster Data Structures in Transactional Memory Using Three Paths,” DISC 2015, LNCS 9363, pp. 671–672, Springer Berlin Heidelberg; copyright 2015 Springer-Verlag Berlin Heidelberg. Final book: https://doi.org/10.1007/978-3-662-48653-5. Use of the brief manuscript is subject to Springer Nature’s accepted-manuscript terms: https://www.springernature.com/gp/open-research/policies/accepted-manuscript-terms. Also includes the 20-page expanded manuscript, arXiv:1708.04838v1 (2017), not separately peer reviewed. PDFs and existing notices unchanged; no new Creative Commons licence assigned.