Empirical studies of competitve spinning for a shared-memory multiprocessor

Anna R. Karlin, Kai Li, Mark S. Manasse, Susan Owicki

Research output: Chapter in Book/Report/Conference proceedingConference contribution

82 Scopus citations

Abstract

A common operation in multiprocessor programs is acquiring a lock to protect access to shared data. Typically, the requesting thread is blocked if the lock it needs is held by another thread. The cost of blocking one thread and activating another can be a substantial part of program execution time. Alternatively, the thread could spin until the lock is free, or spin for a while and then block. This may avoid context-switch overhead, but processor cycles may be wasted in unproductive spinning. This paper studies seven strategies for determining whether and how long to spin before blocking. Of particular interest are competitive strategies, for which the performance can be shown to be no worse than some constant factor times an optimal off-line strategy. The performance of five competitive strategies is compared with that of always blocking, always spinning, or using the optimal off-line algorithm. Measurements of lock-waiting time distributions for five parallel programs were used to compare the cost of synchronization under all the strategies. Additional measurements of elapsed time for some of the programs and strategies allowed assessment of the impact of synchronization strategy on overall program performance. Both types of measurements indicate that the standard blocking strategy performs poorly compared to mixed strategies. Among the mixed strategies studied, adaptive algorithms perform better than non-adaptive ones.

Original languageEnglish (US)
Title of host publicationProceedings of the 13th ACM Symposium on Operating Systems Principles, SOSP 1991
Pages41-55
Number of pages15
DOIs
StatePublished - Dec 1 1991
Event13th ACM Symposium on Operating Systems Principles, SOSP 1991 - Pacific Grove, CA, United States
Duration: Oct 13 1991Oct 16 1991

Publication series

NameProceedings of the 13th ACM Symposium on Operating Systems Principles, SOSP 1991

Other

Other13th ACM Symposium on Operating Systems Principles, SOSP 1991
CountryUnited States
CityPacific Grove, CA
Period10/13/9110/16/91

All Science Journal Classification (ASJC) codes

  • Software

Fingerprint Dive into the research topics of 'Empirical studies of competitve spinning for a shared-memory multiprocessor'. Together they form a unique fingerprint.

  • Cite this

    Karlin, A. R., Li, K., Manasse, M. S., & Owicki, S. (1991). Empirical studies of competitve spinning for a shared-memory multiprocessor. In Proceedings of the 13th ACM Symposium on Operating Systems Principles, SOSP 1991 (pp. 41-55). (Proceedings of the 13th ACM Symposium on Operating Systems Principles, SOSP 1991). https://doi.org/10.1145/121132.286599