0% found this document useful (0 votes)
23 views4 pages

Ece586 Lec4 1

The document summarizes key topics from a lecture on computer architecture, including calculating average CPI and Amdahl's law. Amdahl's law states that the speedup from enhancing a system is limited by the fraction of time the original system spent on non-enhanced tasks. It provides examples calculating speedup for different fractions of a system being enhanced and different levels of speedup from the enhancement. The examples show diminishing returns from enhancements and that enhancements are most effective when applied to tasks that consume the majority of execution time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

Ece586 Lec4 1

The document summarizes key topics from a lecture on computer architecture, including calculating average CPI and Amdahl's law. Amdahl's law states that the speedup from enhancing a system is limited by the fraction of time the original system spent on non-enhanced tasks. It provides examples calculating speedup for different fractions of a system being enhanced and different levels of speedup from the enhancement. The examples show diminishing returns from enhancements and that enhancements are most effective when applied to tasks that consume the majority of execution time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lecture Topics

ECE 486/586 • Performance


– Calculating Average CPI
Computer Architecture – Amdahl’s Law
• Dependability

Lecture # 4
Reference: Chapter 1: Sections 1.7, 1.9
Spring 2015

Portland State University

Average CPI Example: Calculating Average CPI


Performance Equation: Instruction Frequency CPIi CPIi * Fi %Time
CPU Time = Cycle time ∗ Instruction Count ∗ Average CPI
ALU 40% 1 0.4*1 = 0.4 0.4/1.75=23%
Assuming n different type of instructions, each with count ICi and Load 30% 2 0.3* 2 = 0.6 0.6/1.75=34%
requiring CPIi cycles:
 Store 15% 2 0.15 * 2 = 0.3 0.3/1.75=17%
CPU Time = Cycle time ∗ (ICi ∗ CPIi)

Branch 15% 3 0.15 * 3 = 0.45 0.45/1.75=26%
Then:

∑(ICi ∗ CPIi)
Average CPI = = (CPIi ∗ Fi) Average CPI = 0.4 + 0.6 + 0.3 + 0.45 = 1.75
IC

where Fi is the frequency of instruction type i
Amdahl’s Law Amdahl’s Law
The performance improvement to be gained from '($)&*+,- *+.$ /,0 $-*+0$ *123 4$/,0$ *ℎ$ $-ℎ1-)$.$-*
using some enhancement is limited by the fraction of "#$$%&# =
'($)&*+,- *+.$ /,0 $-*+0$ *123 1/*$0 *ℎ$ $-ℎ1-)$.$-*
time the enhancement can be used
'($)&*+,- *+.$,6%
=
'($)&*+,- *+.$-$7
Execution timeold
Target for Not targeted by enhancement • Speedup depends on two factors:
Original enhancement
– Fractionenhanced: Fraction of computation time in the original
computer that can be converted to take advantage of the
enhancement (always less than or equal to 1)
After Enhancement – Speedupenhanced: How much faster the task would run if the
enhanced mode were used for the entire program? (always greater
Execution timenew than 1)

Amdahl’s Law Amdahl’s Law: Example


• We are considering an enhancement to the processor of a web
'($)&*+,- *+.$-$7 server. The new CPU is 10x faster on computation in the Web
:01)*+,-$-ℎ1-)$%
= '($)&*+,- *+.$,6% ∗ 1 − :01)*+,-$-ℎ1-)$% + "#$$%&#$-ℎ1-)$%
serving application than the original CPU. Assuming that the CPU is
busy with computation 40% of the time and waiting for I/O 60% of
the time. What is the overall speedup gained by incorporating the
'($)&*+,- *+.$,6%
enhancement?
"#$$%&# =
'($)&*+,- *+.$-$7
1
= Fractionenhanced = 0.4
1 − :01)*+,-$-ℎ1-)$% + :01)*+,-$-ℎ1-)$%
"#$$%&#$-ℎ1-)$% Speedupenhanced = 10

 
Overall speedup = GHIJKLMN = X.Y = 1.56
 <=>?@ABCD?@CE F RSOOQTS ONPINJOQ  <U.W F
ZX
ONPINJOQ
Amdahl’s Law: Example Amdahl’s Law: Example
• What if the enhancement can be applied system-wide? • What if the enhancement is so great that it eliminates the execution
time formerly contributed by the fraction enhanced
Fractionenhanced = 1
Speedupenhanced = 10 Fractionenhanced = 0.4
Speedupenhanced = Infinite
 
Overall speedup = GHIJKLMNONPINJOQ = Z = 10  
 <=>?@ABCD?@CE F  < F ZX
RSOOQTSONPINJOQ Overall speedup = GHIJKLMN = X.Y = 1.67
 <=>?@ABCD?@CE F RSOOQTS ONPINJOQ  <U.W F
ONPINJOQ [N\LNLKO

Amdahl’s Law: Diminishing Returns Amdahl’s Law: Another Example


• If an enhancement is applicable only for a fraction of a task, then • A common transformation required in graphics engines is square root.
Implementations of floating point (FP) square root differ considerably in
we can’t speed up the task by more than the reciprocal of 1 minus performance. Assume FPSQR is responsible for 20% of the execution time
that fraction of a critical graphics application. One proposal is to enhance the FPSQR
hardware to speed up FPSQR by 10x. Another proposal is to make all
floating point operations run faster by 1.6x. Floating point instructions
Execution timeold represent 60% of the overall execution time. Assuming the cost of each
enhancement is the same, which option would you prefer?
Target for Not targeted by enhancement
Original enhancement Option 1: Enhance FPSQR
Fractionenhanced = 0.2, Speedupenhanced = 10

Overall speedup = X.^ = 1.22
After Enhancement  <U.] F
ZX

Option 2: Enhance all FP instructions


Execution timenew
Fractionenhanced = 0.6, Speedupenhanced = 1.6

Overall speedup = X.` = 1.29 Better
 <U._ F Z.`
Dependability Dependability Metrics
• MTTF: Mean Time to Failure
• Service Accomplishment vs. Service Interruption • MTTR: Mean Time to Repair
• MTBF: Mean Time between Failures = MTTF + MTTR
System operating according to service-level agreement (SLA) • Failure Rate: Failures per unit time = 1/MTTF
System unavailable or performance less than SLA requirements
• FIT: Failures per billion hours = 109/MTTF
Failure causing disruption of service • Module Availability: Fraction of time during which the module is
time working reliably
aee: aee:
a,%&6$ bc1+614+6+*d = =
aee: + aeef aeg:
MTTF MTTR • If a collection of modules have independent failures and
MTBF exponentially distributed lifetimes, then:
:1+6&0$ f1*$ ,/ "d2*$. = ∑ :1+6&0$ 01*$2 ,/ $1)ℎ .,%&6$

Example
• Assume a disk subsystem with the following components and MTTF:
– 10 disks, each rated at 1,000,000-hour MTTF
– 1 SCSI controller, 500,000-hour MTTF
– 1 power supply, 200,000-MTTF
– 1 fan, 200,000-hour MTTF
– 1 SCSI cable, 1,000,000-hour MTTF
Component lifetimes are exponentially distributed, failures independent.
Compute MTTF of the system as a whole.

    
Failure rate of System = 10 ∗ + + + +
,UUU,UUU jUU,UUU ]UU,UUU ]UU,UUU ,UUU,UUU

= 2.3 * 10-5 failures per hour (or 23,000 FIT)


MTTF = 1 / Failure Rate = 1 / (2.3 * 10-5) = 43,500 hours

You might also like