Lec 03
Lec 03
Lec 03
Amdahl's Law
e
Amdahl's law:
Diminishing returns
Suppose
F
mem
=0.2, F
alu
=0.5, F
other
=0.3
Speedup withcache=
1
0.8+0.2/10
=1.22
Speedup with faster ALU=
1
0.5+0.5/ 3
=1.5
Example continued...
e
Fixing for what value of is
adding a cache better?
F
alu
=0.5 F
mem
1
1-F
mem
+F
mem
/10
1.5
=F
mem
10
27
=0.36
The CPU Performance Equation
CPUtime=Num. clock cyclesClock cycletime
CPUtime=Num. of clock cycles-Clock rate
OR
CPUtime=ICCPI Cycle time
Putting these together
Num. of clock cycles
=InstructionCount Cycles Per Instruction
=ICCPI
For a program,
More on the Equation
e
This form is convenient
Clock cycles
Instruction
Instructions
Program
e
With CPI as the independent variable
CPI=
CPU time
Clock cycletimeIC
Other Convenient Forms of the
Equation
e
Number of clock cycles can be counted as:
CPUclock cycles=
_
i=1
n
CPI
i
IC
i
Hence , CPUtime=(
_
i=1
n
CPI
i
IC
i
)Clock cycletime
e
Calculating in terms of
CPI
CPI
i
CPI =
CPU time
Clock cycletimeIC
=
_
i=1
n
CPI
i
(
IC
i
IC
)
Usefulness of the Equation
e
easier to measure than
Requires a compiler
Smaller is faster
e
Signal propagation delay is lesser
e
More power per memory cell
e
Observation w.r.t. software:
Locality of reference