Automatic synthesis of synchronisation primitives for concurrent programs
Tarrach T. 2016. Automatic synthesis of synchronisation primitives for concurrent programs. Institute of Science and Technology Austria.
Download
Download (ext.)
http://thorstent.github.io/theses/phd_thorsten_tarrach.pdf
[Published Version]
Thesis
| PhD
| Published
| English
Author
Supervisor
Corresponding author has ISTA affiliation
Department
Grant
Series Title
ISTA Thesis
Abstract
In this thesis we present a computer-aided programming approach to concurrency. Our approach helps the programmer by automatically fixing concurrency-related bugs, i.e. bugs that occur when the program is executed using an aggressive preemptive scheduler, but not when using a non-preemptive (cooperative) scheduler. Bugs are program behaviours that are incorrect w.r.t. a specification. We consider both user-provided explicit specifications in the form of assertion
statements in the code as well as an implicit specification. The implicit specification is inferred from the non-preemptive behaviour. Let us consider sequences of calls that the program makes to an external interface. The implicit specification requires that any such sequence produced under a preemptive scheduler should be included in the set of sequences produced under a non-preemptive scheduler. We consider several semantics-preserving fixes that go beyond atomic sections typically explored in the synchronisation synthesis literature. Our synthesis is able to place locks, barriers and wait-signal statements and last, but not least reorder independent statements. The latter may be useful if a thread is released to early, e.g., before some initialisation is completed. We guarantee that our synthesis does not introduce deadlocks and that the synchronisation inserted is optimal w.r.t. a given objective function. We dub our solution trace-based synchronisation synthesis and it is loosely based on counterexample-guided inductive synthesis (CEGIS). The synthesis works by discovering a trace that is incorrect w.r.t. the specification and identifying ordering constraints crucial to trigger the specification violation. Synchronisation may be placed immediately (greedy approach) or delayed until all incorrect traces are found (non-greedy approach). For the non-greedy approach we construct a set of global constraints over synchronisation placements. Each model of the global constraints set corresponds to a correctness-ensuring synchronisation placement. The placement that is optimal w.r.t. the given objective function is chosen as the synchronisation solution. We evaluate our approach on a number of realistic (albeit simplified) Linux device-driver
benchmarks. The benchmarks are versions of the drivers with known concurrency-related bugs. For the experiments with an explicit specification we added assertions that would detect the bugs in the experiments. Device drivers lend themselves to implicit specification, where the device and the operating system are the external interfaces. Our experiments demonstrate that our synthesis method is precise and efficient. We implemented objective functions for coarse-grained and fine-grained locking and observed that different synchronisation placements are produced for our experiments, favouring e.g. a minimal number of synchronisation operations or maximum concurrency.
Publishing Year
Date Published
2016-07-07
Publisher
Institute of Science and Technology Austria
Page
151
ISSN
IST-REx-ID
Cite this
Tarrach T. Automatic synthesis of synchronisation primitives for concurrent programs. 2016. doi:10.15479/at:ista:1130
Tarrach, T. (2016). Automatic synthesis of synchronisation primitives for concurrent programs. Institute of Science and Technology Austria. https://doi.org/10.15479/at:ista:1130
Tarrach, Thorsten. “Automatic Synthesis of Synchronisation Primitives for Concurrent Programs.” Institute of Science and Technology Austria, 2016. https://doi.org/10.15479/at:ista:1130.
T. Tarrach, “Automatic synthesis of synchronisation primitives for concurrent programs,” Institute of Science and Technology Austria, 2016.
Tarrach T. 2016. Automatic synthesis of synchronisation primitives for concurrent programs. Institute of Science and Technology Austria.
Tarrach, Thorsten. Automatic Synthesis of Synchronisation Primitives for Concurrent Programs. Institute of Science and Technology Austria, 2016, doi:10.15479/at:ista:1130.
All files available under the following license(s):
Copyright Statement:
This Item is protected by copyright and/or related rights. [...]
Main File(s)
File Name
2016_Tarrach_Thesis.pdf
1.52 MB
Access Level
Open Access
Date Uploaded
2021-02-22
MD5 Checksum
319a506831650327e85376db41fc1094
File Name
2016_Tarrach_Thesispdfa.pdf
1.31 MB
Access Level
Closed Access
Date Uploaded
2021-11-16
MD5 Checksum
39efcd789f0ad859ff15652cb7afc412
Link(s) to Main File(s)
Access Level
Open Access
Material in ISTA:
Part of this Dissertation
Part of this Dissertation
Part of this Dissertation