What is Out-of-order execution?

Executing instructions as soon as their dependencies allow, in a different order from the program, to improve performance. Results are committed in program order through a reorder buffer.

Field: CPUs and architecture

Japanese name: アウトオブオーダー実行

How out-of-order execution works

The front end still fetches and decodes instructions in program order. Each instruction is then renamed, given an entry in the reorder buffer (ROB) and placed in an issue queue. Scheduling logic watches for instructions whose source operands are ready and sends them to free execution units, regardless of their position in the program. An instruction waiting for a slow load sits aside while later, independent instructions run. Results are held until the ROB retires instructions in their original order, so software sees exactly the behavior of a sequential machine. The window spans hundreds of instructions in high-performance cores.

Register renaming and in-order commit

Programs reuse a small set of architectural registers, which creates false dependences: a later write must not overtake an earlier read or write of the same register. Register renaming maps each new value to a fresh physical register, leaving only true data dependences, where an instruction actually needs a value computed by another. In-order commit through the ROB gives precise exceptions and lets the core execute past predicted branches, discarding wrong-path work on a misprediction. ISA details matter here; RV64I sign-extends lw results into the full register precisely so the upper bits never depend on the register's previous value.

Hiding memory latency

The biggest payoff comes during cache misses. An in-order core stalls at the first instruction that needs the result of a missing load; an out-of-order core keeps finding independent work and can issue further loads whose misses overlap with the first. That requires a non-blocking cache, which tracks outstanding misses in miss status holding registers (MSHRs) and keeps serving hits meanwhile. The number of misses and the latency of each are unchanged, but overlapping them hides much of the cost. Together with superscalar issue, branch prediction and large caches, this raises IPC (instructions per clock), and performance scales with IPC times frequency.

Out-of-order vs. superscalar, and the cost

Superscalar describes width, issuing several instructions per cycle; out-of-order describes the order in which they execute. A core can be in-order superscalar, and high-performance cores combine both at roughly 6–10 instructions wide. The cost is large: dependency checking grows roughly with the square of width, and renaming tables, wakeup logic and the ROB add area and energy to every instruction. That is why efficiency cores in phone SoCs are smaller and simpler, and why GPUs spend that silicon on many simple arithmetic units for throughput instead.

Try it: questions about Out-of-order execution

What is the processor design called that issues and executes multiple instructions simultaneously in one clock cycle?

  1. ASuperscalar
  2. BSingle-cycle
  3. CHarvard architecture
Show answer and explanation

Answer: A. Superscalar

A superscalar processor has multiple execution units and issues several independent instructions per clock, pushing IPC above 1. High-performance cores are wide enough to handle many instructions per clock. Combined with out-of-order execution it boosts performance, but dependency-checking logic grows roughly with the square of the width, so width cannot be increased indefinitely.

Which technique examines instruction dependencies and executes ready instructions in an order different from the program order to improve performance?

  1. AIn-order execution
  2. BOut-of-order execution
  3. CSingle-cycle execution
Show answer and explanation

Answer: B. Out-of-order execution

Out-of-order execution sets aside instructions waiting on earlier results or memory data and executes later, ready instructions first—especially valuable for doing useful work during cache-miss stalls. It requires logic to find ready instructions in a window of many instructions (hundreds in high-performance cores), register renaming and a reorder buffer to commit results in order, increasing circuit size and power.

FAQ

What is the difference between out-of-order execution and superscalar?

Superscalar means issuing multiple instructions per clock; out-of-order means executing them in an order other than program order when dependences allow. The two are independent ideas that high-performance cores usually combine.

Why do out-of-order CPUs need a reorder buffer?

Instructions finish out of order, but the architectural state must update in program order so exceptions are precise and mispredicted work can be discarded. The reorder buffer holds results until each instruction can retire in order.

Does out-of-order execution reduce cache misses?

No. It hides miss latency by doing independent work, including issuing other misses in parallel, while the miss is serviced; the number of misses stays the same.

Questions that mention Out-of-order execution (5)

Out-of-order execution appears in 7 practice questions across 5 topics, including CPUs and architecture, ISA & Assembly, Memory Hierarchy.

  1. Which metric indicates the number of instructions executed per clock?
  2. On 64-bit RV64I, how does lw place the 32-bit value it loads into a 64-bit register?
  3. What is the main advantage of a non-blocking cache, which accepts other accesses while a miss is being serviced?
  4. How do the design philosophies of CPUs and GPUs differ?
  5. In smartphone SoCs combining high-performance and efficient cores, why does running light work on the efficient cores use less energy?

Books on CPUs and architecture Ad

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary