ACM Home Page
Please provide us with feedback. Feedback
Lightweight annotations for controlling sharing in concurrent data structures
Full text PdfPdf (507 KB)
Source
Conference on Programming Language Design and Implementation archive
Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation table of contents
Dublin, Ireland
SESSION: Races and deadlocks table of contents
Pages 98-109  
Year of Publication: 2009
ISBN:978-1-60558-392-1
Also published in ...
Authors
Zachary R. Anderson  University of California, Berkeley, Berkeley, CA, USA
David Gay  Intel Research, Berkeley, Berkeley, CA, USA
Mayur Naik  Intel Research, Berkeley, Berkeley, CA, USA
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 28,   Downloads (12 Months): 115,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1542476.1542488
What is a DOI?

ABSTRACT

SharC is a recently developed system for checking data-sharing in multithreaded programs. Programmers specify sharing rules (read-only, protected by a lock, etc.) for individual objects, and the SharC compiler enforces these rules using static and dynamic checks. Violations of these rules indicate unintended data sharing, which is the underlying cause of harmful data-races. Additionally, SharC allows programmers to change the sharing rules for a specific object using a sharing cast, to capture the fact that sharing rules for an object often change during the object's lifetime. SharC was successfully applied to a number of multi-threaded C programs.

However, many programs are not readily checkable using SharC because their sharing rules, and changes to sharing rules, effectively apply to whole data structures rather than to individual objects. We have developed a system called Shoal to address this shortcoming. In addition to the sharing rules and sharing cast of SharC, our system includes a new concept that we call groups. A group is a collection of objects all having the same sharing mode. Each group has a distinguished member called the group leader. When the sharing mode of the group leader changes by way of a sharing cast, the sharing mode of all members of the group also changes. This operation is made sound by maintaining the invariant that at the point of a sharing cast, the only external pointer into the group is the pointer to the group leader. The addition of groups allows checking safe concurrency at the level of data structures rather than at the level of individual objects.

We demonstrate the necessity and practicality of groups by applying Shoal to a wide range of concurrent C programs (the largest approaching a million lines of code). In all benchmarks groups entail low annotation burden and no significant additional performance overhead.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
Anderson, Z., Gay, D., and Naik, M. Lightweight annotations for controlling sharing in concurrent data structures. Tech. Rep. UCB/EECS--2009--44, EECS Department, University of California, Berkeley, Mar 2009.
 
3
Barnes, J., and Hut, P. A hierarchical O(N log N) force-calculation algorithm. Nature 324 (Dec. 1986), 446--449.
 
4
5
6
7
8
 
9
Condit, J., Harren, M., Anderson, Z., Gay, D., and Necula, G. Dependent types for low-level programming. In ESOP'07.
10
 
11
developers.sun.com. LockLint -- static data race and deadlock detection tool for C. http://developers.sun.com/solaris/articles/locklint.html.
12
13
14
15
16
 
17
18
19
20
21
 
22
23
24
25
26
 
27
28
 
29
Tofte, M., and Talpin, J.-P. Region-based memory management.
 
30
In Information and Computation (1977), vol. 132, pp. 109--176.
31
32
33
34

Collaborative Colleagues:
Zachary R. Anderson: colleagues
David Gay: colleagues
Mayur Naik: colleagues