Towards an Ideal Queue Lock

被引:1
|
作者
Jayanti, Prasad [1 ]
Jayanti, Siddhartha [2 ]
Jayanti, Sucharita [1 ]
机构
[1] Dartmouth Coll, Hanover, NH 03755 USA
[2] MIT, Cambridge, MA 02139 USA
关键词
mutual exclusion; concurrent algorithm; queue lock; distributed computing; RMR; SYNCHRONIZATION; ALGORITHMS;
D O I
10.1145/3369740.3369784
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
The MCS lock was the first mutual exclusion lock to support an arbitrary number of processes with unknown identities such that each process can acquire and release the lock in a constant number of RMRs on both Cache-Coherent and Distributed Shared Memory multiprocessors. The MCS algorithm, however, has a shortcoming: its Exit section is not bounded. The algorithm also requires hardware support for more than one special instruction, namely, Fetch&Store and Compare&Swap. Many MCS-style algorithms were subsequently designed to overcome these shortcomings, but to the best of our knowledge they either lack some desirable property of the MCS lock or introduce a new shortcoming. In this paper we present a new MCS-style algorithm that has all of the desirable properties and no ostensible shortcoming. We also provide a rigorous, invariant-based proof of correctness. To realize a bounded Exit section, all prior MCS-style algorithms use either the "node-switching" or the "node-toggling" strategy. Our work unifies these two strategies: we present a single algorithm which, when appropriately instantiated, yields both a node-switching and a node-toggling algorithm. Moreover, the two algorithms so derived are the simplest in their respective classes among all known MCS-style algorithms.
引用
收藏
页数:10
相关论文
共 50 条
  • [1] A hierarchical CLH queue lock
    Luchangco, Victor
    Nussbaum, Dan
    Shavit, Nir
    [J]. EURO-PAR 2006 PARALLEL PROCESSING, 2006, 4128 : 801 - 810
  • [2] BQ: A Lock-Free Queue with Batching
    Milman, Gal
    Kogan, Alex
    Lev, Yossi
    Luchangco, Victor
    Petrank, Erez
    [J]. SPAA'18: PROCEEDINGS OF THE 30TH ACM SYMPOSIUM ON PARALLELISM IN ALGORITHMS AND ARCHITECTURES, 2018, : 99 - 109
  • [3] A Portable Lock-Free Bounded Queue
    Pirkelbauer, Peter
    Milewicz, Reed
    Felipe Gonzalez, Juan
    [J]. ALGORITHMS AND ARCHITECTURES FOR PARALLEL PROCESSING, ICA3PP 2016, 2016, 10048 : 55 - 73
  • [4] BQ: A Lock-Free Queue with Batching
    Milman-Sela, Gal
    Kogan, Alex
    Lev, Yossi
    Luchangco, Victor
    Petrank, Erez
    [J]. ACM TRANSACTIONS ON PARALLEL COMPUTING, 2022, 9 (01)
  • [5] On the distribution of queue length in ideal links
    Daubner, Jakub
    Klimo, Martin
    Papan, Jozef
    Smiesko, Juraj
    Such, Ondrej
    [J]. CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2020, 32 (13):
  • [6] A Memory Efficient Lock-Free Circular Queue
    Miniskar, Narasinga Rao
    Liu, Frank
    Vetter, Jeffrey S.
    [J]. 2021 IEEE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS (ISCAS), 2021,
  • [7] CBPQ: High Performance Lock-Free Priority Queue
    Braginsky, Anastasia
    Cohen, Nachshon
    Petrank, Erez
    [J]. EURO-PAR 2016: PARALLEL PROCESSING, 2016, 9833 : 460 - 474
  • [8] Formal verification of a practical lock-free queue algorithm
    Doherty, S
    Groves, L
    Luchangco, V
    Moir, M
    [J]. FORMAL TECHNIQUES FOR NETWORKED AND DISTRIBUTED SYSTEMS - FORTE 2004, PROCEEDINGS, 2004, 3235 : 97 - 114
  • [9] A Lock-Free, Array-Based Priority Queue
    Liu, Yujie
    Spear, Michael
    [J]. ACM SIGPLAN NOTICES, 2012, 47 (08) : 323 - 324
  • [10] Modeling Energy Consumption of Lock-Free Queue Implementations
    Atalar, Aras
    Gidenstam, Anders
    Renaud-Goud, Paul
    Tsigas, Philippas
    [J]. 2015 IEEE 29TH INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM (IPDPS), 2015, : 229 - 238