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...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Bibliography
Adve S, Gharachorloo K (1996) Shared memory consistency models: a tutorial. IEEE Comput 29:66–76
Adve S, Hill M (June 1993) A unified formalization of four shared-memory models. IEEE Trans Parallel Distrib Syst 4(6):613–624
Arvind, Maessen J-W (2006) Memory model = instruction reordering + store atomicity. SIGARCH Comput Archit News 34(2):29–40
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
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
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
Herlihy MP, Wing JM (July 1990) Linearizability: a correctness condition for concurrent objects. ACM Trans Program Lang Syst (TOPLAS) 12:463–492
Lamport L (July 1978) Time, clock and the ordering of events in a distributed system. Commun ACM 21(7):558–565
Lamport L (July 1997) How to make a correct multiprocess program execute correctly on a multiprocessor. IEEE Trans Comput 46(7):779–782
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
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
Message Passing Interface Forum (June 1995) MPI: a message passing interface standard. http://www.mpi-forum.org/
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
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
Nelson C, Boehm H-J (2007) Sequencing and the concurrency memory model (revised). The \(\textrm{ C}++\) Standards Committee, Document WG21/N2171 J16/07-0031
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
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
Netzer R, Miller B (March 1992) What are race conditions? Some issues and formalizations. ACM Lett Program Lang Syst 1(1): 74–88
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
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
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
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
Weaver DL, Germond T (1991) The SPARC architecture manual (version 9)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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
DOI: https://doi.org/10.1007/978-0-387-09766-4_36
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-09765-7
Online ISBN: 978-0-387-09766-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering