Intel 64 and IA-32 Architectures Software Developers Manual Volume 3A, System Programming Guide, Part 1
7-8 Vol. 3A
MULTIPLE-PROCESSOR MANAGEMENT
have cached the same area of memory from simultaneously modifying data in that
area.
7.2 MEMORY ORDERING
The term memory ordering refers to the order in which the processor issues reads
(loads) and writes (stores) through the system bus to system memory. The Intel 64
and IA-32 architectures support several memory ordering models depending on the
implementation of the architecture. For example, the Intel386 processor enforces
program ordering (generally referred to as strong ordering), where reads and
writes are issued on the system bus in the order they occur in the instruction stream
under all circumstances.
To allow optimizing of instruction execution, the IA-32 architecture allows departures
from strong-ordering model called processor ordering in Pentium 4, Intel Xeon,
and P6 family processors. These processor-ordering variations allow performance
enhancing operations such as allowing reads to go ahead of buffered writes. The goal
of any of these variations is to increase instruction execution speeds, while main-
taining memory coherency, even in multiple-processor systems.
The following sections describe memory ordering models used by Intel486, Pentium,
Intel Core 2 Duo, Intel Core Duo, Pentium 4, Intel Xeon, and P6 family processors.
7.2.1 Memory Ordering in the Intel
®
Pentium
®
and Intel486
™
Processors
The Pentium and Intel486 processors follow the processor-ordered memory model;
however, they operate as strongly-ordered processors under most circumstances.
Reads and writes always appear in programmed order at the system bus—except for
the following situation where processor ordering is exhibited. Read misses are
permitted to go ahead of buffered writes on the system bus when all the buffered
writes are cache hits and, therefore, are not directed to the same address being
accessed by the read miss.
In the case of I/O operations, both reads and writes always appear in programmed
order.
Software intended to operate correctly in processor-ordered processors (such as the
Pentium 4, Intel Xeon, and P6 family processors) should not depend on the relatively
strong ordering of the Pentium or Intel486 processors. Instead, it should insure that
accesses to shared variables that are intended to control concurrent execution
among processors are explicitly required to obey program ordering through the use
of appropriate locking or serializing operations (see Section 7.2.4, “Strengthening or
Weakening the Memory Ordering Model”).