Course: Computer Architectures
Source: E. Sanchez, Dynamic Scheduling Techniques, Politecnico di Torino, ASE 2026/27, 50 PDF pages. Local file: 10 - dyn sched.pdf. Number 10 follows the filename; no lecture date is inferred. The original and figures remain local because redistribution permission is uncertain. Analogies and numeric traces identified below are added teaching explanations.
Learning route
This lecture connects Instruction Dependencies, Register Renaming and Branch Prediction Fundamentals to hardware that chooses ready instructions during execution. A processor can accept instructions in order, hold them in separate stations, and execute ready operations out of order. The goal is to use waiting time while preserving required values and behavior.
Start with an independent subtraction bypassing a waiting addition, then learn how each operand is represented by a value or a producer identifier. Follow the four-instruction trace before reading the larger source snapshots. Finish by distinguishing register renaming from exception recovery and memory-order checks. The full reusable explanation is Tomasulo Dynamic Scheduling; memory conflicts are developed in Memory Disambiguation in Dynamic Scheduling.
From a blocked pipeline to tracked operands
The slides begin with a slow division producing f0, an addition waiting for f0 and a subtraction whose inputs are ready. Strict execution order can unnecessarily hold the subtraction behind the addition. Splitting decode into issue and operand-read/wait permits in-order acceptance but out-of-order execution. Multiple functional units can also complete operations out of order.
A Tomasulo reservation station stores the operation, available operand values and tags for unavailable operands. When a producer broadcasts its tag and value on the Common Data Bus, all matching consumers can capture it. Multiple consumers reading one result is safe: they are satisfying their RAW dependencies. Ready operands still need an available execution unit; completed operations can also wait for broadcast bandwidth. Follow the broadcast.
The renaming relationship to remember
A register’s Qi names its latest issued writer. A consumer’s Qj/Qk preserve the particular earlier producers that its inputs require. Later destination remapping does not redirect those saved input tags. In the added four-instruction example, f6.Qi eventually names Mul1 while Add1.Qj still names Div1. The two instructions need different versions of the same architectural register. Complete issue and broadcast trace.
Ready input values are copied into stations; missing values are attached to producer tags. This avoids register WAR and WAW hazards without removing true dependencies. It does not alone guarantee precise exceptions. Recovery and in-order commit are an added connection to Precise Exceptions; basic Tomasulo’s out-of-order result writes can expose younger effects before an older fault.
Worked source snapshot: pages 36–40
The source sequence uses two loads, a multiply, subtract, divide and add. The station names do not restrict the operation: Add1 performs subtraction and Mult2 division. Use L for the first load’s returned value and assume f4 was ready:
Load1: f6 = load from memory
Load2: f2 = load from memory
Mult1: f0 = f2 * f4
Add1: f8 = f2 - f6
Mult2: f10 = f0 / f6
Add2: f6 = f8 + f2All six have issued. Load1 has written its result and freed its slot; Load2 is still pending.
| Station | First input | Second input |
|---|---|---|
| Mult1 | Qj=Load2 | Vk=value of f4 |
| Add1 | Qj=Load2 | Vk=L |
| Mult2 | Qj=Mult1 | Vk=L |
| Add2 | Qj=Add1 | Qk=Load2 |
Register status is f0→Mult1, f2→Load2, f6→Add2, f8→Add1, f10→Mult2. The saved L values refer to Load1’s earlier f6, even though f6 now names Add2 as its pending writer.
Load2’s broadcast makes Mult1 and Add1 operand-ready; Add2 gets its second operand but still waits for Add1. Mult2 still waits for Mult1. Then the two chains can progress as units and the CDB allow. No cycle count is inferred without latency/arbitration assumptions.
Page 36 prints load offsets 34 and 45 while the later snapshot tables use 32 and 44. Preserve this source discrepancy rather than mixing them into one claimed exact address trace. The register dependencies above are unaffected. Page 38 explicitly says its instruction-status table is not a hardware data structure.
Worked loop snapshot: pages 42–46
The loop loads f0 at x1, multiplies by f2 into f4, stores f4 back, decrements x1 by eight and branches. The snapshot assumes two iterations issued, neither floating-point load result broadcast, and speculative predicted-taken branches.
| Iteration | Load address | Multiply input tag | Store data tag |
|---|---|---|---|
| 1 | Initial A | Load1 | Mult1 |
| 2 | A−8 | Load2 | Mult2 |
The latest mappings are f0→Load2 and f4→Mult2. First-iteration stations retain Load1/Mult1. Captured effective-address information also prevents later x1 updates from moving an earlier store. This is dynamic overlap of loop instances without compiler unrolling; true dependencies and finite resources remain. Compare Loop Unrolling and SIMD.
The basic branch restriction on page 26 and speculative assumption on page 43 are different models: the latter explicitly permits work beyond predicted branches. It still requires recovery machinery to preserve architectural correctness on a wrong prediction.
Final connection: memory dependencies
Two different base registers can hold the same address. A ready load must respect an older store to that location; an older load must not see a younger store’s value. Register tags alone do not prove memory independence. The slides describe conservative buffer checks and in-order address calculation. Effective addresses and byte ranges, not register spelling, establish conflicts. Memory Disambiguation in Dynamic Scheduling
PDF page map
| Pages | Topic | Review destination |
|---|---|---|
| 2–5 | Motivation and blocked-instruction example | Tomasulo Dynamic Scheduling > 1. Why rearrange instructions during execution? |
| 6–13 | Out-of-order hazards, exceptions and split decode | Tomasulo Dynamic Scheduling > 2. Accepting an instruction is different from executing it |
| 14–21 | Scoreboarding mentioned; Tomasulo, stations, renaming, CDB | Tomasulo Dynamic Scheduling > 3. Broadcast makes a missing operand available |
| 22–28 | Issue, execute, write result; memory and branch qualifications | Tomasulo Dynamic Scheduling |
| 29–35 | Station fields and register status | Tomasulo Dynamic Scheduling > 5. Qi versus Qj and Qk |
| 36–40 | Six-instruction snapshot | Worked source snapshot above |
| 41 | Benefits, complexity and CDB bottleneck | Tomasulo Dynamic Scheduling > 7. Ready does not mean unlimited resources |
| 42–46 | Two overlapping loop iterations | Tomasulo Dynamic Scheduling > 8. Overlapping loop iterations |
| 47–50 | Address conflicts and dynamic disambiguation | Memory Disambiguation in Dynamic Scheduling |
Revision route
Draw issue→wait→execute→broadcast. Reconstruct the four-instruction producer trace, including both register mappings and saved input tags. Explain how a later f6 writer can finish first without changing an earlier consumer. Then explain what extra machinery is needed for precise recovery and what extra checks are needed for loads/stores. Use the answered checks at the end of both concept notes for retrieval practice.