previous
 next 
CS 3853 Computer Architecture Notes on Chapter 3 Section 4

Read Section 3.4

3.4: Overcoming Data Hazards with Dynamic Scheduling

Disadvantages of Static Scheduling

Dynamic Scheduling: The Idea


Example Program:
1) DIV.D   F0,F2,F4
2) ADD.D   F6,F0,F8
3) S.D.    F6,0(R1)
4) SUB.D   F8,F10,F14
5) MUL.D   F6,F10,F8
3 of these are name dependencies and can be removed by renaming.

Today's News: November 12
No News.

Tomasulo's Approach
Renaming is handled by reservation stations.
Tomasulo Algorithm Steps
Figure 3.6 shows the basic structure of a MIPS floating point unit using Tomasulo's algorithm.

Activity: Tomasulo's Algorithm

Today's News: November 14
Exam 3 is one week from today.


Tomasulo's Approach
Example: Overview of Tomasulo's algorithm execution
Assume the following sequence of instructions:
1.  L.D.   F6,32(R2)
2.  L.D.   F2,44(R3)
3.  MUL.D  F0,F2,F4
4.  SUB.D  F8,F2,F6
5.  DIV.D  F10,F0,F6
6.  ADD.D  F6,F8,F2
Assume that there are sufficient reservation stations, 1 fmul unit, one fadd unit,
and that we have the following execution times: load:1, fadd:2, fmul:10, fdiv:40
We assume the integer operations complete in 1 cycle
We assume a dedicated ALU is used for address calculations and it can do one operation per cycle.
We assume that the floating point functional units become available on the cycle after the result is put on the CDB.
Fill in the
Instruction Summary Table or look at it here.
Here is a solution after all instructions have completed, assuming that all memory accesses are cache hits and take one cycle.
Note that in order to issue: Note that in order to start execution: Answer the following questions, each time starting with the original assumptions:
  1. How would the results change if there were only one add reservation station? answer
  2. How would the results change if there were 2 multiply functional units? answer
  3. The last instruction modifies F6 before the previous instruction which uses F6 starts to execute. Is this a problem? answer
  4. How would this change if the DIV.D instruction used F2 instead of F0? answer
  5. How would this change if the DIV.D instruction used F2 instead of F0 and there were 2 multiply functional units? answer
  6. The instruction
        ADD.D F0,F4,F4
    is executed at the end of this code. On what cycle does it complete? answer
  7. How would this change if the second memory access is a cache miss with a miss penalty of 6 cycles? answer

    Today's News: November 19
    Exam 3 is on Thursday.
    Assignment 3 demonstration today.

  8. How would this change if the second memory access is a cache miss with a miss penalty of 6 cycles and the DIV.D instruction used F4 instead of F0? answer
  9. How would this change if the an fmul takes 5 cycles instead of 10? answer

Next Notes

Back to CS 3853 Notes Table of Contents