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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Flanagan, C., and Freund, S. N. Fasttrack: Efficient and precise dynamic race detection. In ACM PLDI'09. Google Scholar
Digital Library
- Flanagan, C., and Freund, S. N. The roadrunner dynamic analysis framework for concurrent programs. In ACM PASTE'10. Google Scholar
Digital Library
- Flanagan, C., Freund, S. N., and Yi, J. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In ACM PLDI'08. Google Scholar
Digital Library
- Gao, Q., Zhang, W., Chen, Z., Zheng, M., and Qin, F. 2nd-strike: Toward manifesting hidden concurrency typestate bugs. In ACM ASPLOS'11. Google Scholar
Digital Library
- Herlihy, M., and Koskinen, E. Transactional boosting: A methodology for highly-concurrent transactional objects. In ACM PPoPP '08. Google Scholar
Digital Library
- Kim, D., and Rinard, M. C. Verification of semantic commutativity conditions and inverse operations on linked data structures. In ACM PLDI'11. Google Scholar
Digital Library
- Korth, H. F. Locking primitives in a database system. Journal of the ACM'83. Google Scholar
Digital Library
- Kulkarni, M., Nguyen, D., Prountzos, D., Sui, X., and Pingali, K. Exploiting the commutativity lattice. In ACM PLDI'11. Google Scholar
Digital Library
- Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., and Chew, L. P. Optimistic parallelism requires abstractions. In ACM PLDI'07. Google Scholar
Digital Library
- Lamport, L. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM'78. Google Scholar
Digital Library
- Lin, Y., and Dig, D. Check-then-act misuse of java concurrent collections. In IEEE ICST '13. Google Scholar
Digital Library
- Mattern, F. Virtual time and global states of distributed systems. In Proc. Workshop on Parallel and Distributed Algorithms'88.Google Scholar
- Schwarz, P. M., and Spector, A. Z. Synchronizing shared abstract types. ACM Trans. Comput. Syst.'84. Google Scholar
Digital Library
- Shacham, O., Bronson, N., Aiken, A., Sagiv, M., Vechev, M., and Yahav, E. Testing atomicity of composed concurrent operations. In ACM OOPSLA'11. Google Scholar
Digital Library
- Tripp, O., Yorsh, G., Field, J., and Sagiv, M. Hawkeye: Effective discovery of dataflow impediments to parallelization. In ACM OOPSLA'11. Google Scholar
Digital Library
- Weihl, W. E. Commutativity-based concurrency control for abstract data types. In Twenty-First Annual Hawaii International Conference on Software Track'88. Google Scholar
Digital Library
Recommendations
Commutativity race detection
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and ImplementationThis 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 ...
Dynamic race detection for C++11
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesThe intricate rules for memory ordering and synchronisation associated with the C/C++11 memory model mean that data races can be difficult to eliminate from concurrent programs. Dynamic data race analysis can pinpoint races in large and complex ...







Comments