skip to main content
research-article

RADISH: always-on sound and complete RaDetection in Software and Hardware

Published: 09 June 2012 Publication History

Abstract

Data-race freedom is a valuable safety property for multithreaded programs that helps with catching bugs, simplifying memory consistency model semantics, and verifying and enforcing both atomicity and determinism. Unfortunately, existing software-only dynamic race detectors are precise but slow; proposals with hardware support offer higher performance but are imprecise. Both precision and performance are necessary to achieve the many advantages always-on dynamic race detection could provide.
To resolve this trade-off, we propose Radish, a hybrid hardware-software dynamic race detector that is always-on and fully precise. In Radish, hardware caches a principled subset of the metadata necessary for race detection; this subset allows the vast majority of race checks to occur completely in hardware. A flexible software layer handles persistence of race detection metadata on cache evictions and occasional queries to this expanded set of metadata. We show that Radish is correct by proving equivalence to a conventional happens-before race detector.
Our design has modest hardware complexity: caches are completely unmodified and we piggy-back on existing coherence messages but do not otherwise modify the protocol. Furthermore, Radish can leverage type-safe languages to reduce overheads substantially. Our evaluation of a simulated 8-core Radish processor using PARSEC benchmarks shows runtime overheads from negligible to 2x, outperforming the leading software-only race detector by 2x-37x.

References

[1]
D. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP, 2003.
[2]
C. Flanagan and S. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI, 2009.
[3]
S. Adve and H. Boehm. Memory Models: A Case for Rethinking Parallel Languages and Hardware. CACM, Aug 2010.
[4]
G. Blelloch. NESL: A Nested Data-Parallel Language. Technical report, Pittsburgh, PA, USA, 1992.
[5]
R. Bocchino, V. Adve, D. Dig, S. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A Type and Effect System for Deterministic Parallel Java. In OOPSLA, 2009.
[6]
T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A Race and Transaction-Aware Java Runtime. In PLDI, 2007.
[7]
B. Lucia, L. Ceze, K. Strauss, S. Qadeer, and H. Boehm. Conflict Exceptions: Simplifying Concurrent Language Semantics with Precise Hardware Exceptions for Data-Races. In ISCA, 2010.
[8]
D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. DRFx: A Simple and Efficient Memory Model for Concurrent Programming Languages. In PLDI, 2010.
[9]
J. Devietti, B. P. Wood, K. Strauss, L. Ceze, D. Grossman, and S. Qadeer. RADISH: Always-On Sound and Complete Race Detection in Software and Hardware. Technical report, UW-CSE-12-04-01, 2012.
[10]
J. Manson, W. Pugh, and S. Adve. The Java Memory Model. In POPL, 2005.
[11]
H. Boehm and S. Adve. Foundations of the C++ Concurrency Memory Model. In PLDI, 2008.
[12]
J. Ševčík and D. Aspinall. On Validity of Program Transformations in the Java Memory Model. In ECOOP. 2008.
[13]
L. Effinger-Dean, H. Boehm, P. Joisha, and D. Chakrabarti. Extended Sequential Reasoning for Data-Race-Free Programs. In MSPC, 2011.
[14]
C. Flanagan, S. Freund, and J. Yi. Velodrome: A Sound and Complete Dynamic Atomicity Checker for Multithreaded Programs. In PLDI, 2008.
[15]
C. Sadowski, S. Freund, and C. Flanagan. SingleTrack: A Dynamic Determinism Checker for Multithreaded Programs. In ESOP, 2009.
[16]
K. Moore, J. Bobba, M. J. Moravam, M. Hill, and D. Wood. LogTM: Log-based Transactional Memory. In HPCA, 2006.
[17]
R. Rajwar, M. Herlihy, and K. Lai. Virtualizing Transactional Memory. In ISCA, 2005.
[18]
M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient Deterministic Multithreading in Software. In ASPLOS, 2009.
[19]
M. Bender, J. Fineman, S. Gilbert, and C. Leiserson. On-the-fly Maintenance of Series-Parallel Relationships in Fork-Join Multi-threaded Programs. In SPAA, 2004.
[20]
M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and Reproducing Heisenbugs in Concurrent Programs. In OSDI, 2008.
[21]
S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In ASPLOS, 2010.
[22]
L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. CACM, 21, July 1978.
[23]
C. Fidge. Logical Time in Distributed Computing Systems. Computer, 24, August 1991.
[24]
F. Mattern. Virtual Time and Global States of Distributed Systems. In International Workshop on Parallel and Distributed Algorithms, pages 215--226, 1989.
[25]
E. Pozniansky and A. Schuster. Efficient On-the-fly Data Race Detection in Multithreaded C++ Programs. In PPoPP, 2003.
[26]
Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In SOSP, 2005.
[27]
M. Christiaens and K. de Bosschere. Accordion Clocks: Logical Clocks for Data Race Detection. In Euro-Par, 2001.
[28]
J. Mellor-Crummey. On-the-fly Detection of Data Races for Programs with Nested Fork-Join Parallelism. In SC, 1991.
[29]
C. K. Luk et al. PIN: Building Customized Program Analysis Tools with Dynamic Instrumentation. In PLDI, 2005.
[30]
C. Bienia, S. Kumar, J. P. Singh, and K. Li. The PARSEC Benchmark Suite: Characterization and Architectural Implications. In PACT, 2008.
[31]
J. Devietti, C. Blundell, M. Martin, and S. Zdancewic. HardBound: Architectural Support for Spatial Safety of the C Programming Language. In ASPLOS, 2008.
[32]
M. Olszewski, Q. Zhao, D. Koh, J. Ansel, and S. Amarasinghe. Aikido: Accelerating Shared Data Dynamic Analyses. In ASPLOS, 2012.
[33]
S. Min and J.-D. Choi. An Efficient Cache-based Access Anomaly Detection Scheme. In ASPLOS, 1991.
[34]
A. Muzahid, D. Suárez, S. Qi, and J. Torrellas. SigRace: Signature-Based Data Race Detection. In ISCA, 2009.
[35]
M. Prvulovic. CORD: Cost-effective (and nearly overhead-free) Order-Recording and Data race detection. In HPCA, 2006.
[36]
M. Prvulovic and J. Torrellas. ReEnact: Using Thread-Level Speculation Mechanisms to Debug Data Races in Multithreaded Codes. In ISCA, 2003.
[37]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ToCS, 15(4), 1997.
[38]
P. Zhou, R. Teodorescu, and Y. Zhou. HARD: Hardware-Assisted Lockset-based Race Detection. In HPCA, 2007.
[39]
V. Nagarajan and R. Gupta. ECMon: Exposing Cache Events for Monitoring. In ISCA, 2009.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGARCH Computer Architecture News
ACM SIGARCH Computer Architecture News  Volume 40, Issue 3
ISCA '12
June 2012
559 pages
ISSN:0163-5964
DOI:10.1145/2366231
Issue’s Table of Contents
  • cover image ACM Conferences
    ISCA '12: Proceedings of the 39th Annual International Symposium on Computer Architecture
    June 2012
    584 pages
    ISBN:9781450316422
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 June 2012
Published in SIGARCH Volume 40, Issue 3

Check for updates

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 14 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media