Skip to main content

Race Conditions

  • Reference work entry
Encyclopedia of Parallel Computing

Synonyms

Access anomaly; Critical race; Determinacy race; Harmful shared-memory access; Race; Race hazard

Definition

A race condition occurs in a parallel program execution when two or more threads access a common resource, e.g., a variable in shared memory, and the order of the accesses depends on the timing, i.e., the progress of individual threads.

The disposition for a race condition is in the parallel program. In different executions of the same program on the same input access events that constitute a race can occur in different order, which may but does not generally result in different program behaviors (non-determinacy).

Race conditions that can cause unintended non-determinacy are programming errors. Examples of such programming errors are violations of atomicity due to incorrect synchronization.

Discussion

Introduction

Race conditions are common on access to shared resources that facilitate inter-thread synchronization or communication, e.g., locks, barriers, or concurrent...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 1,600.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 1,799.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Bibliography

  1. Adve S, Gharachorloo K (1996) Shared memory consistency models: a tutorial. IEEE Comput 29:66–76

    Article  Google Scholar 

  2. Adve S, Hill M (June 1993) A unified formalization of four shared-memory models. IEEE Trans Parallel Distrib Syst 4(6):613–624

    Article  Google Scholar 

  3. Arvind, Maessen J-W (2006) Memory model = instruction reordering + store atomicity. SIGARCH Comput Archit News 34(2):29–40

    Article  Google Scholar 

  4. Dinning A, Schonberg E (December 1991) Detecting access anomalies in programs with critical sections. In: Proceedings of the ACM/ONR workshop on parallel and distributed debugging, pp 85–96

    Google Scholar 

  5. Emrath PA, Padua DA (January 1989) Automatic detection of nondeterminacy in parallel programs. In: Proceedings of the ACM workshop on parallel and distributed debugging, pp 89–99

    Google Scholar 

  6. Flanagan C, Freund SN (2004) Atomizer: a dynamic atomicity checker for multithreaded programs. In: POPL’04: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on principles of programming languages, ACM, New York, pp 256–267

    Google Scholar 

  7. Herlihy MP, Wing JM (July 1990) Linearizability: a correctness condition for concurrent objects. ACM Trans Program Lang Syst (TOPLAS) 12:463–492

    Article  Google Scholar 

  8. Lamport L (July 1978) Time, clock and the ordering of events in a distributed system. Commun ACM 21(7):558–565

    Article  MATH  Google Scholar 

  9. Lamport L (July 1997) How to make a correct multiprocess program execute correctly on a multiprocessor. IEEE Trans Comput 46(7):779–782

    Article  MathSciNet  Google Scholar 

  10. Manson J, Pugh W, Adve S (2005) The Java memory model. In: Proceedings of the symposium on principles of programming languages (POPL’05). ACM, New York, pp 378–391

    Google Scholar 

  11. Mellor-Crummey J (May 1993) Compile-time support for efficient data race detection in shared-memory parallel programs. In: Proceedings of the workshop on parallel and distributed debugging. ACM, New York, pp 129–139

    Google Scholar 

  12. Message Passing Interface Forum (June 1995) MPI: a message passing interface standard. http://www.mpi-forum.org/

  13. Michael MM, Scott ML (1996) Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: PODC’96: Proceedings of the 15th annual ACM symposium on principles of distributed computing. ACM, New York, pp 267–275

    Google Scholar 

  14. Midkiff S, Padua D (August 1990) Issues in the optimization of parallel programs. In: Proceedings of the international conference on parallel processing, pp 105–113

    Google Scholar 

  15. Nelson C, Boehm H-J (2007) Sequencing and the concurrency memory model (revised). The \(\textrm{ C}++\) Standards Committee, Document WG21/N2171 J16/07-0031

    Google Scholar 

  16. Netzer R, Miller B (1990) On the complexity of event ordering for shared-memory parallel program executions. In: Proceedings of the international conference on parallel processing, Pennsylvania State University, University Park. Pennsylvania State University Press, University Park, pp 93–97

    Google Scholar 

  17. Netzer R, Miller B (July 1991) Improving the accuracy of data race detection. Proceedings of the ACM SIGPLAN symposium on principles and practice of parallel programming PPOPP, published in ACM SIGPLAN NOTICES 26(7):133–144

    Google Scholar 

  18. Netzer R, Miller B (March 1992) What are race conditions? Some issues and formalizations. ACM Lett Program Lang Syst 1(1): 74–88

    Article  Google Scholar 

  19. Nudler I, Rudolph L (1988) Tools for the efficient development of efficient parallel programs. In: Proceedings of the 1st Israeli conference on computer system engineering

    Google Scholar 

  20. Saraswat VA, Jagadeesan R, Michael M, von Praun C (2007) A theory of memory models. In: PPoPP’07: Proceedings of the 12th ACM SIGPLAN symposium on principles and practice of parallel programming. ACM, New York, pp 161–172

    Google Scholar 

  21. Shasha D, Snir M (April 1988) Efficient and correct execution of parallel programs that share memory. ACM Trans Program Lang Syst 10(2):282–312

    Article  Google Scholar 

  22. Sterling N (January 1993) WARLOCK: a static data race analysis tool. In: USENIX Association (ed) Proceedings of the USENIX winter 1993 conference, San Diego, pp 97–106

    Google Scholar 

  23. Weaver DL, Germond T (1991) The SPARC architecture manual (version 9)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer Science+Business Media, LLC

About this entry

Cite this entry

von Praun, C. (2011). Race Conditions. In: Padua, D. (eds) Encyclopedia of Parallel Computing. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-09766-4_36

Download citation

Publish with us

Policies and ethics