skip to main content
10.1145/571825.571830acmconferencesArticle/Chapter ViewAbstractPublication PagespodcConference Proceedingsconference-collections
Article

Non-blocking timeout in scalable queue-based spin locks

Published: 21 July 2002 Publication History

Abstract

Queue-based spin locks allow programs with busy-wait synchronization to scale to very large multiprocessors, without fear of starvation or performance-destroying contention. Timeout-capable spin locks allow a thread to abandon its attempt to acquire a lock; they are used widely in real-time systems to avoid overshooting a deadline, and in database systems to recover from transaction deadlock and to tolerate preemption of the thread that holds a lock.In previous work we showed how to incorporate timeout in scalable queue-based locks. Technological trends suggest that this combination will be of increasing commercial importance. Our previous solutions, however, require a thread that is timing out to handshake with its neighbors in the queue, a requirement that may lead to indefinite delay in a preemptively multiprogrammed system.In the current paper we present new queue-based locks in which the timeout code is non-blocking. These locks sacrifice the constant worst-case space per thread of our previous algorithms, but allow us to bound the time that a thread may be delayed by preemption of its peers. We present empirical results indicating that space needs are modest in practice, and that performance scales well to large machines. We also conjecture that constant per-thread space cannot be guaranteed together with non-blocking timeout in a queue-based lock.

References

[1]
A. Agarwal, R. Bianchini, D. Chaiken, K. Johnson, D. Kranz, J. Kubiatowicz, B.-H. Lim, K. Mackenzie, and D. Yeung. The MIT Alewife machine: Architecture and performance. In 22nd Intl. Symp. on Computer Architecture, pages 2-13, Santa Margherita Ligure, Italy, Jun. 1995.
[2]
T. E. Anderson. The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Transactions on Parallel and Distributed Systems, 1(1):6-16, Jan. 1990.
[3]
T. E. Anderson, B. N. Bershad, E. D. Lazowska, and H. M. Levy. Scheduler activations: Effective kernel support for the user-level management of parallelism. ACM Transactions on Computer Systems, 10:53-79, Feb. 1992.
[4]
D. L. Black. Scheduling support for concurrency and parallelism in the Mach operating system. Computer, 23(5):35-43, May 1990.
[5]
T. S. Craig. Building FIFO and priority-queueing spin locks from atomic swap. Technical Report TR 93-02-02, Department of Computer Science, University of Washington, Feb. 1993.
[6]
J. Edler, J. Lipkis, and E. Schonberg. Process management for highly parallel UNIX systems. In USENIX Workshop on Unix and Supercomputers, pages 1-17, Pittsburgh, PA, Sep. 1988.
[7]
G. Graunke and S. Thakkar. Synchronization algorithms for shared-memory multiprocessors. Computer, 23(6):60-69, Jun. 1990.
[8]
M. Herlihy. Personal communication, Oct. 2001.
[9]
A. R. Karlin, K. Li, M. S. Manasse, and S. Owicki. Empirical studies of competitive spinning for a shared-memory multiprocessor. In 13th ACM Symp. on Operating Systems Principles, pages 41-55, Pacific Grove, CA, Oct. 1991.
[10]
L. I. Kontothanassis, R. W. Wisniewski, and M. L. Scott. Scheduler-conscious synchronization. ACM Transactions on Computer Systems, 15(1):3-40, Feb. 1997.
[11]
S. Kumar, D. Jiang, R. Chandra, and J. P. Singh. Evaluating synchronization on shared address space multiprocessors: Methodology and performance. In SIGMETRICS Intl. Conf. on Measurement and Modeling of Computer Systems, pages 23-34, Atlanta, GA, May 1999.
[12]
B.-H. Lim and A. Agarwal. Reactive synchronization algorithms for multiprocessors. In 6th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, pages 25-35, San Jose, CA, Oct. 1994.
[13]
V. Luchangco. Personal communication, Jan. 2002.
[14]
P. Magnussen, A. Landin, and E. Hagersten. Queue locks on cache coherent multiprocessors. In 8th Intl. Parallel Processing Symposium, pages 165-171, Cancun, Mexico, Apr. 1994. Expanded version available as "Efficient Software Synchronization on Large Cache Coherent Multiprocessors", SICS Research Report T94:07, Swedish Inst. of Computer Science, Feb. 1994.
[15]
B. D. Marsh, M. L. Scott, T. J. LeBlanc, and E. P. Markatos. First-class user-level threads. In 13th ACM Symp. on Operating Systems Principles, pages 110-121, Pacific Grove, CA, Oct. 1991.
[16]
J. M. Mellor-Crummey and M. L. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991.
[17]
J. K. Ousterhout. Scheduling techniques for concurrent systems. In 3rd Intl. Conf. on Distributed Computing Systems, pages 22-30, Miami/Ft. Lauderdale, FL, Oct. 1982.
[18]
M. L. Scott. Non-blocking timeout in scalable queue-based spin locks. Technical Report TR 773, Department of Computer Science, University of Rochester, Feb. 2002. Available at http://www.cs.rochester.edu/trs/systems-trs.html.
[19]
M. L. Scott and W. N. Scherer III. Scalable queue-based spin locks with timeout. In 8th ACM Symp. on Principles and Practice of Parallel Programming, pages 44-52, Snowbird, UT, Jun. 2001.
[20]
R. C. Unrau, O. Krieger, B. Gamsa, and M. Stumm. Hierarchical clustering: A structure for scalable multiprocessor operating system design. The Journal of Supercomputing, 9(1/2):105-134, 1995.

