Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Contents
Introduction. About Dynamic scheduling. Pros and cons of Dynamic Scheduling. Tomasulo's algorithm. Scoreboarding.
Introduction
Dynamic scheduling
Dynamic scheduling introduces the idea of out of order execution i.e an instruction will be executed as soon as its data operands are available. It includes the probability of WAR and WAW hazards. It may generate imprecise exceptions as well, i.e the processor state when the exception is generated does not look as if the instructions were executed in sequential order.
Scoreboarding technique
Score-boarding
The scoreboard is a central location where information about the currently active instructions is kept. The scoreboard determines when and where an instruction begins and ends execution. Forwarding is not supported during this dynamic
scheduling technique.
SCOREBOARD STAGES
ISSUE (IN ORDER): Check for structural hazards Check for WAW hazards on destination ops
EXECUTION (OUTOFORDER) Execution completion depends on latency of FUs Execution completion of LD/ST depends on cache hit/miss latencies) WRITE RESULTS (OUTOFORDER) Check for WAR hazards on destination ops Check for structural hazards in write RF
The major limitation of this scheme is that no forwarding is implemented from the execution unit.Subsequent instructions have to wait till the value has been written into the registers.
Tomasulo's algorithm
Tomasulos algorithm there is a common data bus between all the units that collects all the results. So an instruction can look into the CDB and not any register for a value provided by a previous instruction. Further the overall number of cycles is reduced for this scheme.
Reservation stations: A reservation station fetches and buffers operands as soon as they are available. Provide register renaming for destination registers as well. May be split i.e every functional unit has its own RS or unified i.e a common RS for all units. Each reservation station holds an instruction that has been issued and is awaiting execution at a functional unit.It also stores the operands or the names of the RSs that will provide the operands
Tomasulo's algorithm
Issue (I): In the issue stage, the instruction collects any values that it needs from the CDB (including branch outcomes, see the section on branches), based on the tag that is broadcast. If at the end of the cycle, the instruction would have both operands available, it will proceed the execute stage.
Execute : In this model, we assume that all functional units are fully pipelined. Note that an instruction will reserve its reservation station until the end of the writeback stage. An instruction waiting for this reservation station will occupy it (and be in the Issue stage) immediately afterwards.
Writeback (WB): Once an instruction has finished executing, it will write its result to the CDB. We assume every functional unit has a dedicated CDB. During writeback, the appropriate register will be updated in the register file, if the non speculative RST entry matches the tag.