Skip to guide

Part 1 · Parallelism and speedup

ILP, pipeline width, and Amdahl’s law

Separate theoretical opportunity from realized throughput, quantify the serial ceiling, and compare deeper, wider, and multicore designs with explicit assumptions.

Compare architectural tradeoffs with explicit performance models and trace the mechanisms that recover correctness when speculation fails.

Updated July 20262 connected chaptersInteractive labs + worked examples

Parallelism · throughput

Find independent work, then decide how much hardware can exploit it.

A scalar five-stage pipeline can complete at most one instruction per cycle in steady state. Instruction-level parallelism finds independent work to exceed that limit. Pipeline depth raises frequency; issue width raises instructions per cycle. Neither creates independence in the program.

Super-pipelining

Make each stage smaller.

Splitting IF, ID, EX, MEM, and WB into shorter stages can raise clock frequency because each stage performs less logic.

  • Gain: shorter critical path and a faster clock.
  • Cost: more register overhead, bypass paths, and hazard latency.
  • Branch risk: more younger work sits behind an unresolved branch.
Superscalar width

Issue more than one instruction per cycle.

A 2-wide or 4-wide design fetches and decodes blocks, checks dependencies, and dispatches independent operations to parallel units.

  • Gain: IPC can exceed one when useful ILP exists.
  • Cost: wider rename, scheduling, register, bypass, and commit structures.
  • In-order limit: one blocked older instruction can idle younger slots.
Design lensDeeper pipelineWider superscalar
Core leverShorten stage delay to raise clock frequencyDuplicate lanes and units to raise instructions per cycle
ILP useTemporal: advance work through more, shorter stagesSpatial: execute several independent operations together
Main limiterBranch resolution, hazard latency, and pipeline-register overheadTrue dependencies, fetch supply, issue readiness, and unit availability
Hardware costMore clocked state, checkpoints, and forwarding distanceMore ports, comparators, bypass links, and commit bandwidth
Amdahl lensOnly frequency-scaled work improves; latch, clock, and hazard time remainOnly independent slots improve; serial and dependency-bound work remain
Modern balanceModerate depth limits recovery and clock-distribution costOoO scheduling fills lanes, but width is bounded by energy and wire delay

Interactive speedup model

Amdahl’s law makes the serial fraction visible.

Speedup = 1 / ((1 − P) + P / S)

P is the improvable fraction. S is the speedup applied only to that fraction. The untouched serial term remains on every run.

Overall speedup2.11×
Processor efficiency26.3%
Serial ceiling2.5×

The 40.0% serial fraction sets the limit, even if the accelerated portion gets thousands of workers.

Live speedup curve

More processors bend toward the serial ceiling.

At 8 processors: 2.11×. Infinite parallel resources approach 2.5×.

Amdahl overall speedup by processor countWith 60.0 percent parallel work, 8 processors produce 2.11 times overall speedup. The serial ceiling is 2.5 times.Serial ceiling 2.5×82.11×Processors or local speedup S · log₂ scaleOverall speedup

Overall speedup is 2.11 times with 60.0 percent parallel work and 8 processors. The serial ceiling is 2.5 times.

What is the key tradeoff in a deeper pipeline?

Smaller stages can support a higher clock frequency, but the design pays more pipeline-register overhead and keeps more work in flight. Dependencies take more stages to resolve, forwarding gets more complex, and a bad branch prediction discards work from a longer speculative window. The best depth is therefore a frequency-versus-IPC-and-energy decision, not “deeper is faster.”

What limits a simple in-order superscalar processor?

Issue width helps only when the next program-order group contains independent operations and matching execution resources. A RAW dependency, cache miss, branch, or unavailable unit at the head of the group can leave otherwise capable slots idle. Out-of-order scheduling looks beyond that local blockage.

Worked problems · interview reasoning

Show the denominator, state the assumptions, and explain the tradeoff.

The arithmetic is short. A strong architecture answer makes the serial term, predictor initialization, and protocol state explicit so another engineer can reproduce the result.

Scientific workload

40% serial, 60% parallel

8 cores: 1 / (0.40 + 0.60/8)2.105×

32 cores: 1 / (0.40 + 0.60/32)2.388×

Serial work 2× faster: 1 / (0.40/2 + 0.60/8)3.636×

Engineer B wins. Halving the serial term changes the bottleneck; adding 24 cores only shrinks an already-small parallel contribution.

95% parallel workload

Find the ceiling and processor count

Maximum = 1 / (1 − 0.95)20×

18 = 1 / (0.05 + 0.95/S)S = 171

99% of 20× = 19.8×S = 1,881

Moving from 18× to 19.8× needs eleven times as many processors. Near the serial ceiling, marginal hardware returns collapse.

Architecture reasoning loop

Opportunity → speculation → ordering → proof

  1. Opportunity: identify independent work and the serial fraction.
  2. Speculation: predict control and memory dependencies to keep units busy.
  3. Ordering: use rename, ROB, LSQ, and coherence state to preserve contracts.
  4. Proof: trace cycles, predictor state, exceptions, and cache-line ownership.
Practice Computer Architecture interview questions

Continue the system

Connect the adjacent layer.