Abstract
We introduce
lock allocation
, an automatic technique that takes a multi-threaded program annotated with
atomic
sections (that must be executed atomically), and infers a lock assignment from global variables to locks and a lock instrumentation that determines where each lock should be acquired and released such that the resulting instrumented program is guaranteed to preserve atomicity and deadlock freedom (provided all shared state is accessed only within atomic sections). Our algorithm works in the presence of pointers and procedures, and sets up the lock allocation problem as a 0-1 ILP which minimizes the conflict cost between atomic sections while simultaneously minimizing the number of locks. We have implemented our algorithm for both C with pthreads and Java, and have applied it to infer locks in 15K lines of AOLserver code. Our automatic allocation produces the same results as hand annotations for most of this code, while solving the optimization instances within a second for most programs.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference20 articles.
1. L.O. Andersen. Program analysis and specialization for the C programming language. PhD thesis 1994. L.O. Andersen. Program analysis and specialization for the C programming language. PhD thesis 1994.
2. Aolserver. http://www.aolserver.com. Aolserver. http://www.aolserver.com.
3. Type-based race detection for Java
Cited by
9 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Towards generating thread-safe classes automatically;Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering;2020-12-21
2. An Automated Refactoring Approach to Improve IoT Software Quality;Applied Sciences;2020-01-06
3. Lock-Free Transactional Transformation for Linked Data Structures;ACM Transactions on Parallel Computing;2018-09-19
4. Automatic Scalable Atomicity via Semantic Locking;ACM Transactions on Parallel Computing;2017-03-23
5. Lock-free Transactions without Rollbacks for Linked Data Structures;Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures;2016-07-11