A Template for Implementing Fast Lock-free Trees Using HTM

Trevor Brown
{"title":"A Template for Implementing Fast Lock-free Trees Using HTM","authors":"Trevor Brown","doi":"10.1145/3087801.3087834","DOIUrl":null,"url":null,"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.","PeriodicalId":324970,"journal":{"name":"Proceedings of the ACM Symposium on Principles of Distributed Computing","volume":"120 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the ACM Symposium on Principles of Distributed Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3087801.3087834","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

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.
一个使用HTM实现快速无锁树的模板
使用硬件事务性内存(HTM)的算法必须提供仅限软件的回退路径以保证进度。回退路径的设计会对性能产生深远的影响。如果允许回退路径与硬件事务并发运行,则必须对硬件事务进行检测,这会增加大量开销。否则,硬件事务必须等待后备路径上的任何进程,从而导致并发瓶颈,或者转移到后备路径。我们介绍了一种结合了这两个世界最好的方法。关键思想是使用三条执行路径:一条HTM快速路径、一条HTM中间路径和一条软件回退路径,这样中间路径就可以与另外两条路径并行运行。快速路径和回退路径不能并发运行,因此快速路径不会产生检测开销。此外,快速路径事务可以移动到中间路径,而不是等待或移动到软件路径。我们通过生成Brown等人的树更新模板的加速版本来演示我们的方法,该模板可用于实现基于下树的快速无锁数据结构。我们使用加速模板来实现两个无锁树:二叉搜索树(BST)和(a,b)-树(b -树的泛化)。实验表明,在72个并发进程的情况下,我们的加速($a,b$)树每秒执行的操作是使用原始树更新模板获得的实现的4.0到4.2倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信