Fence Synthesis under the C11 Memory Model
Sanjana Singh, Divyanjali Sharma, Ishita Jaju, Subodh Sharma

TL;DR
This paper introduces FenSying, the first optimal fence synthesis method for C11 programs, and a near-optimal alternative, fFenSying, both designed to restore correctness with minimal performance impact.
Contribution
It presents the first optimal fence synthesis technique for C11 programs and proposes a near-optimal, efficient alternative, with proofs and empirical evaluation.
Findings
FenSying is proven optimal for fence synthesis.
fFenSying is a sound, near-optimal alternative.
Empirical results show fFenSying's effectiveness and efficiency.
Abstract
The C/C++11 (C11) standard offers a spectrum of ordering guarantees on memory access operations. The combinations of such orderings pose a challenge in developing correct and efficient weak memory programs. A common solution to preclude those program outcomes that violate the correctness specification is using C11 synchronization-fences, which establish ordering on program events. The challenge is in choosing a combination of fences that (i) restores the correctness of the input program, with (ii) as little impact on efficiency as possible (i.e., the smallest set of weakest fences). This problem is the optimal fence synthesis problem and is NP-hard for straight-line programs. In this work, we propose the first fence synthesis technique for C11 programs called FenSying and show its optimality. We additionally propose a near-optimal efficient alternative called fFenSying. We prove the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Logic, programming, and type systems · Distributed systems and fault tolerance
