The Community for Technology Leaders
RSS Icon
Issue No.03 - May-June (2013 vol.33)
pp: 96-104
Abhayendra Singh , University of Michigan
Satish Narayanasamy , University of Michigan
Daniel Marino , Symantec Research Labs
Todd Millstein , University of California
Madanlal Musuvathi , Microsoft Research
Recent efforts to standardize concurrency semantics for programming languages require programmers to explicitly annotate all memory accesses that can participate in a data race ("unsafe" accesses). This requirement allows the compiler and hardware to aggressively optimize unannotated accesses, which are assumed to be data-race-free ("safe" accesses), while still preserving the intuitive thread interleaving semantics known as sequential consistency (SC). However, unannotated data races are easy for programmers to accidentally introduce and difficult to detect, and thus the safety and correctness of programs can be significantly compromised. The authors argue instead for a safety-first approach, whereby the compiler and hardware treat every memory access as potentially unsafe unless it is proven otherwise. In this way, SC semantics is guaranteed for all programs, whether data-race-free or not. The authors show that the performance and design cost of this approach is insignificant in practice, because the majority of accesses can be proven safe through a simple static or dynamic analysis, and memory ordering constraints can be ignored for such accesses without violating SC. Together with their earlier work on an efficient SC-preserving compiler, their SC hardware provides end-to-end SC semantics at the language level with low overhead.
Computer architecture, Sequential analysis, Parallel processing, Software engineering, Computer interfaces, Hardware, sequential consistency, hardware/software interfaces, parallel architectures
Abhayendra Singh, Satish Narayanasamy, Daniel Marino, Todd Millstein, Madanlal Musuvathi, "A Safety-First Approach to Memory Models", IEEE Micro, vol.33, no. 3, pp. 96-104, May-June 2013, doi:10.1109/MM.2013.50
1. B.C. Pierce, Types and Programming Languages, MIT Press, 2002.
2. L. Lamport, "How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs," Computer, Sept. 1979, pp. 690-691.
3. J. Manson, W. Pugh, and S.V. Adve, "The Java Memory Model," Proc. 32nd ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL 05), ACM, 2005, pp. 378-391.
4. H.J. Boehm and S.V. Adve, "Foundations of the C++ Concurrency Memory Model," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, ACM, 2008, pp. 68-78.
5. A. Singh et al., "End-to-End Sequential Consistency," Proc. 39th Ann. Int'l Symp. Computer Architecture, IEEE CS, 2012, pp. 524-535.
6. P. Ranganathan, V. Pai, and S. Adve, "Using Speculative Retirement and Larger Instruction Windows to Narrow the Performance Gap Between Memory Consistency Models," Proc. 9th Ann. ACM Symp. Parallel Algorithms and Architectures, ACM, 1997, pp. 199-210.
7. C. Gniady, B. Falsafi, and T.N. Vijaykumar, "Is SC + ILP = RC?" Proc. 26th Ann. Int'l Symp. Computer Architecture, IEEE CS, 1999, pp. 162-171.
8. D. Marino et al., "A Case for an SC-Preserving Compiler," Proc. 32nd ACM SIGPLAN Conf. Programming Language Design and Implementation, ACM, 2011, pp. 199-210.
9. D. Shasha and M. Snir, "Efficient and Correct Execution of Parallel Programs that Share Memory," ACM Trans. Programming Languages and Systems, Apr. 1988, pp. 282-312.
10. S. Adve, "Designing Memory Consistency Models for Shared-Memory Multiprocessors," doctoral dissertation, Univ. of Wisconsin-Madison, 1993.
11. N. Hardavellas et al., "Reactive NUCA: Near-Optimal Block Placement and Replication in Distributed Caches," Proc. 36th Ann. Int'l Symp. Computer Architecture, ACM, 2009, pp. 184-195.
12. B. Cuesta et al., "Increasing the Effectiveness of Directory Caches by Deactivating Coherence for Private Memory Blocks," Proc. 38th Ann. Int'l Symp. Computer Architecture (ISCA 11), ACM, 2011, pp. 93-104.
13. K. Gharachorloo, A. Gupta, and J. Hennessy, "Two Techniques to Enhance the Performance of Memory Consistency Models," Proc. Int'l Conf. Parallel Processing, CRC Press, 1991, pp. 355-364.
14. S. Narayanasamy et al., "Automatically Classifying Benign and Harmful Data Races Using Replay Analysis," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI 07), ACM, 2007, pp. 22-31.
3 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool