skip to main content
research-article

Commutativity race detection

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

This paper introduces the concept of a commutativity race. A commutativity race occurs in a given execution when two library method invocations can happen concurrently yet they do not commute. Commutativity races are an elegant concept enabling reasoning about concurrent interaction at the library interface.

We present a dynamic commutativity race detector. Our technique is based on a novel combination of vector clocks and a structural representation automatically obtained from a commutativity specification. Conceptually, our work can be seen as generalizing classical read-write race detection.

We also present a new logical fragment for specifying commutativity conditions. This fragment is expressive, yet guarantees a constant number of comparisons per method invocation rather than linear with unrestricted specifications.

We implemented our analyzer and evaluated it on real-world applications. Experimental results indicate that our analysis is practical: it discovered harmful commutativity races with overhead comparable to state-of-the-art, low-level race detectors.

References

  1. Attiya, H., Guerraoui, R., Hendler, D., Kuznetsov, P., Michael, M., and Vechev, M. Laws of order: Expensive synchronization in concurrent algorithms cannot be eliminated. In ACM POPL'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Clements, A. T., Kaashoek, M. F., Zeldovich, N., Morris, R. T., and Kohler, E. The scalable commutativity rule: Designing scalable software for multicore processors. In ACM SOSP'13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Flanagan, C., and Freund, S. N. Fasttrack: Efficient and precise dynamic race detection. In ACM PLDI'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Flanagan, C., and Freund, S. N. The roadrunner dynamic analysis framework for concurrent programs. In ACM PASTE'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Flanagan, C., Freund, S. N., and Yi, J. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In ACM PLDI'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Gao, Q., Zhang, W., Chen, Z., Zheng, M., and Qin, F. 2nd-strike: Toward manifesting hidden concurrency typestate bugs. In ACM ASPLOS'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Herlihy, M., and Koskinen, E. Transactional boosting: A methodology for highly-concurrent transactional objects. In ACM PPoPP '08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kim, D., and Rinard, M. C. Verification of semantic commutativity conditions and inverse operations on linked data structures. In ACM PLDI'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Korth, H. F. Locking primitives in a database system. Journal of the ACM'83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Kulkarni, M., Nguyen, D., Prountzos, D., Sui, X., and Pingali, K. Exploiting the commutativity lattice. In ACM PLDI'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., and Chew, L. P. Optimistic parallelism requires abstractions. In ACM PLDI'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Lamport, L. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM'78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Lin, Y., and Dig, D. Check-then-act misuse of java concurrent collections. In IEEE ICST '13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Mattern, F. Virtual time and global states of distributed systems. In Proc. Workshop on Parallel and Distributed Algorithms'88.Google ScholarGoogle Scholar
  15. Schwarz, P. M., and Spector, A. Z. Synchronizing shared abstract types. ACM Trans. Comput. Syst.'84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Shacham, O., Bronson, N., Aiken, A., Sagiv, M., Vechev, M., and Yahav, E. Testing atomicity of composed concurrent operations. In ACM OOPSLA'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Tripp, O., Yorsh, G., Field, J., and Sagiv, M. Hawkeye: Effective discovery of dataflow impediments to parallelization. In ACM OOPSLA'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Weihl, W. E. Commutativity-based concurrency control for abstract data types. In Twenty-First Annual Hawaii International Conference on Software Track'88. Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 49, Issue 6
    PLDI '14
    June 2014
    598 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2666356
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2014
      619 pages
      ISBN:9781450327848
      DOI:10.1145/2594291

    Copyright © 2014 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 9 June 2014

    Check for updates

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!