IT lexicon › Programming › Weak ordering

Weak ordering

Programming På svenska → Updated: 2026-11-15

A memory model where loads and stores can be reordered freely unless explicit synchronization barriers prevent it.

Modern processors, particularly ARM and PowerPC, use weak ordering to maximize performance. Without explicit barriers, the processor can execute reads and writes in any order. This delivers massive speedups on multiprocessor systems but requires programmers to explicitly mark order-critical points with acquire and release semantics. The alternative is sequential consistency, where all operations execute in a globally visible order. Weak ordering dominates modern mobile and server designs (ARMv8, PowerPC), while x86 sits closer to sequential consistency for common workloads.

Programming with weak ordering demands discipline: careless code silently races. Tools like static analysis and testing help, but the mental model is harder than sequential consistency.

← Back to the lexicon