Abstract
We propose a cooperative methodology for multithreaded software, where threads use traditional synchronization idioms such as locks, but additionally document each point of potential thread interference with a "yield" annotation. Under this methodology, code between two successive yield annotations forms a serializable transaction that is amenable to sequential reasoning. This methodology reduces the burden of reasoning about thread interleavings by indicating only those interference points that matter. We present experimental results showing that very few yield annotations are required, typically one or two per thousand lines of code. We also present dynamic analysis algorithms for detecting cooperability violations, where thread interference is not documented by a yield, and for yield annotation inference for legacy software.
- M. Abadi and G. Plotkin. A model of cooperative threads. In Symposium on Principles of Programming Languages (POPL), 2009. Google Scholar
Digital Library
- S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 29(12):66--76, 1996. Google Scholar
Digital Library
- A. Adya, J. Howell, M. Theimer, W. J. Bolosky, and J. R. Douceur. Cooperative task management without manual stack management. In Annual Technical Conference. USENIX Association, 2002. Google Scholar
Digital Library
- R. M. Amadio and S. D. Zilio. Resource control for synchronous cooperative threads. In International Conference on Concurrency Theory (CONCUR), 2004.Google Scholar
Cross Ref
- C. Artho, K. Havelund, and A. Biere. High-level data races. In International Conference on Verification and Validation of Enterprise Information Systems (ICEIS), 2003.Google Scholar
Cross Ref
- E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: Safe multithreaded programming for C/C. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2009. Google Scholar
Digital Library
- R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for Deterministic Parallel Java. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2009. Google Scholar
Digital Library
- M. D. Bond, K. E. Coons, and K. S. McKinley. PACER: Proportional detection of data races. In Conference on Programming Language Design and Implementation (PLDI), 2010. Google Scholar
Digital Library
- G. Boudol. Fair cooperative multithreading. In International Conference on Concurrency Theory (CONCUR), 2007. Google Scholar
Digital Library
- J. Burnim and K. Sen. Asserting and checking determinism for multithreaded programs. In International Symposium on Foundations of Software Engineering (FSE), 2009. Google Scholar
Digital Library
- A. Farzan and P. Madhusudan. Causal atomicity. In Computer Aided Verification (CAV), 2006. Google Scholar
Digital Library
- A. Farzan and P. Madhusudan. Monitoring atomicity in concurrent programs. In Computer Aided Verification (CAV), 2008. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. FastTrack: Efficient and precise dynamic race detection. In Conference on Programming Language Design and Implementation (PLDI), 2009. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. The RoadRunner dynamic analysis framework for concurrent programs. In Program Analysis for Software Tools and Engineering (PASTE), 2010. Google Scholar
Digital Library
- C. Flanagan, S. N. Freund, M. Lifshin, and S. Qadeer. Types for atomicity: Static checking and inference for Java. Transactions on Programming Languages and Systems (TOPLAS), 30(4):1--53, 2008. Google Scholar
Digital Library
- C. Flanagan, S. N. Freund, and J. Yi. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In Conference on Programming Language Design and Implementation (PLDI), 2008. Google Scholar
Digital Library
- E. Fleury and G. Sutre. Raja, version 0.4.0-pre4. Available at \texttthttp://raja.sourceforge.net/, 2007.Google Scholar
- M. Isard and A. Birrell. Automatic mutual exclusion. In Workshop on Hot Topics in Operating Systems (HOTOS), 2007. Google Scholar
Digital Library
- N. Jalbert and K. Sen. A trace simplification technique for effective debugging of concurrent programs. In International Symposium on Foundations of Software Engineering (FSE), 2010. Google Scholar
Digital Library
- Java Grande Forum. Java Grande benchmark suite. Available at http://www.javagrande.org, 2008.Google Scholar
- A. Kulkarni, Y. D. Liu, and S. F. Smith. Task types for pervasive atomicity. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2010. Google Scholar
Digital Library
- L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7):558--565, 1978. Google Scholar
Digital Library
- J. R. Larus and R. Rajwar. Transactional Memory. Synthesis Lectures on Computer Architecture. Morgan & Claypool Publishers, 2006. Google Scholar
Digital Library
- N. D. Matsakis and T. R. Gross. A time-aware type system for data-rrace protection and guaranteed initialization. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2010. Google Scholar
Digital Library
- M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: efficient deterministic multithreading in software. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2009. Google Scholar
Digital Library
- C.-S. Park and K. Sen. Randomized active atomicity violation detection in concurrent programs. In International Symposium on Foundations of Software Engineering (FSE), 2008. Google Scholar
Digital Library
- P. Ratanaworabhan, M. Burtscher, D. Kirovski, B. Zorn, R. Nagpal, and K. Pattabiraman. Detecting and tolerating asymmetric races. In Symposium on Principles and Practice of Parallel Programming (PPoPP), 2009. Google Scholar
Digital Library
- C. Sadowski, S. N. Freund, and C. Flanagan. SingleTrack: A dynamic determinism checker for multithreaded programs. In European Symposium on Programming (ESOP), 2009. Google Scholar
Digital Library
- C. Sadowski and J. Yi. Applying usability studies to correctness conditions: A case study of cooperability. In Onward! Workshop on Evaluation and Usability of Programming Languages and Tools (PLATEAU), 2010. Google Scholar
Digital Library
- A. Sasturkar, R. Agarwal, L. Wang, and S. D. Stoller. Automated type-based analysis of data races and atomicity. In Symposium on Principles and Practice of Parallel Programming (PPoPP), 2005. Google Scholar
Digital Library
- Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with isolation and cooperation. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2007. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPEC benchmarks. http://www.spec.org/, 2003.Google Scholar
- The World Wide Web Consortium. Jigsaw Web Server. Available from http://www.w3.org/Jigsaw/, 2009.Google Scholar
- T. Usui, Y. Smaragdakis, R. Behrends, and J. Evans. Adaptive locks: Combining transactions and locks for efficient concurrency. In Parallel Architectures and Compilation Techniques (PACT), 2009. Google Scholar
Digital Library
- R. Von Behren, J. Condit, F. Zhou, G. Necula, and E. Brewer. Capriccio: scalable threads for internet services. ACM SIGOPS Operating Systems Review, 37(5):281, 2003. Google Scholar
Digital Library
- C. von Praun and T. Gross. Static conflict analysis for multi-threaded object-oriented programs. In Conference on Programming Language Design and Implementation (PLDI), 2003. Google Scholar
Digital Library
- L. Wang and S. D. Stoller. Accurate and efficient runtime detection of atomicity errors in concurrent programs. In Symposium on Principles and Practice of Parallel Programming (PPoPP), 2006. Google Scholar
Digital Library
- J. Yi and C. Flanagan. Effects for cooperable and serializable threads. In Workshop on Types in Language Design and Implementation (TLDI), 2010. Google Scholar
Digital Library
Index Terms
Cooperative reasoning for preemptive execution
Recommendations
Cooperative reasoning for preemptive execution
PPoPP '11: Proceedings of the 16th ACM symposium on Principles and practice of parallel programmingWe propose a cooperative methodology for multithreaded software, where threads use traditional synchronization idioms such as locks, but additionally document each point of potential thread interference with a "yield" annotation. Under this methodology, ...
Help when needed, but no more: Efficient read/write partial snapshot
An atomic snapshot object is an object that can be concurrently accessed by asynchronous processes prone to crash. It is made of m components (base atomic registers) and is defined by two operations: an update operation that allows a process to ...
Help when needed, but no more: efficient read/write partial snapshot
DISC'09: Proceedings of the 23rd international conference on Distributed computingAn atomic snapshot object is an object that can be concurrently accessed by asynchronous processes prone to crash. It is made of m components (base atomic registers) and is defined by two operations: an update operation that allows a process to ...







Comments