Abstract
This paper presents Fast Instrumentation Bias (FIB), a sound and complete dynamic data race detection algorithm that improves performance by reducing or eliminating the costs of analysis atomicity. In addition to checking for errors in target programs, dynamic data race detectors must introduce synchronization to guard against metadata races that may corrupt analysis state and compromise soundness or completeness. Pessimistic analysis synchronization can account for nontrivial performance overhead in a data race detector.
The core contribution of FIB is a novel cooperative ownership-based synchronization protocol whose states and transitions are derived purely from preexisting analysis metadata and logic in a standard data race detection algorithm. By exploiting work already done by the analysis, FIB ensures atomicity of dynamic analysis actions with zero additional time or space cost in the common case. Analysis of temporally thread-local or read-shared accesses completes safely with no synchronization. Uncommon write-sharing transitions require synchronous cross-thread coordination to ensure common cases may proceed synchronization-free.
We implemented FIB in the Jikes RVM Java virtual machine. Experimental evaluation shows that FIB eliminates nearly all instrumentation atomicity costs on programs where data often experience windows of thread-local access. Adaptive extensions to the ownership policy effectively eliminate high coordination costs of the core ownership protocol on programs with high rates of serialized sharing. FIB outperforms a naive pessimistic synchronization scheme by 50% on average. Compared to a tuned optimistic metadata synchronization scheme based on conventional fine-grained atomic compare-and-swap operations, FIB is competitive overall, and up to 17% faster on some programs. Overall, FIB effectively exploits latent analysis and program invariants to bring strong integrity guarantees to an otherwise unsynchronized data race detection algorithm at minimal cost.
- Sarita Adve. 2010. Data races are evil with no exceptions. Commun. ACM 53, 11 (Nov. 2010), 84.Google Scholar
Digital Library
- Sarita V. Adve and Hans-Juergen Boehm. 2010. Memory Models: A Case for Rethinking Parallel Languages and Hardware. Commun. ACM 53 (Aug. 2010). Issue 8.Google Scholar
- Sarita V. Adve and K. Gharachorloo. 1996. Shared Memory Consistency Models: A Tutorial. IEEE Computer 29, 12 (1996), 66–76. Google Scholar
Digital Library
- Sarita V. Adve and Mark D. Hill. 1990. Weak Ordering—A New De�nition. In ACM/IEEE International Symposium on Computer Architecture.Google Scholar
- Sarita V. Adve, Mark D. Hill, Barton P. Miller, and Robert H. B. Netzer. 1991. Detecting Data Races on Weak Memory Systems. In ACM/IEEE International Symposium on Computer Architecture. Google Scholar
Digital Library
- Bowen Alpern, C. Richard Attanasio, John J. Barton, Anthony Cocchi, Susan Flynn Hummel, Derek Lieber, Ton Ngo, Mark F. Mergen, Janice C. Shepherd, and Stephen E. Smith. 1999. Implementing Jalapeño in Java. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. http://www.jikesrvm.org.Google Scholar
- David F. Bacon, Ravi Konuru, Chet Murthy, and Mauricio Serrano. 1998. Thin Locks: Featherweight Synchronization for Java. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Utpal Banerjee, Brian Bliss, Zhiqiang Ma, and Paul Petersen. 2006. A Theory of Data Race Detection. In Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging. Google Scholar
Digital Library
- Tom Bergan, Owen Anderson, Joseph Devietti, Luis Ceze, and Dan Grossman. 2010. CoreDet: A Compiler and Runtime System for Deterministic Multithreaded Execution. In International Conference on Architectural Support for Programming Languages and Operating Systems. Google Scholar
Digital Library
- Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Brandon Lucia. 2015. Valor: E�cient, Software-Only Region Con�ict Exceptions. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications.Google Scholar
- Stephen M. Blackburn, Robin Garner, Chris Ho�man, Asiad M. Khan, Kathryn S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony Hosking, Maria Jump, Han Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanović, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Google Scholar
Digital Library
- Hans-Juergen Boehm and Sarita V. Adve. 2008. Foundations of the C++ Concurrency Memory Model. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Hans-Juergen Boehm and Sarita V. Adve. 2012. You Don’t Know Jack About Shared Variables or Memory Models. Commun. ACM 55, 2 (Feb. 2012), 48–54. Google Scholar
Digital Library
- Michael D. Bond, Milind Kulkarni, Man Cao, Minjia Zhang, Meisam Fathi Salmi, Swarnendu Biswas, Aritra Sengupta, and Jipeng Huang. 2013. Octet: Capturing and Controlling Cross-Thread Dependences E�ciently. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Google Scholar
Digital Library
- Man Cao, Minjia Zhang, Aritra Sengupta, and Michael D. Bond. 2016. Drinking from Both Glasses: Combining Pessimistic and Optimistic Tracking of Cross-thread Dependences. In ACM Symposium on Principles and Practice of Parallel Programming.Google Scholar
- Luis Ceze, Joseph Devietti, Brandon Lucia, and Shaz Qadeer. 2009. A Case for System Support for Concurrency Exceptions. In USENIX Workshop on Hot Topics in Parallelism �HotPar).Google Scholar
- Jong-Deok Choi, Keunwoo Lee, Alexey Loginov, Robert O’Callahan, Vivek Sarkar, and Manu Sridharan. 2002. E�cient and Precise Datarace Detection for Multithreaded Object-Oriented Programs. In ACM Conference on Programming Language Design and Implementation.Google Scholar
- Jong-Deok Choi and Sang Lyul Min. 1991. Race Frontier: Reproducing Data Races in Parallel-Program Debugging. In ACM Symposium on Principles and Practice of Parallel Programming. Google Scholar
Digital Library
- Mark Christaens and Koen De Bosschere. 2001. A Topological Approach to On-the-�y Race Detection in Java Programs. In Symposium on Java Virtual Machine Research and Technology.Google Scholar
- Joseph Devietti, Brandon Lucia, Luis Ceze, and Mark Oskin. 2009. DMP: Deterministic Shared Memory Multiprocessing. In International Conference on Architectural Support for Programming Languages and Operating Systems. Google Scholar
Digital Library
- Joseph Devietti, Benjamin P. Wood, Karin Strauss, Luis Ceze, Dan Grossman, and Shaz Qadeer. 2012. RADISH: Always-On Sound and Complete Race Detection in Software and Hardware. In ACM/IEEE International Symposium on Computer Architecture. Google Scholar
Cross Ref
- Laura E�nger-Dean, Brandon Lucia, Luis Ceze, Dan Grossman, and Hans-Juergen Boehm. 2012. IFRit: Interference-free Regions for Dynamic Data-Race Detection. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications.Google Scholar
- Tayfun Elmas, Shaz Qadeer, and Serdar Tasiran. 2007. Goldilocks: A Race and Transaction-Aware Java Runtime. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Colin Fidge. 1991. Logical Time in Distributed Computing Systems. IEEE Computer 24 (August 1991). Issue 8.Google Scholar
Digital Library
- Stephen J. Fink and Feng Qian. 2003. Design, Implementation and Evaluation of Adaptive Recompilation with On-stack Replacement. In Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization. Google Scholar
Cross Ref
- Cormac Flanagan and Stephen N. Freund. 2000. Type-Based Race Detection for Java. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: E�cient and Precise Dynamic Race Detection. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Cormac Flanagan and Stephen N. Freund. 2010. The RoadRunner Dynamic Analysis Framework for Concurrent Programs. In ACM SIGPLAN/SIGSOFT Workshop on Program Analysis for Software Tools and Engineering. Google Scholar
Digital Library
- Cormac Flanagan and Stephen N. Freund. 2013. RedCard: Redundant Check Elimination For Dynamic Race Detectors. In European Conference on Object-Oriented Programming.Google Scholar
- Cormac Flanagan and Stephen N. Freund. 2017. The FastTrack2 Race Detector. Technical Report CSTR201701. Williams College. Working draft – accessed 25 August 2017.Google Scholar
- Cormac Flanagan, Stephen N. Freund, and Jaeheon Yi. 2008. Velodrome: A Sound And Complete Dynamic Atomicity Checker for Multithreaded Programs. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- K. Kawachiya, A. Koseki, and T. Onodera. 2002. Lock Reservation: Java Locks Can Mostly Do Without Atomic Operations. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Google Scholar
Digital Library
- Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21 (July 1978). Issue 7.Google Scholar
- Leslie Lamport. 1979. How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs. IEEE Trans. Comput. C-28, 9 (1979), 690–691. Google Scholar
Digital Library
- Brandon Lucia, Luis Ceze, Karin Strauss, Shaz Qadeer, and Hans-Juergen Boehm. 2010. Con�ict Exceptions: Simplifying Concurrent Language Semantics with Precise Hardware Exceptions for Data-Races. In ACM/IEEE International Symposium on Computer Architecture.Google Scholar
- Jeremy Manson, William Pugh, and Sarita V. Adve. 2005. The Java Memory Model. In ACM Symposium on Principles of Programming Languages. Google Scholar
Digital Library
- Daniel Marino, Abhayendra Singh, Todd D. Millstein, Madanlal Musuvathi, and Satish Narayanasamy. 2010. DRFx: A Simple and E�cient Memory Model for Concurrent Programming Languages. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Hassan Salehe Matar, Ismail Kuru, Serdar Tasiran, and Roman Dementiev. 2014. Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support. In Workshop on Determinism and Correctness in Parallel Programming.Google Scholar
- Friedemann Mattern. 1989. Virtual Time and Global States of Distributed Systems. In International Workshop on Parallel and Distributed Algorithms. 215–226.Google Scholar
- Sang L. Min and Jong-Deok Choi. 1991. An E�cient Cache-based Access Anomaly Detection Scheme. In International Conference on Architectural Support for Programming Languages and Operating Systems.Google Scholar
- Abdullah Muzahid, Dario Suárez, Shanxiang Qi, and Josep Torrellas. 2009. SigRace: Signature-Based Data Race Detection. In ACM/IEEE International Symposium on Computer Architecture. Google Scholar
Digital Library
- Mayur Naik, Alex Aiken, and John Whaley. 2006. E�ective Static Race Detection for Java. In ACM Conference on Programming Language Design and Implementation.Google Scholar
Digital Library
- Takuya Nakaike and Maged M. Michael. 2010. Lock Elision for Read-Only Critical Sections in Java. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Robert H. B. Netzer and Barton P. Miller. 1991. Improving the Accuracy of Data Race Detection. In ACM Symposium on Principles and Practice of Parallel Programming. Google Scholar
Digital Library
- Robert H. B. Netzer and Barton P. Miller. 1992. What Are Race Conditions?: Some Issues and Formalizations. ACM Letters on Programming Languages and Systems 1, 1 (March 1992), 74âĂŞ88.Google Scholar
Digital Library
- Marek Olszewski, Jason Ansel, and Saman Amarasinghe. 2009. Kendo: E�cient Deterministic Multithreading in Software. In International Conference on Architectural Support for Programming Languages and Operating Systems. Google Scholar
Digital Library
- Mark S. Papamarcos and Janak H. Patel. 1984. A Low-Overhead Coherence Solution for Multiprocessors with Private Cache Memories. In ACM/IEEE International Symposium on Computer Architecture. Google Scholar
Digital Library
- Yuanfeng Peng and Joseph Devietti. 2015. SlimFast: Reducing Metadata Redundancy in Sound & Complete Dynamic Data Race Detection. In PLDI Student Research Competition.Google Scholar
- Yuanfeng Peng, Benjamin P. Wood, and Joseph Devietti. 2017. PARSNIP: Performant Architecture for Race Safety with No Impact on Precision. In ACM/IEEE International Symposium on Microarchitecture.Google Scholar
Digital Library
- Filip Pizlo, Daniel Frampton, and Antony L. Hosking. 2011. Fine-grained Adaptive Biased Locking. In International Conference on Principles and Practice of Programming in Java. Google Scholar
Digital Library
- Milos Prvulovic. 2006. CORD: Cost-e�ective (and nearly overhead-free) Order-Recording and Data race detection. In International Symposium on High-Performance Computer Architecture. Google Scholar
Cross Ref
- Milos Prvulovic and Josep Torrellas. 2003. ReEnact: Using Thread-Level Speculation Mechanisms to Debug Data Races in Multithreaded Codes. In ACM/IEEE International Symposium on Computer Architecture. Google Scholar
Digital Library
- Ravi Rajwar and James R. Goodman. 2001. Speculative Lock Elision: Enabling Highly Concurrent Multithreaded Execution. In ACM/IEEE International Symposium on Microarchitecture.Google Scholar
- Dustin Rhodes, Cormac Flanagan, and Stephen N. Freund. 2017. BigFoot: Static Check Placement for Dynamic Race Detection. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Ian Rogers and Balaji Iyengar. 2011. Reducing Biased Lock Revocation By Learning. In Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems. Google Scholar
Digital Library
- K. Russell and D. Detlefs. 2006. Eliminating Synchronization-Related Atomic Operations with Biased Locking and Bulk Rebiasing. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Google Scholar
Digital Library
- Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson. 1997. Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ACM Transactions on Computer Systems 15, 4 (1997). Google Scholar
Digital Library
- Konstantin Serebryany and Timur Iskhodzhanov. 2009. ThreadSanitizer: Data Race Detection in Practice. In Workshop on Binary Instrumentation and Applications. Google Scholar
Digital Library
- Peter Sewell, Susmit Sarkar, Scott Owens, Francesco Zappa Nardelli, and Magnus O. Myreen. 2010. x86-TSO: A Rigorous and Usable Programmer’s Model for x86 Multiprocessors. Commun. ACM 53, 7 (July 2010), 89–97. Google Scholar
Digital Library
- Tatiana Shpeisman, Vijay Menon, Ali-Reza Adl-Tabatabai, Steven Balensiefer, Dan Grossman, Richard L. Hudson, Katherine F. Moore, and Bratin Saha. 2007. Enforcing Isolation and Ordering in STM. In ACM Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Abhayendra Singh, Daniel Marino, Satish Narayanasamy, Todd D. Millstein, and Madanlal Musuvathi. 2011. E�cient Processor Support for DRFx, a Memory Model with Exceptions. In International Conference on Architectural Support for Programming Languages and Operating Systems.Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. 2005. SPECjbb2005. http://www.spec.org/jbb2005/ . (2005).Google Scholar
- Nalini Vasudevan, Kedar S. Namjoshi, and Stephen A. Edwards. 2010. Simple and Fast Biased Locks. In International Conference on Parallel Architectures and Compilation Techniques. Google Scholar
Digital Library
- Christoph von Praun and Thomas Gross. 2001. Object Race Detection. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Google Scholar
Digital Library
- James R. Wilcox, Parker Finch, Cormac Flanagan, and Stephen N. Freund. 2015. Array Shadow State Compression for Precise Dynamic Race Detection. In IEEE/ACM International Conference on Automated Software Engineering.Google Scholar
- Benjamin P. Wood, Luis Ceze, and Dan Grossman. 2014. Low-Level Detection of Language-Level Data Races with LARD. In International Conference on Architectural Support for Programming Languages and Operating Systems. Google Scholar
Digital Library
- Xi Yang, Stephen M. Blackburn, Daniel Frampton, Jennifer B. Sartor, and Kathryn S. McKinley. 2011. Why Nothing Matters: The Impact of Zeroing. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Google Scholar
Digital Library
- Yuan Yu, Tom Rodehe�er, and Wei Chen. 2005. RaceTrack: E�cient Detection of Data Race Conditions via Adaptive Tracking. In ACM Symposium on Operating Systems Principles. Google Scholar
Digital Library
- P. Zhou, R. Teodorescu, and Y. Zhou. 2007. HARD: Hardware-Assisted Lockset-based Race Detection. In International Symposium on High-Performance Computer Architecture.Google Scholar
Index Terms
Instrumentation bias for dynamic data race detection
Recommendations
Parallelizing data race detection
ASPLOS '13: Proceedings of the eighteenth international conference on Architectural support for programming languages and operating systemsDetecting data races in multithreaded programs is a crucial part of debugging such programs, but traditional data race detectors are too slow to use routinely. This paper shows how to speed up race detection by spreading the work across multiple cores. ...
Parallelizing data race detection
ASPLOS '13Detecting data races in multithreaded programs is a crucial part of debugging such programs, but traditional data race detectors are too slow to use routinely. This paper shows how to speed up race detection by spreading the work across multiple cores. ...
Parallelizing data race detection
ASPLOS '13Detecting data races in multithreaded programs is a crucial part of debugging such programs, but traditional data race detectors are too slow to use routinely. This paper shows how to speed up race detection by spreading the work across multiple cores. ...






Comments