Cited By

View all
  • (2023)Protecting Locks Against Unbalanced Unlock()Proceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591091(199-211)Online publication date: 17-Jun-2023
  • (2022)A Fast Wait-Free Multi-Producers Single-Consumer QueueProceedings of the 23rd International Conference on Distributed Computing and Networking10.1145/3491003.3491004(77-86)Online publication date: 4-Jan-2022
  • (2022)Recoverable mutual exclusion with abortabilityComputing10.1007/s00607-022-01105-1104:10(2225-2252)Online publication date: 18-Aug-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PODC '02: Proceedings of the twenty-first annual symposium on Principles of distributed computing
July 2002
307 pages
ISBN:1581134851
DOI:10.1145/571825
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 July 2002

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. scalability
  2. spin locks
  3. synchronization
  4. timeout

Qualifiers

  • Article

Conference

PODC02
Sponsor:
PODC02: Principles of Distributed Computing
July 21 - 24, 2002
California, Monterey

Acceptance Rates

PODC '02 Paper Acceptance Rate 43 of 149 submissions, 29%;
Overall Acceptance Rate 740 of 2,477 submissions, 30%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Protecting Locks Against Unbalanced Unlock()Proceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591091(199-211)Online publication date: 17-Jun-2023
  • (2022)A Fast Wait-Free Multi-Producers Single-Consumer QueueProceedings of the 23rd International Conference on Distributed Computing and Networking10.1145/3491003.3491004(77-86)Online publication date: 4-Jan-2022
  • (2022)Recoverable mutual exclusion with abortabilityComputing10.1007/s00607-022-01105-1104:10(2225-2252)Online publication date: 18-Aug-2022
  • (2021)Deterministic Constant-Amortized-RMR Abortable Mutex for CC and DSMACM Transactions on Parallel Computing10.1145/34905598:4(1-26)Online publication date: 9-Dec-2021
  • (2021)SynCron: Efficient Synchronization Support for Near-Data-Processing Architectures2021 IEEE International Symposium on High-Performance Computer Architecture (HPCA)10.1109/HPCA51647.2021.00031(263-276)Online publication date: Feb-2021
  • (2020)Efficient Abortable-locking Protocol for Multi-level NUMA SystemsACM Transactions on Parallel Computing10.1145/33997287:3(1-32)Online publication date: 10-Jul-2020
  • (2019)Scalable and practical locking with shufflingProceedings of the 27th ACM Symposium on Operating Systems Principles10.1145/3341301.3359629(586-599)Online publication date: 27-Oct-2019
  • (2019)Constant Amortized RMR Abortable Mutex for CC and DSMProceedings of the 2019 ACM Symposium on Principles of Distributed Computing10.1145/3293611.3331592(167-176)Online publication date: 16-Jul-2019
  • (2019)Recoverable Mutual Exclusion with AbortabilityNetworked Systems10.1007/978-3-030-31277-0_14(217-232)Online publication date: 14-Sep-2019
  • (2018)Deterministic Abortable Mutual Exclusion with Sublogarithmic Adaptive RMR ComplexityProceedings of the 2018 ACM Symposium on Principles of Distributed Computing10.1145/3212734.3212759(27-36)Online publication date: 23-Jul-2018
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media