首页    期刊浏览 2024年12月03日 星期二
登录注册

文章基本信息

  • 标题:Efficient Multi-Word Compare and Swap
  • 本地全文:下载
  • 作者:Rachid Guerraoui ; Alex Kogan ; Virendra J. Marathe
  • 期刊名称:LIPIcs : Leibniz International Proceedings in Informatics
  • 电子版ISSN:1868-8969
  • 出版年度:2020
  • 卷号:179
  • 页码:1-19
  • DOI:10.4230/LIPIcs.DISC.2020.4
  • 出版社:Schloss Dagstuhl -- Leibniz-Zentrum fuer Informatik
  • 摘要:Atomic lock-free multi-word compare-and-swap (MCAS) is a powerful tool for designing concurrent algorithms. Yet, its widespread usage has been limited because lock-free implementations of MCAS make heavy use of expensive compare-and-swap (CAS) instructions. Existing MCAS implementations indeed use at least 2k 1 CASes per k-CAS. This leads to the natural desire to minimize the number of CASes required to implement MCAS. We first prove in this paper that it is impossible to "pack" the information required to perform a k-word CAS (k-CAS) in less than k locations to be CASed. Then we present the first algorithm that requires k 1 CASes per call to k-CAS in the common uncontended case. We implement our algorithm and show that it outperforms a state-of-the-art baseline in a variety of benchmarks in most considered workloads. We also present a durably linearizable (persistent memory friendly) version of our MCAS algorithm using only 2 persistence fences per call, while still only requiring k 1 CASes per k-CAS.
  • 关键词:lock-free; multi-word compare-and-swap; persistent memory
国家哲学社会科学文献中心版权所有