Optimal Reads-From Consistency Checking for C11-Style Memory Models

Author:

Tunç Hünkar Can1ORCID,Abdulla Parosh Aziz2ORCID,Chakraborty Soham3ORCID,Krishna Shankaranarayanan4ORCID,Mathur Umang5ORCID,Pavlogiannis Andreas1ORCID

Affiliation:

1. Aarhus University, Denmark

2. Uppsala University, Sweden

3. TU Delft, Netherlands

4. IIT Bombay, India

5. National University of Singapore, Singapore

Abstract

Over the years, several memory models have been proposed to capture the subtle concurrency semantics of C/C++. One of the most fundamental problems associated with a memory model M is consistency checking: given an execution X , is X consistent with M ? This problem lies at the heart of numerous applications, including specification testing and litmus tests, stateless model checking, and dynamic analyses. As such, it has been explored extensively and its complexity is well-understood for traditional models like SC and TSO. However, less is known for the numerous model variants of C/C++, for which the problem becomes challenging due to the intricacies of their concurrency primitives. In this work we study the problem of consistency checking for popular variants of the C11 memory model, in particular, the RC 20 model, its release-acquire ( RA ) fragment, the strong and weak variants of RA ( SRA and WRA ), as well as the Relaxed fragment of RC 20. Motivated by applications in testing and model checking, we focus on reads-from consistency checking. The input is an execution X specifying a set of events, their program order and their reads-from relation, and the task is to decide the existence of a modification order on the writes of X that makes X consistent in a memory model. We draw a rich complexity landscape for this problem; our results include (i) nearly-linear-time algorithms for certain variants, which improve over prior results, (ii) fine-grained optimality results, as well as (iii) matching upper and lower bounds (NP-hardness) for other variants. To our knowledge, this is the first work to characterize the complexity of consistency checking for C11 memory models. We have implemented our algorithms inside the TruSt model checker and the C11Tester testing tool. Experiments on standard benchmarks show that our new algorithms improve consistency checking, often by a significant margin.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference59 articles.

1. Optimal stateless model checking for reads-from equivalence under sequential consistency

2. Optimal stateless model checking under the release-acquire semantics

3. Stateless Model Checking Under a Reads-Value-From Equivalence

4. Jade Alglave. 2010. A Shared Memory Poetics. Ph. D. Dissertation. l’Université Paris 7 - Denis Diderot. Jade Alglave. 2010. A Shared Memory Poetics. Ph. D. Dissertation. l’Université Paris 7 - Denis Diderot.

5. Litmus: Running Tests against Hardware

Cited by 2 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3;2024-04-27

2. How Hard Is Weak-Memory Testing?;Proceedings of the ACM on Programming Languages;2024-01-05

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3