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
相关论文
共 9 条
  • [1] Anderson T. E., 1990, IEEE Transactions on Parallel and Distributed Systems, V1, P6, DOI 10.1109/71.80120
  • [2] Craig T., 1993, Technical Report. Technical Report TR 93-02-02
  • [3] SYNCHRONIZATION ALGORITHMS FOR SHARED-MEMORY MULTIPROCESSORS
    GRAUNKE, G
    THAKKAR, S
    [J]. COMPUTER, 1990, 23 (06) : 60 - 69
  • [4] Wildfire: A scalable path for SMPs
    Hagersten, E
    Koster, M
    [J]. FIFTH INTERNATIONAL SYMPOSIUM ON HIGH-PERFORMANCE COMPUTER ARCHITECTURE, PROCEEDINGS, 1999, : 172 - 181
  • [5] WAIT-FREE SYNCHRONIZATION
    HERLIHY, M
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1991, 13 (01): : 124 - 149
  • [6] Scheduler-conscious synchronization
    Kontothanassis, LI
    Wisniewski, RW
    Scott, ML
    [J]. ACM TRANSACTIONS ON COMPUTER SYSTEMS, 1997, 15 (01): : 3 - 40
  • [7] MAGNUSSEN P, 1994, 8 IPPS CANC MEX APR, P165
  • [8] ALGORITHMS FOR SCALABLE SYNCHRONIZATION ON SHARED-MEMORY MULTIPROCESSORS
    MELLORCRUMMEY, JM
    SCOTT, ML
    [J]. ACM TRANSACTIONS ON COMPUTER SYSTEMS, 1991, 9 (01): : 21 - 65
  • [9] ORATOVSKY V, 2000, COMMUNICATION FEB