skip to main content
10.1145/1065944.1065953acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
Article

Static analysis of atomicity for programs with non-blocking synchronization

Authors Info & Claims
Published:15 June 2005Publication History

ABSTRACT

In concurrent programming, non-blocking synchronization is very efficient but difficult to design correctly. This paper presents a static analysis to show that code blocks are atomic, i.e., that every execution of the program is equivalent to one in which those code blocks execute without interruption by other threads. Our analysis determines commutativity of operations based primarily on how synchronization primitives (including locks, load-linked, store-conditional, and compare-and-swap) are used. A reduction theorem states that certain patterns of commutativity imply atomicity. Atomicity is itself an important correctness requirement for many concurrent programs. Furthermore, an atomic code block can be treated as a single transition during subsequent analysis of the program; this can greatly improve the efficiency of the subsequent analysis. We demonstrate the effectiveness of our approach on several concurrent non-blocking programs.

References

  1. C. Flanagan and S. N. Freund. Atomizer: A dynamic atomicity checker for multithreaded programs. In Proc. of ACM Symposium on Principles of Programming Languages (POPL). ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. Flanagan, S. N. Freund, and S. Qadeer. Exploiting purity for atomicity. In Proc. ACM International Symposium on Software Testing and Analysis (ISSTA), pages 221--231. ACM Press, 2004. An extended version appeared as Technical Report 04-02, Williams College, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Flanagan and S. Qadeer. A type and effect system for atomicity. In Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Flanagan and S. Qadeer. Types for atomicity. In Proc. ACM SIGPLAN International Workshop on Types in Languages Design and Implementation (TLDI), pages 1--12. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. H. Gao and W. H. Hesselink. A formal reduction for lock-free parallel algorithms. In Proceedings of the 16th International Conference on Computer-Aided Verification (CAV), Lecture Notes in Computer Science, pages 44--56, 2004.Google ScholarGoogle Scholar
  6. M. P. Herlihy. Wait-free synchronization. ACM Transactions on Programming Languages and Systems, 13(1):124--149, January 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. P. Herlihy. A methodology for implementing highly concurrent data objects. ACM Transactions on Programming Languages and Systems, 15(5):745--770, Nov. 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. P. Herlihy and J. M. Wing. Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3):463--492, July 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. J. Holzmann. The SPIN Model Checker. Addison-Wesley, 2003.Google ScholarGoogle Scholar
  10. R. J. Lipton. Reduction: A method of proving properties of parallel programs. Communications of the ACM, 18(12):717--721, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. M. Michael. Private communication, 2004.Google ScholarGoogle Scholar
  12. M. M. Michael. Scalable lock-free dynamic memory allocation. In Conference on Programming Language Design and Implementation (PLDI). ACM Press, June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. M. Michael and M. L. Scott. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In the 15th Annual ACM Symposium on Principles of Distributed Computing (PODC '96), pages 267--275. ACM Press, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Peled. Ten years of partial order reduction. In A. J. Hu and M. Y. Vardi, editors, Proc. 10th Int'l. Conference on Computer-Aided Verification (CAV), volume 1427 of Lecture Notes in Computer Science, pages 17--28. Springer-Verlag, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Qadeer, S. K. Rajamani, and J. Rehof. Summarizing procedures in concurrent programs. In Proc. 31st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 245--255. ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. Wang and S. D. Stoller. Static analysis of atomicity for programs with non-blocking synchronization. Technical Report DAR-04-17, SUNY at Stony Brook, Computer Science Dept., Oct. 2004 (revised Jan. 2005). Available at http://www.cs.sunysb.edu/~liqiang/nonblocking.html.Google ScholarGoogle Scholar
  17. L. Wang and S. D. Stoller. Run-time analysis for atomicity. In Third Workshop on Runtime Verification (RV03), volume 89(2) of Electronic Notes in Theoretical Computer Science. Elsevier, 2003.Google ScholarGoogle Scholar
  18. E. Yahav and M. Sagiv. Automatically verifying concurrent queue algorithms. In Proc. Workshop on Software Model Checking (SoftMC'03), volume 89(3) of Electronic Notes in Theoretical Computer Science. Elsevier, 2003.Google ScholarGoogle Scholar

Index Terms

  1. Static analysis of atomicity for programs with non-blocking synchronization

                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
                • Published in

                  cover image ACM Conferences
                  PPoPP '05: Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming
                  June 2005
                  310 pages
                  ISBN:1595930809
                  DOI:10.1145/1065944

                  Copyright © 2005 ACM

                  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]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 15 June 2005

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • Article

                  Acceptance Rates

                  Overall Acceptance Rate230of1,014submissions,23%

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader