Abstract
Shared-memory languages and systems generally provide weak or undefined semantics for executions with data races. Prior work has proposed memory consistency models that ensure well-defined, easy-to-understand semantics based on region serializability (RS), but the resulting system may throw a consistency exception in the presence of a data race. Consistency exceptions can occur unexpectedly even in well-tested programs, hurting availability and thus limiting the practicality of RS-based memory models.
To our knowledge, this paper is the first to consider the problem of availability for memory consistency models that throw consistency exceptions. We first extend existing approaches that enforce RSx, a memory model based on serializability of synchronization-free regions (SFRs), to avoid region conflicts and thus consistency exceptions. These new approaches demonstrate both the potential for and limitations of avoiding consistency exceptions under RSx. To improve availability further, we introduce (1) a new memory model called RIx based on isolation of SFRs and (2) a new approach called Avalon that provides RIx. We demonstrate two variants of Avalon that offer different performance-availability tradeoffs for RIx.
An evaluation on real Java programs shows that this work's novel approaches are able to reduce consistency exceptions, thereby improving the applicability of strong memory consistency models. Furthermore, the approaches provide compelling points in the performance-availability tradeoff space for memory consistency enforcement. RIx and Avalon thus represent a promising direction for tackling the challenge of availability under strong consistency models that throw consistency exceptions.
- M. Abadi, C. Flanagan, and S. N. Freund. Types for Safe Locking: Static Race Detection for Java. TOPLAS, 28(2):207–255, 2006. Google Scholar
Digital Library
- S. V. Adve and H.-J. Boehm. Memory Models: A Case for Rethinking Parallel Languages and Hardware. CACM, 53:90–101, 2010. Google Scholar
Digital Library
- S. V. Adve and K. Gharachorloo. Shared Memory Consistency Models: A Tutorial. IEEE Computer, 29:66–76, 1996. Google Scholar
Digital Library
- S. V. Adve and M. D. Hill. Weak Ordering—A New Definition. In ISCA, pages 2–14, 1990. Google Scholar
Digital Library
- A. Adya. Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions. PhD thesis, Massachusetts Institute of Technology, 1999. Google Scholar
Digital Library
- A. Adya, B. Liskov, and P. O’Neil. Generalized Isolation Level Definitions. In ICDE, pages 67–78, 2000.Google Scholar
Cross Ref
- W. Ahn, S. Qi, M. Nicolaides, J. Torrellas, J.-W. Lee, X. Fang, S. Midkiff, and D. Wong. BulkCompiler: High-Performance Sequential Consistency through Cooperative Compiler and Hardware Support. In MICRO, pages 133–144, 2009. Google Scholar
Digital Library
- B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño Virtual Machine. IBM Systems Journal, 39(1):211–238, 2000. Google Scholar
Digital Library
- B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. Fink, D. Grove, M. Hind, K. S. McKinley, M. Mergen, J. E. B. Moss, T. Ngo, and V. Sarkar. The Jikes Research Virtual Machine Project: Building an Open-Source Research Community. IBM Systems Journal, 44:399–417, 2005. Google Scholar
Digital Library
- C. S. Ananian, K. Asanovic, B. C. Kuszmaul, C. E. Leiserson, and S. Lie. Unbounded Transactional Memory. In HPCA, pages 316–327, 2005. Google Scholar
Digital Library
- H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O’Neil, and P. O’Neil. A Critique of ANSI SQL Isolation Levels. In SIGMOD, pages 1–10, 1995. Google Scholar
Digital Library
- T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. Core-Det: A Compiler and Runtime System for Deterministic Multithreaded Execution. In ASPLOS, pages 53–64, 2010. Google Scholar
Digital Library
- P. A. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency Control and Recovery in Database Systems. Addison-Wesley Longman, 1986. Google Scholar
Digital Library
- S. Biswas, M. Zhang, M. D. Bond, and B. Lucia. Valor: Efficient, Software-Only Region Conflict Exceptions. In OOPSLA, pages 241– 259, 2015. Google Scholar
Digital Library
- S. Biswas, R. Zhang, M. D. Bond, and B. Lucia. Efficient Architecture Support for Region-Serializability-Based Consistency. Technical Report OSU-CISRC-4/17-TR01, Computer Science & Engineering, Ohio State University, 2017.Google Scholar
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovi´c, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA, pages 169–190, 2006. Google Scholar
Digital Library
- S. M. Blackburn and K. S. McKinley. Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance. In PLDI, pages 22–32, 2008. Google Scholar
Digital Library
- H.-J. Boehm. How to miscompile programs with “benign” data races. In HotPar, 2011. Google Scholar
Digital Library
- H.-J. Boehm. Position paper: Nondeterminism is Unavoidable, but Data Races are Pure Evil. In RACES, pages 9–14, 2012. Google Scholar
Digital Library
- H.-J. Boehm and S. V. Adve. Foundations of the C++ Concurrency Memory Model. In PLDI, pages 68–78, 2008. Google Scholar
Digital Library
- H.-J. Boehm and S. V. Adve. You Don’t Know Jack about Shared Variables or Memory Models. CACM, 55(2):48–54, 2012. Google Scholar
Digital Library
- H.-J. Boehm and B. Demsky. Outlawing Ghosts: Avoiding Out-of-Thin-Air Results. In MSPC, pages 7:1–7:6, 2014. Google Scholar
Digital Library
- M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: Proportional Detection of Data Races. In PLDI, pages 255–268, 2010. Google Scholar
Digital Library
- C. Boyapati, R. Lee, and M. Rinard. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In OOPSLA, pages 211–230, 2002. Google Scholar
Digital Library
- S. Burckhardt, A. Baldassin, and D. Leijen. Concurrent Programming with Revisions and Isolation Types. In OOPSLA, pages 691–707, 2010. Google Scholar
Digital Library
- J. Burnim, K. Sen, and C. Stergiou. Testing Concurrent Programs on Relaxed Memory Models. In ISSTA, pages 122–132, 2011. Google Scholar
Digital Library
- M. J. Cahill, U. Röhm, and A. D. Fekete. Serializable Isolation for Snapshot Databases. In SIGMOD, pages 729–738, 2008. Google Scholar
Digital Library
- M. Cao, J. Roemer, A. Sengupta, and M. D. Bond. Prescient Memory: Exposing Weak Memory Model Behavior by Looking into the Future. In ISMM, pages 99–110, 2016. Google Scholar
Digital Library
- M. Christiaens and K. De Bosschere. TRaDe, A Topological Approach to On-the-fly Race Detection in Java Programs. In JVM, pages 15–15, 2001. Google Scholar
Digital Library
- L. Dalessandro and M. L. Scott. Sandboxing Transactional Memory. In PACT, pages 171–180, 2012. Google Scholar
Digital Library
- L. Dalessandro, M. F. Spear, and M. L. Scott. NOrec: Streamlining STM by Abolishing Ownership Records. In PPoPP, pages 67–78, 2010. Google Scholar
Digital Library
- J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: Deterministic Shared Memory Multiprocessing. In ASPLOS, pages 85–96, 2009. Google Scholar
Digital Library
- 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. In ISCA, pages 201–212, 2012. Google Scholar
Digital Library
- A. Dragojevi´c, P. Felber, V. Gramoli, and R. Guerraoui. Why STM Can Be More than a Research Toy. CACM, 54:70–77, 2011. Google Scholar
Digital Library
- T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A Race and Transaction-Aware Java Runtime. In PLDI, pages 245–255, 2007. Google Scholar
Digital Library
- S. Elnikety, W. Zwaenepoel, and F. Pedone. Database Replication Using Generalized Snapshot Isolation. In SRDS, pages 73–84, 2005. Google Scholar
Digital Library
- D. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP, pages 237–252, 2003. Google Scholar
Digital Library
- J. Erickson, M. Musuvathi, S. Burckhardt, and K. Olynyk. Effective Data-Race Detection for the Kernel. In OSDI, pages 1–16, 2010. Google Scholar
Digital Library
- A. Fekete, D. Liarokapis, E. O’Neil, P. O’Neil, and D. Shasha. Making Snapshot Isolation Serializable. ACM Trans. Database Syst., 30(2):492–528, 2005. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI, pages 121–133, 2009. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. Adversarial Memory for Detecting Destructive Races. In PLDI, pages 244–254, 2010. Google Scholar
Digital Library
- K. Gharachorloo, A. Gupta, and J. Hennessy. Performance Evaluation of Memory Consistency Models for Shared-memory Multiprocessors. In ASPLOS, pages 245–257, 1991. Google Scholar
Digital Library
- P. Godefroid and N. Nagappan. Concurrency at Microsoft – An Exploratory Survey. In EC 2, 2008.Google Scholar
- L. Hammond, V. Wong, M. Chen, B. D. Carlstrom, J. D. Davis, B. Hertzberg, M. K. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun. Transactional Memory Coherence and Consistency. In ISCA, pages 102–113, 2004. Google Scholar
Digital Library
- T. Harris, J. Larus, and R. Rajwar. Transactional Memory. Morgan and Claypool Publishers, 2nd edition, 2010. Google Scholar
Digital Library
- G. Jin, W. Zhang, D. Deng, B. Liblit, and S. Lu. Automated Concurrency-Bug Fixing. In OSDI, pages 221–236, 2012. Google Scholar
Digital Library
- B. Kasikci, C. Zamfir, and G. Candea. Data Races vs. Data Race Bugs: Telling the Difference with Portend. In ASPLOS, pages 185– 198, 2012. Google Scholar
Digital Library
- B. Kasikci, C. Zamfir, and G. Candea. RaceMob: Crowdsourced Data Race Detection. In SOSP, pages 406–422, 2013. Google Scholar
Digital Library
- E. Knapp. Deadlock Detection in Distributed Databases. ACM Computing Surveys, 19(4):303–328, 1987. Google Scholar
Digital Library
- I. Kuru, B. K. Ozkan, S. O. Mutluergil, S. Tasiran, T. Elmas, and E. Cohen. Verifying Programs under Snapshot Isolation and Similar Relaxed Consistency Models. In TRANSACT, 2014.Google Scholar
- L. Lamport. How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs. IEEE Computer, 28:690–691, 1979. Google Scholar
Digital Library
- N. G. Leveson and C. S. Turner. An Investigation of the Therac-25 Accidents. IEEE Computer, 26(7):18–41, 1993. Google Scholar
Digital Library
- C. Lin, V. Nagarajan, and R. Gupta. Efficient Sequential Consistency Using Conditional Fences. In PACT, pages 295–306, 2010. Google Scholar
Digital Library
- C. Lin, V. Nagarajan, R. Gupta, and B. Rajaram. Efficient Sequential Consistency via Conflict Ordering. In ASPLOS, pages 273–286, 2012. Google Scholar
Digital Library
- H. Litz, D. Cheriton, A. Firoozshahian, O. Azizi, and J. P. Stevenson. SI-TM: Reducing Transactional Memory Abort Rates Through Snapshot Isolation. In ASPLOS, pages 383–398, 2014. Google Scholar
Digital Library
- H. Litz, R. J. Dias, and D. R. Cheriton. Efficient Correction of Anomalies in Snapshot Isolation Transactions. TACO, 11(4):65:1– 65:24, 2015. Google Scholar
Digital Library
- T. Liu, C. Curtsinger, and E. D. Berger. Dthreads: Efficient Deterministic Multithreading. In SOSP, pages 327–336, 2011. Google Scholar
Digital Library
- S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from Mistakes: A Comprehensive Study on Real World Concurrency Bug Characteristics. In ASPLOS, pages 329–339, 2008. Google Scholar
Digital Library
- B. Lucia, L. Ceze, K. Strauss, S. Qadeer, and H.-J. Boehm. Conflict Exceptions: Simplifying Concurrent Language Semantics with Precise Hardware Exceptions for Data-Races. In ISCA, pages 210–221, 2010. Google Scholar
Digital Library
- B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-Aid: Detecting and Surviving Atomicity Violations. In ISCA, pages 277–288, 2008. Google Scholar
Digital Library
- J. Manson, W. Pugh, and S. V. Adve. The Java Memory Model. In POPL, pages 378–391, 2005. Google Scholar
Digital Library
- D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. DRFx: A Simple and Efficient Memory Model for Concurrent Programming Languages. In PLDI, pages 351–362, 2010. Google Scholar
Digital Library
- D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. A Case for an SC-Preserving Compiler. In PLDI, pages 199–210, 2011. Google Scholar
Digital Library
- M. Naik and A. Aiken. Conditional Must Not Aliasing for Static Race Detection. In POPL, pages 327–338, 2007. Google Scholar
Digital Library
- M. Naik, A. Aiken, and J. Whaley. Effective Static Race Detection for Java. In PLDI, pages 308–319, 2006. Google Scholar
Digital Library
- S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically Classifying Benign and Harmful Data Races Using Replay Analysis. In PLDI, pages 22–31, 2007. Google Scholar
Digital Library
- R. O’Callahan and J.-D. Choi. Hybrid Dynamic Data Race Detection. In PPoPP, pages 167–178, 2003. Google Scholar
Digital Library
- J. Ouyang, P. M. Chen, J. Flinn, and S. Narayanasamy. ...and region serializability for all. In HotPar, 2013.Google Scholar
- PCWorld. Nasdaq’s Facebook Glitch Came From Race Conditions, 2012. http://www.pcworld.com/article/255911/nasdaqs_ facebook_glitch_came_from_race_conditions.html.Google Scholar
- D. R. K. Ports and K. Grittner. Serializable Snapshot Isolation in PostgreSQL. VLDB, 5(12):1850–1861, 2012. Google Scholar
Digital Library
- E. Pozniansky and A. Schuster. MultiRace: Efficient On-the-Fly Data Race Detection in Multithreaded C++ Programs. CCPE, 19(3):327– 340, 2007. Google Scholar
Digital Library
- P. Ranganathan, V. Pai, and S. Adve. Using Speculative Retirement and Larger Instruction Windows to Narrow the Performance Gap between Memory Consistency Models. In SPAA, pages 199–210, 1997. Google Scholar
Digital Library
- S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A Dynamic Data Race Detector for Multi-Threaded Programs. In SOSP, pages 27–37, 1997. Google Scholar
Digital Library
- C. Segulja and T. S. Abdelrahman. Clean: A Race Detector with Cleaner Semantics. In ISCA, pages 401–413, 2015. Google Scholar
Digital Library
- K. Sen. Race Directed Random Testing of Concurrent Programs. In PLDI, pages 11–21, 2008. Google Scholar
Digital Library
- A. Sengupta, S. Biswas, M. Zhang, M. D. Bond, and M. Kulkarni. Hybrid Static–Dynamic Analysis for Statically Bounded Region Serializability. In ASPLOS, pages 561–575, 2015. Google Scholar
Digital Library
- K. Serebryany and T. Iskhodzhanov. ThreadSanitizer – data race detection in practice. In WBIA, pages 62–71, 2009. Google Scholar
Digital Library
- J. Ševˇcík and D. Aspinall. On Validity of Program Transformations in the Java Memory Model. In ECOOP, pages 27–51, 2008. Google Scholar
Digital Library
- D. Shasha and M. Snir. Efficient and Correct Execution of Parallel Programs that Share Memory. TOPLAS, 10(2):282–312, 1988. Google Scholar
Digital Library
- A. Singh, D. Marino, S. Narayanasamy, T. Millstein, and M. Musuvathi. Efficient Processor Support for DRFx, a Memory Model with Exceptions. In ASPLOS, pages 53–66, 2011. Google Scholar
Digital Library
- A. Singh, S. Narayanasamy, D. Marino, T. Millstein, and M. Musuvathi. End-to-End Sequential Consistency. In ISCA, pages 524–535, 2012. Google Scholar
Digital Library
- L. A. Smith, J. M. Bull, and J. Obdrzálek. A Parallel Java Grande Benchmark Suite. In SC, pages 8–8, 2001. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01, 2001.Google Scholar
- Z. Sura, X. Fang, C.-L. Wong, S. P. Midkiff, J. Lee, and D. Padua. Compiler Techniques for High Performance Sequentially Consistent Java Programs. In PPoPP, pages 2–13, 2005. Google Scholar
Digital Library
- U.S.–Canada Power System Outage Task Force. Final Report on the August 14th Blackout in the United States and Canada. Technical report, Department of Energy, 2004.Google Scholar
- C. von Praun and T. R. Gross. Object Race Detection. In OOPSLA, pages 70–82, 2001. Google Scholar
Digital Library
- J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static Race Detection on Millions of Lines of Code. In ESEC/FSE, pages 205–214, 2007. Google Scholar
Digital Library
- L. Wang and S. D. Stoller. Accurate and Efficient Runtime Detection of Atomicity Errors in Concurrent Programs. In PPoPP, pages 137– 146, 2006. Google Scholar
Digital Library
- Y. Wang, T. Kelly, M. Kudlur, S. Lafortune, and S. A. Mahlke. Gadara: Dynamic Deadlock Avoidance for Multithreaded Programs. In OSDI, pages 281–294, 2008. Google Scholar
Digital Library
- Y. Wang, S. Lafortune, T. Kelly, M. Kudlur, and S. Mahlke. The Theory of Deadlock Avoidance via Discrete Control. In POPL, pages 252–263, 2009. Google Scholar
Digital Library
- A. Welc, B. Saha, and A.-R. Adl-Tabatabai. Irrevocable Transactions and their Applications. In SPAA, pages 285–296, 2008. Google Scholar
Digital Library
- B. P. Wood, L. Ceze, and D. Grossman. Low-Level Detection of Language-Level Data Races with LARD. In ASPLOS, pages 671–686, 2014. Google Scholar
Digital Library
- R. M. Yoo, Y. Ni, A. Welc, B. Saha, A.-R. Adl-Tabatabai, and H.-H. S. Lee. Kicking the Tires of Software Transactional Memory: Why the Going Gets Tough. In SPAA, pages 265–274, 2008. Google Scholar
Digital Library
- J. Yu and S. Narayanasamy. A Case for an Interleaving Constrained Shared-Memory Multi-Processor. In ISCA, pages 325–336, 2009. Google Scholar
Digital Library
- J. Yu and S. Narayanasamy. Tolerating Concurrency Bugs Using Transactions as Lifeguards. In MICRO, pages 263–274, 2010. Google Scholar
Digital Library
- Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In SOSP, pages 221– 234, 2005. Google Scholar
Digital Library
- P. Zhou, R. Teodorescu, and Y. Zhou. HARD: Hardware-Assisted Lockset-based Race Detection. In HPCA, pages 121–132, 2007. Google Scholar
Digital Library
Index Terms
Avoiding consistency exceptions under strong memory models
Recommendations
Avoiding consistency exceptions under strong memory models
ISMM 2017: Proceedings of the 2017 ACM SIGPLAN International Symposium on Memory ManagementShared-memory languages and systems generally provide weak or undefined semantics for executions with data races. Prior work has proposed memory consistency models that ensure well-defined, easy-to-understand semantics based on region serializability (...
Leveraging Transactional Execution for Memory Consistency Model Emulation
System emulation is widely used in today’s computer systems. This technology opens new opportunities for resource sharing as well as enhancing system security and reliability. System emulation across different instruction set architectures (ISA) can ...
Valor: efficient, software-only region conflict exceptions
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsData races complicate programming language semantics, and a data race is often a bug. Existing techniques detect data races and define their semantics by detecting conflicts between synchronization-free regions (SFRs). However, such techniques either ...






Comments