Course: Computer Architectures · Lecture: Lecture 10 - Dynamic Scheduling

1. Register names do not establish memory independence

Tomasulo Dynamic Scheduling associates register operands with producers. Loads and stores require another check: do they access overlapping memory bytes? Two different base registers can contain the same address. The processor must evaluate their values, offsets and access widths. See Memory Addressing.

x1 = 1000; x2 = 1000
Store 9 into [x1]
Load [x2] into f0

Both operations access address 1000. Different names x1 and x2 do not prove independence. Even different start addresses can overlap for multi-byte accesses.

2. Why reordering can change the answer

Assume location A initially holds 5 and both operations access that same location with matching width:

Program orderCorrect behaviorRisk from unsafe reordering
Store 9 to A; load ALoad receives 9Load may receive old 5: RAW
Load A; store 9 to ALoad receives old 5Store may replace it early: WAR
Store 9 to A; store 7 to AFinal value is 7Reversing writes leaves 9: WAW

These constraints arise from values in memory, not from reused register names. Renaming registers alone cannot remove them. Known non-overlapping ordinary accesses do not have these particular same-location dependencies; other architectural ordering rules can still matter.

3. The slides’ conservative checking scheme

The source describes dynamic disambiguation using address calculation and pending load/store buffers. It calculates addresses in order as part of this simplified scheme. For a load, check earlier stores for a conflicting location and wait for a conflicting store to complete. For a store, check earlier pending loads and stores and preserve their required order on conflict.

Until relevant older addresses are known, independence cannot simply be assumed. This explanation is the conservative model used in the lecture. More advanced processors can use forwarding, prediction and recovery; those mechanisms are not established by this deck’s simple buffer checks.

Page 50’s wording refers to checking load and store buffers but then says “store instructions”; its closing condition includes previous loads and stores. The useful rule is to preserve all relevant older conflicting accesses, not to ignore earlier loads.

4. Connect readiness with safe execution

1. f0 = f2 / f4
2. Store f0 into [x1]
3. f6 = f8 + f10
4. Load [x2] into f12

Assume the division is slow and the addition’s inputs are ready. The addition can execute if its unit is available. The store waits for f0. The later load also needs an address-order check:

  • Known non-overlap with the earlier store: no same-location dependency blocks the load.
  • Same location: the load needs the earlier store’s value; the lecture scheme waits for store completion.
  • Unknown relationship: use a safe uncertainty policy rather than guessing independence without recovery.

Thus operand readiness, resource availability and memory-order safety are separate conditions. In the lecture’s loop, double-precision accesses at A and A−8 cover distinct eight-byte regions, so that particular cross-iteration conflict is absent.

5. Recall and check

  1. x1 and x2 have different names but both contain 2000. Can their store/load be treated as independent?
  2. An 8-byte load starts at 1000 and a 4-byte store at 1004. Do different start addresses eliminate overlap?
  3. What does the lecture’s load check do if an earlier store targets the same location?

Answers: 1. No: compare effective addresses and ranges. 2. No: bytes 1004–1007 overlap. 3. Wait for the conflicting older store to complete under this model.

Hardware speculation connection

With a ROB, stores retain their effects until commit. The hardware-speculation lecture distinguishes the conservative same-location load wait from optional store-to-load forwarding, even after a branch resolves correctly. Hardware Speculation and the Reorder Buffer > 5. Stores and loads: the lecture’s conservative rule