You are on page 1of 4

STATIC SCHEDULE:A static schedule is some kind of list containing the order of the

processes and the durations in which they are scheduled


Code:
repeat forever:
execute task
execute task
execute task
execute task

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:

DIVD F0, F2, F4


ADDD F10, F0, F8
SUBD F12, F8, F14

SUBD instruction cannot execute because the dependency of ADDD on DIVD


causes the pipeline to stall; yet SUBD is not data dependent on anything in the
pipeline. This is a performance limitation that can be eliminated by not
requiring instructions to execute in order.
To allow SUBD to begin executing, we must separate the instruction issue
process into two parts: checking the structural hazards and waiting for the
absence of a data hazard. We can still check for structural hazards when we
issue the instruction; thus, we still use in order instruction issue. However, we
want the instructions to begin execution as soon as their data operands are
available. Thus, the pipeline will doout-of-order execution, which implies outof-order completion.

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

Scoreboard (invented by Seymour Cray for the CDC 6600 in 1964)


Tomasulos algorithm (used in the IBM 360/91 in 1967)
Score boarding- The example machine

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.

You might also like