Static Analysis of Atomicity for Programs with Lock-Free Synchronization∗
نویسندگان
چکیده
In concurrent programming, lock-free synchronization is veryefficient but difficult to design correctly. This paper presentsa static analysis to show that code blocks are atomic, i.e.,that every execution of the program is equivalent to onein which those code blocks execute without interruption byother threads. Our analysis determines commutativity ofoperations based primarily on how synchronization prim-itives (including locks, load-linked, store-conditional, andcompare-and-swap) are used. A reduction theorem statesthat certain patterns of commutativity imply atomicity. Atom-icity is itself an important correctness requirement for manyconcurrent programs. Furthermore, an atomic code blockcan be treated as a single transition during subsequent anal-ysis of the program; this can greatly improve the efficiency ofthe subsequent analysis. We demonstrate the effectivenessof our approach on several concurrent lock-free programs.
منابع مشابه
Static Detection of Atomicity Violations in Object-Oriented Programs
Violations of atomicity are possible sources of errors in parallel programs. A violation occurs if the effect of a method execution depends on the execution of concurrent threads that operate on the same or overlapping parts of a shared data structure. All accesses to shared data are assumed to be ordered through synchronization, hence common techniques for data race and deadlock detection are ...
متن کاملStatic Analysis of Atomicity for Algorithms Using Non-Blocking Synchronization∗
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 using non-blocking synchronization 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 ...
متن کاملAutomatic Synchronization Correction for Atomicity
Multithreaded programs are notoriously prone to synchronization errors. Much prior work has tackled the problem of detecting such errors. This paper focuses on the subsequent problem of synchronization correction. We present a constraint-based analysis that, given an erroneous program, automatically infers (where possible) what additional locking operations should be inserted in order to yield ...
متن کاملSurvey: Race Detection and Atomicity Checking
Concurrent programs are hard to write and debug because of the inherent concurrency and indeterminism. Bugs in these programs are often hard to find in the testing process. When they do show up later in production systems, they are not easy to pinpoint because a lot of them are hard to reproduce. Therefore, automated tools that are able to find these bugs are of great value in relieving program...
متن کاملDeconstructing Transactional Semantics: The Subtleties of Atomicity
Researchers have recently proposed software and hardware support for transactions as a replacement for the traditional lock-based synchronization most common in multithreaded programs. Transactions allow the programmer to specify a region of the program that should appear to execute atomically, while the hardware and runtime system optimistically execute the transactions concurrently to obtain ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2004