SharC

Author:

Anderson Zachary1,Gay David2,Ennals Rob2,Brewer Eric1

Affiliation:

1. University of California, Berkeley, Berkeley, CA, USA

2. Intel, Berkeley, CA, USA

Abstract

Unintended or unmediated data sharing is a frequent cause of insidious bugs in multithreaded programs. We present a tool called SharC (short for Sharing Checker ) that allows a user to write lightweight annotations to declare how they believe objects are being shared between threads in their program. SharC uses a combination of static and dynamic analyses to check that the program conforms to this specification. SharC allows any type to have one of five "sharing modes" -- private to the current thread, read-only, shared under the control of a specified lock, intentionally racy, or checked dynamically. The dynamic mode uses run-time checking to verify that objects are either read-only, or only accessed by one thread. This allows us to check programs that would be difficult to check with a purely static system. If the user does not give a type an explicit annotation, then SharC uses a static type-qualifier analysis to infer that it is either private or should be checked dynamically. SharC allows objects to move between different sharing modes at runtime by using reference counting to check that there are no other references to the objects when they change mode. SharC's baseline dynamic analysis can check any C program, but is slow, and will generate false warnings about intentional data sharing. As the user adds more annotations, false warnings are reduced, and performance improves.We have found in practice that very few annotations are needed to describe all sharing and give reasonable performance. We ran SharC on 6 legacy C programs, summing to over 600k lines of code, and found that a total of only 60 simple annotations were needed to remove all false positives and to reduce performance overhead to only 2-14%.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference25 articles.

1. Agarwal R. Sasturkar A. Wang L. and Stoller S. D. Optimized run-time race detection and atomicity checking using partial discovered types. In ASE?05. 10.1145/1101908.1101944 Agarwal R. Sasturkar A. Wang L. and Stoller S. D. Optimized run-time race detection and atomicity checking using partial discovered types. In ASE?05. 10.1145/1101908.1101944

2. Ownership types for safe programming

3. Detecting data races in Cilk programs that use locks

4. Efficient and precise datarace detection for multithreaded object-oriented programs

5. Condit J. Harren M. Anderson Z. Gay D. and Necula G. Dependent types for low-level programming. In ESOP?07. Condit J. Harren M. Anderson Z. Gay D. and Necula G. Dependent types for low-level programming. In ESOP?07.

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

1. Synchronous Deterministic Parallel Programming for Multi-Cores with ForeC;ACM Transactions on Programming Languages and Systems;2023-06-26

2. Revisiting the Complexity of Hardware Cache Coherence and Some Implications;ACM Transactions on Architecture and Code Optimization;2015-01-09

3. HATI: Hardware Assisted Thread Isolation for Concurrent C/C++ Programs;2014 IEEE International Parallel & Distributed Processing Symposium Workshops;2014-05

4. Æminium;ACM Transactions on Programming Languages and Systems;2014-03

5. Multithreaded Geant4: Semi-automatic Transformation into Scalable Thread-Parallel Software;Euro-Par 2010 - Parallel Processing;2010

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

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

www.globalauthorid.com

TOP

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