Just Software Solutions

Intel and AMD Define Memory Ordering

Monday, 17 September 2007

For a long time, the ordering of memory accesses between processors in a multi-core or multi-processor system based on the Intel x86 architecture has been under specified. Many newsgroup posts have discussed the interpretation of the Intel and AMD software developer manuals, and how that translates to actual guarantees, but there has been nothing authoritative, despite comments from Intel engineers. This has now changed! Both Intel and AMD have now released documentation of their memory ordering guarantees — Intel has published a new white paper (Intel 64 Architecture Memory Ordering White Paper) devoted to the issue, whereas AMD have updated their programmer's manual (Section 7.2 of AMD64 Architecture Programmer's Manual Volume 2: System Programming Rev 3.13).

In particular, there are a couple of things that a now made explicitly clear by this documentation:

  • Stores from a single processor cannot be reordered, and
  • Memory accesses obey causal consistency, so
  • An aligned load is an acquire operation, and
  • An aligned store is a release operation, and
  • A locked instruction (such as xchg or lock cmpxchg) is both an acquire and a release operation.

This has implications for the implementation of threading primitives such as mutexes for IA-32 and Intel 64 architectures — in some cases the code can be simplified, where it has been written to take a pessimistic interpretation of the specifications.

Posted by Anthony Williams
[/ threading /] permanent link
Stumble It! stumbleupon logo | Submit to Reddit reddit logo | Submit to DZone dzone logo

Comment on this post

If you liked this post, why not subscribe to the RSS feed RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.


very short artical because we r not understand the subjects

by ali aliafzal at 15:00:33 on Monday, 21 January 2019

Both links are broken. Do you know if they have depricated the documents? I can't seem to find the Intel's whitepaper anymore. I do have an old copy though. In essence, was intel's and AMD's x86_64 memory ordering the same?

Thanks, Andy.

by Andy Venikov at 15:00:33 on Monday, 21 January 2019

The AMD docs have moved to:


and the Intel 64 memory ordering white paper has been merged into the processor architecture docs. The specific part can be downloaded from:


whilst the full set is available at


by Anthony Williams at 15:00:33 on Monday, 21 January 2019


by Andy Venikov at 15:00:33 on Monday, 21 January 2019

Add your comment

Your name:

Email address:

Your comment:

Design and Content Copyright © 2005-2024 Just Software Solutions Ltd. All rights reserved. | Privacy Policy