x86-TSO
Top Cited Papers
- 1 July 2010
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Communications of the ACM
- Vol. 53 (7), 89-97
- https://doi.org/10.1145/1785414.1785443
Abstract
Exploiting the multiprocessors that have recently become ubiquitous requires high-performance and reliable concurrent systems code, for concurrent data structures, operating system kernels, synchronization libraries, compilers, and so on. However, concurrent programming, which is always challenging, is made much more so by two problems. First, real multiprocessors typically do not provide the sequentially consistent memory that is assumed by most work on semantics and verification. Instead, they have relaxed memory models, varying in subtle ways between processor families, in which different hardware threads may have only loosely consistent views of a shared memory. Second, the public vendor architectures, supposedly specifying what programmers can rely on, are often in ambiguous informal prose (a particularly poor medium for loose specifications), leading to widespread confusion. In this paper we focus on x86 processors. We review several recent Intel and AMD specifications, showing that all contain serious ambiguities, some are arguably too weak to program above, and some are simply unsound with respect to actual hardware. We present a new x86-TSO programmer's model that, to the best of our knowledge, suffers from none of these problems. It is mathematically precise (rigorously defined in HOL4) but can be presented as an intuitive abstract machine which should be widely accessible to working programmers. We illustrate how this can be used to reason about the correctness of a Linux spinlock implementation and describe a general theory of data-race freedom for x86-TSO. This should put x86 multiprocessor system building on a more solid foundation; it should also provide a basis for future work on verification of such systems.Funding Information
- Engineering and Physical Sciences Research Council (EP/F036345EP/H005633)
- Agence Nationale de la Recherche (ANR-06-SETI-010-02)
This publication has 13 references indexed in Scilit:
- A Better x86 Memory Model: x86-TSOLecture Notes in Computer Science, 2009
- On Validity of Program Transformations in the Java Memory ModelLecture Notes in Computer Science, 2008
- Foundations of the C++ concurrency memory modelPublished by Association for Computing Machinery (ACM) ,2008
- A theory of memory modelsPublished by Association for Computing Machinery (ACM) ,2007
- Fast and Generalized Polynomial Time Memory Consistency VerificationLecture Notes in Computer Science, 2006
- The Java memory modelPublished by Association for Computing Machinery (ACM) ,2005
- An executable specification and verifier for relaxed memory orderInternational Conference on Acoustics, Speech, and Signal Processing (ICASSP), 1999
- Shared memory consistency models: a tutorialComputer, 1996
- Causal memory: definitions, implementation, and programmingDistributed Computing, 1995
- A unified formalization of four shared-memory modelsIEEE Transactions on Parallel and Distributed Systems, 1993