Synthesizing fine-grained synchronization protocols for implicit monitors
Kostas Ferles, Benjamin Sepanski, Rahul Krishnan, James Bornholt, Isil Dillig
Abstract
A monitor is a widely-used concurrent programming abstraction that encapsulates all shared state between threads. Monitors can be classified as being either implicit or explicit depending on the primitives they provide. Implicit monitors are much easier to program but typically not as efficient. To address this gap, there has been recent research on automatically synthesizing explicit-signal monitors from an implicit specification [Ferles et al. 2018], but prior work does not exploit all paralellization opportunities due to the use of a single lock for the entire monitor. This paper presents a new technique for synthesizing fine-grained explicit-synchronization protocols from implicit monitors. Our method is based on two key innovations: First, we present a new static analysis for inferring safe interleavings that allow violating mutual exclusion of monitor operations without changing its semantics. Second, we use the results of this static analysis to generate a MaxSAT instance whose models correspond to correct-by-construction synchronization protocols. We have implemented our approach in a tool called Cortado and evaluate it on monitors that contain parallelization opportunities. Our evaluation shows that Cortado can synthesize synchronization policies that are competitive with, or even better than, expert-written ones on these benchmarks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 919859ff-d5e5-43a5-9c3a-9a2f8b6e6194Cited by top-tier papers1
Ask how each one uses itRelated papers
- A programming model for semi-implicit parallelization of static analysesDominik Helm, Florian Kübler, Jan Thomas Kölzer, Philipp Haller et al.ISSTA 2020 · 8 citations
- Towards Generating Thread-Safe Classes AutomaticallyHaichi Wang, Zan Wang, Jun Sun, Shuang Liu et al.ASE 2020 · 1 citation
- AtomiS: Data-Centric Synchronization Made PracticalHervé Paulino, Ana Almeida Matos, Jan Cederquist, Marco Giunti et al.OOPSLA 2023
- Automating Pruning in Top-Down Enumeration for Program Synthesis Problems with Monotonic SemanticsKeith J. C. Johnson, Rahul Krishnan, Thomas W. Reps, Loris D'AntoniOOPSLA 2024 · 2 citations
- Accurate Static Data Race Detection for CEmerson Sales, Omar Inverso, Emilio TuostoFM 2024 · 1 citation
