Recall & Review
beginner
What is instruction scheduling in compiler design?
Instruction scheduling is a compiler optimization technique that rearranges the order of instructions to improve performance by reducing delays caused by hardware constraints like pipeline stalls.
Click to reveal answer
beginner
Why is instruction scheduling important for modern processors?
It helps to keep the processor's pipeline busy by avoiding stalls and hazards, which leads to faster execution of programs.
Click to reveal answer
intermediate
What are hazards that instruction scheduling tries to avoid?
Hazards are situations like data hazards, control hazards, and structural hazards that can cause delays or incorrect execution if instructions are not properly ordered.
Click to reveal answer
intermediate
How does instruction scheduling relate to instruction-level parallelism (ILP)?
Instruction scheduling increases ILP by rearranging instructions so that independent instructions can execute in parallel without waiting for others to finish.
Click to reveal answer
intermediate
Name two types of instruction scheduling techniques.
Static scheduling, done by the compiler before runtime, and dynamic scheduling, done by the processor during execution.
Click to reveal answer
What is the main goal of instruction scheduling?
✗ Incorrect
Instruction scheduling aims to reorder instructions to minimize delays and keep the processor pipeline busy.
Which hazard does instruction scheduling help to avoid?
✗ Incorrect
Instruction scheduling helps avoid data hazards by reordering instructions to prevent conflicts over data usage.
Static instruction scheduling is performed by:
✗ Incorrect
Static scheduling is done by the compiler at compile time to optimize instruction order.
Instruction-level parallelism means:
✗ Incorrect
Instruction-level parallelism allows independent instructions to run simultaneously to improve performance.
Which of the following is NOT a hazard addressed by instruction scheduling?
✗ Incorrect
Network hazards are unrelated to instruction scheduling and processor pipelines.
Explain what instruction scheduling is and why it is used in compilers.
Think about how changing the order of instructions can help the processor run faster.
You got /3 concepts.
Describe the difference between static and dynamic instruction scheduling.
Consider who decides the instruction order and when.
You got /3 concepts.