Scalable queue-based spin locks with timeout

被引:24
|
作者
Scott, ML [1 ]
Scherer, WN [1 ]
机构
[1] Univ Rochester, Dept Comp Sci, Rochester, NY 14627 USA
关键词
D O I
10.1145/568014.379566
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Queue-based spin locks allow programs with busy-wait synchronization to scale to very large multiprocessors, without fear of starvation or performance-destroying contention. So-called try locks, traditionally based on non-scalable test-and-set locks, allow a process to abandon its attempt to acquire a lock after a given amount of time. The process can then pursue an alternative code path, or yield the processor to some other process. We demonstrate that it is possible to obtain both scalability and bounded waiting, using variants of the queue-based locks of Craig, Landin, and Hagersten, and of Mellor-Crummey and Scott. A process that decides to stop waiting for one of these new locks can "link itself out of line" atomically. Single-processor experiments reveal performance penalties of 50-100% for the CLH and MCS try locks in comparison to their standard versions, this marginal cost decreases with larger numbers of processors. We have also compared our queue-based locks to a. traditional test-and-test;-and-set lock with exponential backoff and timeout. At modest (non-zero) levels of contention, the queued locks sacrifice cache locality for fairness, resulting in a worst-case 3X performance penalty. At high levels of contention, however, they display a 1.5-2X performance advantage, with significantly more regular timings and significantly higher rates of acquisition prior to timeout.
引用
收藏
页码:44 / 52
页数:9
相关论文
共 50 条
  • [1] Preemption adaptivity in time-published queue-based spin locks
    He, BJ
    Scherer, WN
    Scott, ML
    HIGH PERFORMANCE COMPUTING - HIPC 2005, PROCEEDINGS, 2005, 3769 : 7 - 18
  • [2] High-Efficient Queue-Based Spin Locks for Network-on-Chip Processors
    Wei, Zhenqi
    Liu, Peilin
    Sun, Rongdi
    Ying, Rendong
    2014 IEEE ASIA PACIFIC CONFERENCE ON CIRCUITS AND SYSTEMS (APCCAS), 2014, : 260 - 263
  • [3] Recovering scalable spin locks
    Bohannon, P
    Lieuwen, D
    Silberschatz, A
    EIGHTH IEEE SYMPOSIUM ON PARALLEL AND DISTRIBUTED PROCESSING, PROCEEDINGS, 1996, : 314 - 322
  • [4] Spin-Then-Sleep: A Machine Learning Alternative to Queue-based Spin-then-Block Strategy
    Ganjaliyev, Fadai
    INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2019, 10 (03) : 605 - 609
  • [5] Compiler for queue-based distributed processes
    Sinan, Akman, M.
    Tolun, M.R.
    Advances in Modelling & Simulation, 1991, 24 (04): : 43 - 52
  • [6] QUEUE-BASED PRIMITIVES FOR A MULTITHREADED ARCHITECTURE
    FAN, XM
    MICROPROCESSING AND MICROPROGRAMMING, 1992, 34 (1-5): : 113 - 116
  • [7] Understanding the Performance Impact of Queue-Based Resource Allocation in Scalable Disaggregated Memory Systems
    Puri, Amit
    Banerjee, Abir
    Jose, John
    Venkatesh, Tamarapalli
    2023 IEEE 16TH INTERNATIONAL SYMPOSIUM ON EMBEDDED MULTICORE/MANY-CORE SYSTEMS-ON-CHIP, MCSOC, 2023, : 317 - 324
  • [8] Queue-based analysis of DoS attacks
    Khan, S
    Traore, I
    PROCEEDINGS FROM THE SIXTH ANNUAL IEEE SYSTEMS, MAN AND CYBERNETICS INFORMATION ASSURANCE WORKSHOP, 2005, : 266 - 273
  • [9] Queue-Based and Adaptive Lock Algorithms for Scalable Resource Allocation on Shared-Memory Multiprocessors
    Zhang, Deli
    Lynch, Brendan
    Dechev, Damian
    INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2015, 43 (05) : 721 - 751
  • [10] Delay Optimal Queue-based CSMA
    Shah, Devavrat
    Shin, Jinwoo
    SIGMETRICS 2010: PROCEEDINGS OF THE 2010 ACM SIGMETRICS INTERNATIONAL CONFERENCE ON MEASUREMENT AND MODELING OF COMPUTER SYSTEMS, 2010, 38 (01): : 373 - 374