Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2312005.2312015acmconferencesArticle/Chapter ViewAbstractPublication PagesspaaConference Proceedingsconference-collections
research-article

Design, verification and applications of a new read-write lock algorithm

Published: 25 June 2012 Publication History

Abstract

Coordination and synchronization of parallel tasks is a major source of complexity in parallel programming. These constructs take many forms in practice including directed barrier and point-to-point synchronizations, termination detection of child tasks, and mutual exclusion in accesses to shared resources.
A read-write lock is a synchronization primitive that supports mutual exclusion in cases when multiple reader threads are permitted to enter a critical section concurrently (read-lock), but only a single writer thread is permitted in the critical section (write-lock). Although support for reader threads increases ideal parallelism, the read-lock functionality typically requires additional mechanisms, including expensive atomic operations, to handle multiple readers. It is not uncommon to encounter cases in practice where the overhead to support read-lock operations overshadows the benefits of concurrent read accesses, especially for small critical sections.
In this paper, we introduce a new read-write lock algorithm that reduces this overhead compared to past work. The correctness of the algorithm, including deadlock freedom, is established by using the Java Pathfinder model checker. We also show how the read-write lock primitive can be used to support high-level language constructs such as object-level isolation in Habanero-Java (HJ).
Experimental results for a read-write microbenchmark and a concurrent SortedLinkedList benchmark demonstrate that a Java-based implementation of the proposed read-write lock algorithm delivers higher scalability on multiple platforms than existing read-write lock implementations, including ReentrantReadWriteLock from the java.util.concurrent library.

References

[1]
T. E. Anderson. The performance of spin lock alternatives for shared-memory multiprocessors. In Proc. IEEE Int'l. Parallel and Distributed Processing Symp. (IPDPS), January 1990.
[2]
T. Craig. Building FIFO and priority-queueing spin locks from atomic swap. In Technical Report TR 93-02-02. University of Washington Dept. of Computer Science, 1993.
[3]
D. Dice. Brief announcement: A partitioned ticket lock. In SPAA '11: Proceedings of the 23rd annual ACM symposium on parallelism in algorithms and architectures, New York, NY, USA, 2011. ACM.
[4]
M. Frigo, C. E. Leiserson, and K. H. Randall. The implementation of the Cilk-5 multithreaded language. In PLDI '98: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, pages 212--223, New York, NY, USA, 1998. ACM.
[5]
Y. Guo, R. Barik, R. Raman, and V. Sarkar. Work-first and help-first scheduling policies for async-finish task parallelism. In IPDPS '09: Proceedings of the 2009 IEEE International Symposium on Parallel & Distributed Processing, pages 1--12, Washington, DC, USA, May 2009. IEEE Computer Society.
[6]
Habanero Java (HJ) Project. http://habanero.rice.edu/hj, 2009.
[7]
M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer III. Software transactional memory for dynamic-sized data structures. In PODC '03: Proceedings of the twenty-second annual symposium on Principles of distributed computing, pages 92--101, New York, NY, USA. 2003. ACM Press.
[8]
K. Kim, T. Yavuz-Kahveci, and B. A. Sanders. Precise data race detection in a relaxed memory model using heuristic-based model checking. In Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, ASE '09, pages 495--499, Washington, DC, USA, 2009. IEEE Computer Society.
[9]
J. R. Larus and R. Rajwar. Transactional Memory. Morgan & Claypool, 2006.
[10]
R. Lublinerman, J. Zhao, Z. Budimli\'c, S. Chaudhuri, and V. Sarkar. Delegated Isolation. In OOPSLA '11: Proceedings of the 26th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, 2011.
[11]
J. Mellor-Crummey and M. Scott. Algorithms for Scalable Synchronization on Shared Memory Multiprocessors. ACM Transactions on Computer Systems, 9(1):21--65, February 1991.
[12]
NASA Ames Research Center. JPF developer guide: On-the-fly partial order reduction. http://babelfish.arc.nasa.gov/trac/jpf/wiki/devel/partial_order_reduction, 2009.
[13]
T. Peierls, J. Bloch, J. Bowbeer, D. Lea, and D. Holmes. Java Concurrency in Practice. Addison-Wesley Professional, 2006.
[14]
W. Pugh. JSR-133: Java memory model and thread specification. http://www.jcp.org/en/jsr/detail?id=133, August 2004.
[15]
V. Sarkar, W. Harrod, and A. E. Snavely. Software Challenges in Extreme Scale Systems. January 2010. Special Issue on Advanced Computing: The Roadmap to Exascale.
[16]
J. Shirako et al. Phasers: a unified deadlock-free construct for collective and point-to-point synchronization. In ICS '08: Proceedings of the 22nd annual international conference on Supercomputing, pages 277--288, New York, NY, USA, 2008. ACM.
[17]
S. Tasirlar and V. Sarkar. Data-Driven Tasks and their Implementation. In ICPP'11: Proceedings of the International Conference on Parallel Processing, Sep 2011.
[18]
W. Visser, K. Havelund, G. Brat, S. Park, and F. Lerda. Model checking programs. Automated Software Engg., 10:203--232, April 2003.

Cited By

View all
  • (2024)Performant almost-latch-free data structures using epoch protection in more depthThe VLDB Journal10.1007/s00778-024-00859-8Online publication date: 17-Jun-2024
  • (2023)Leaf: Modularity for Temporary Sharing in Separation LogicProceedings of the ACM on Programming Languages10.1145/36227987:OOPSLA2(31-58)Online publication date: 16-Oct-2023
  • (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
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SPAA '12: Proceedings of the twenty-fourth annual ACM symposium on Parallelism in algorithms and architectures
June 2012
348 pages
ISBN:9781450312134
DOI:10.1145/2312005
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: 25 June 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. model checking
  2. mutual exclusion
  3. readers-writers locks

Qualifiers

  • Research-article

Conference

SPAA '12

Acceptance Rates

Overall Acceptance Rate 447 of 1,461 submissions, 31%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)3
Reflects downloads up to 18 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Performant almost-latch-free data structures using epoch protection in more depthThe VLDB Journal10.1007/s00778-024-00859-8Online publication date: 17-Jun-2024
  • (2023)Leaf: Modularity for Temporary Sharing in Separation LogicProceedings of the ACM on Programming Languages10.1145/36227987:OOPSLA2(31-58)Online publication date: 16-Oct-2023
  • (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
  • (2019)BRAVOProceedings of the 2019 USENIX Conference on Usenix Annual Technical Conference10.5555/3358807.3358835(315-328)Online publication date: 10-Jul-2019
  • (2019)Formal Modelling and Verification of Spinlocks at Instruction Level2019 26th Asia-Pacific Software Engineering Conference (APSEC)10.1109/APSEC48747.2019.00055(355-362)Online publication date: Dec-2019
  • (2018)Queue Delegation LockingIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2017.276704629:3(687-704)Online publication date: 1-Mar-2018
  • (2014)Savina - An Actor Benchmark SuiteProceedings of the 4th International Workshop on Programming based on Actors Agents & Decentralized Control10.1145/2687357.2687368(67-80)Online publication date: 20-Oct-2014
  • (2013)NUMA-aware reader-writer locksACM SIGPLAN Notices10.1145/2517327.244253248:8(157-166)Online publication date: 23-Feb-2013
  • (2013)NUMA-aware reader-writer locksProceedings of the 18th ACM SIGPLAN symposium on Principles and practice of parallel programming10.1145/2442516.2442532(157-166)Online publication date: 23-Feb-2013

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