Professional Documents
Culture Documents
1
2
1
3
for
for
for
for
10 ms
20 ms
5 ms
15 ms
This is a static schedule. It's just like the bus schedule: Task three is
executed for 15 ms every 50 ms. The schedule never changes, even if
task 1 has nothing to do and task 2 is missing its deadlines.
DYNAMIC SCHEDULING:Int the dynamic schedulinghe hardware rearranges the instruction execution to
reduce the stalls. Dynamic scheduling offers several advantages:
It enables handling some cases when dependencies are unknown at compile
time (e.g., because they may involve a memory reference);
It simplifies the compiler;
It allows code that was compiled with one pipeline in mind to run efficiently on
a different pipeline.
These advantages are gained at a cost of a significant increase in hardware
complexity!
A major limitation of the pipelining techniques is that they use in-order
instruction issue: if an instruction is stalled in the pipeline, no later instructions
can proceed. Thus, if there is a dependency between two closely spaced
instructions in the pipeline, it will stall. For example:
Advantages of dynamic scheduling:1. Handles cases when dependencies unknown at compile time
2. It simplifies the compiler
3. Allows code that compiled for one pipeline to run efficiently on a
different pipeline
4. Hardware speculation, a technique with significant performance
advantages, builds on dynamic scheduling
5. Key idea: Allow instructions behind stall to proceed
DIVD F0,F2,F4
ADDD F10,F0,F8
SUBD F12,F8,F14
Enables out-of-order execution & out-of-order completion
IM-PLEMENTATION:Implementation of dynamic scheduling
In order to compute correct results, need to keep track of:
Execution unit (free or busy)
register usage for read and write
Completion etc.
Two major techniques
Instruction Scheduling
1. idea: independent instructions between slow ops and uses
2. otherwise pipeline sits idle waiting for RAW hazards to resolve
3. we have already seen dynamic pipeline scheduling
4. to do this we need independent instructions
5. scheduling scope: code region we are scheduling
6. the bigger the better (more independent instructions to choose from)
7. once scope is defined, schedule is pretty obvious
8. trick is making a large scope (schedule across branches???)
9. compiler scheduling techniques (more about these later)
10.loop unrolling (for loops)
11.software pipelining (also for loops)
12.trace scheduling (for general control-flow)
Conclusion
In general the dynamic list-scheduling algorithms performed better than the
static list-scheduling algorithms. For the static list-scheduling algorithms, the
HLFET performed better than MCP and for the dynamic list-scheduling
algorithms, the DLS algorithm performed better than the ETF algorithm. If the
complexities of the algorithms are taken into account, it is highly
recommended to use static list-scheduling.