Cargando…
From non-preemptive to preemptive scheduling using synchronization synthesis
We present a computer-aided programming approach to concurrency. The approach allows programmers to program assuming a friendly, non-preemptive scheduler, and our synthesis procedure inserts synchronization to ensure that the final program works even with a preemptive scheduler. The correctness spec...
Autores principales: | , , , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Springer US
2016
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5399096/ https://www.ncbi.nlm.nih.gov/pubmed/28490835 http://dx.doi.org/10.1007/s10703-016-0256-5 |
_version_ | 1783230573964165120 |
---|---|
author | Černý, Pavol Clarke, Edmund M. Henzinger, Thomas A. Radhakrishna, Arjun Ryzhyk, Leonid Samanta, Roopsha Tarrach, Thorsten |
author_facet | Černý, Pavol Clarke, Edmund M. Henzinger, Thomas A. Radhakrishna, Arjun Ryzhyk, Leonid Samanta, Roopsha Tarrach, Thorsten |
author_sort | Černý, Pavol |
collection | PubMed |
description | We present a computer-aided programming approach to concurrency. The approach allows programmers to program assuming a friendly, non-preemptive scheduler, and our synthesis procedure inserts synchronization to ensure that the final program works even with a preemptive scheduler. The correctness specification is implicit, inferred from the non-preemptive behavior. Let us consider sequences of calls that the program makes to an external interface. The 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 guarantee that our synthesis does not introduce deadlocks and that the synchronization inserted is optimal w.r.t. a given objective function. The solution is based on a finitary abstraction, an algorithm for bounded language inclusion modulo an independence relation, and generation of a set of global constraints over synchronization placements. Each model of the global constraints set corresponds to a correctness-ensuring synchronization placement. The placement that is optimal w.r.t. the given objective function is chosen as the synchronization solution. We apply the approach to device-driver programming, where the driver threads call the software interface of the device and the API provided by the operating system. Our experiments demonstrate that our synthesis method is precise and efficient. The implicit specification helped us find one concurrency bug previously missed when model-checking using an explicit, user-provided specification. We implemented objective functions for coarse-grained and fine-grained locking and observed that different synchronization placements are produced for our experiments, favoring a minimal number of synchronization operations or maximum concurrency, respectively. |
format | Online Article Text |
id | pubmed-5399096 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2016 |
publisher | Springer US |
record_format | MEDLINE/PubMed |
spelling | pubmed-53990962017-05-08 From non-preemptive to preemptive scheduling using synchronization synthesis Černý, Pavol Clarke, Edmund M. Henzinger, Thomas A. Radhakrishna, Arjun Ryzhyk, Leonid Samanta, Roopsha Tarrach, Thorsten Form Methods Syst Des Article We present a computer-aided programming approach to concurrency. The approach allows programmers to program assuming a friendly, non-preemptive scheduler, and our synthesis procedure inserts synchronization to ensure that the final program works even with a preemptive scheduler. The correctness specification is implicit, inferred from the non-preemptive behavior. Let us consider sequences of calls that the program makes to an external interface. The 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 guarantee that our synthesis does not introduce deadlocks and that the synchronization inserted is optimal w.r.t. a given objective function. The solution is based on a finitary abstraction, an algorithm for bounded language inclusion modulo an independence relation, and generation of a set of global constraints over synchronization placements. Each model of the global constraints set corresponds to a correctness-ensuring synchronization placement. The placement that is optimal w.r.t. the given objective function is chosen as the synchronization solution. We apply the approach to device-driver programming, where the driver threads call the software interface of the device and the API provided by the operating system. Our experiments demonstrate that our synthesis method is precise and efficient. The implicit specification helped us find one concurrency bug previously missed when model-checking using an explicit, user-provided specification. We implemented objective functions for coarse-grained and fine-grained locking and observed that different synchronization placements are produced for our experiments, favoring a minimal number of synchronization operations or maximum concurrency, respectively. Springer US 2016-09-27 2017 /pmc/articles/PMC5399096/ /pubmed/28490835 http://dx.doi.org/10.1007/s10703-016-0256-5 Text en © The Author(s) 2016 Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. |
spellingShingle | Article Černý, Pavol Clarke, Edmund M. Henzinger, Thomas A. Radhakrishna, Arjun Ryzhyk, Leonid Samanta, Roopsha Tarrach, Thorsten From non-preemptive to preemptive scheduling using synchronization synthesis |
title | From non-preemptive to preemptive scheduling using synchronization synthesis |
title_full | From non-preemptive to preemptive scheduling using synchronization synthesis |
title_fullStr | From non-preemptive to preemptive scheduling using synchronization synthesis |
title_full_unstemmed | From non-preemptive to preemptive scheduling using synchronization synthesis |
title_short | From non-preemptive to preemptive scheduling using synchronization synthesis |
title_sort | from non-preemptive to preemptive scheduling using synchronization synthesis |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5399096/ https://www.ncbi.nlm.nih.gov/pubmed/28490835 http://dx.doi.org/10.1007/s10703-016-0256-5 |
work_keys_str_mv | AT cernypavol fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis AT clarkeedmundm fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis AT henzingerthomasa fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis AT radhakrishnaarjun fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis AT ryzhykleonid fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis AT samantaroopsha fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis AT tarrachthorsten fromnonpreemptivetopreemptiveschedulingusingsynchronizationsynthesis |