140 likes | 466 Views
COSC 4349 and 5349 Computer Architecture Fundamentals of Computer Design (Part 4) Dr. Lappoon R. Tang Overview Principles of Computer Design What does it mean to use a quantitative approach to implementing these principles? Amdahl’s Law Readings Section 1.9
E N D
COSC 4349 and 5349Computer Architecture Fundamentals of Computer Design (Part 4) Dr. Lappoon R. Tang
Overview • Principles of Computer Design • What does it mean to use a quantitative approach to implementing these principles? • Amdahl’s Law
Readings • Section 1.9 • Skim thru “Processor Performance Equation”
Principles of Computer Design • Principle of Parallelism • Idea: Exploit parallelism, you get the tremendous speedup and save your time for party over the weekend • Ch. 2 • Principle of Locality • Idea: You fetch your stuffs close to where you just put them • Ch. 5 • Principle of Optimizing the Common Case • Idea: Live close to where you most frequently visit if you want to save gas money • This chapter, right here
Quantitative Principles of Computer Design Put the ideas in the previous slide into Mathematical equations and you get a precise model in each principle for: • performance evaluation • guidingyour design of a computer system
Amdahl’s Law: Scenario Scenario: You have a computer system. One day an apple dropped on your head but did not kill you and instead this idea for improving performance emerged. However, the enhancement can only be used for a fraction of overall execution time Q: How much actual speedup do we have in the computer system if we employ this enhancement whenever possible?
Equivalently: Amdahl’s Law: Speedup Example: Suppose I can over-clock my CPU to enhance its performance. When my CPU is over-clocked, execution time on my program1.c is 40 secs. When it is not over-clocked, execution time on program1.c is 80 secs. Speedup = 80/40 = 2 (i.e. with the enhancement, my CPU runs 2x as fast)
Amdahl’s Law: Fractionenhanced • Fractionenhanced is the fraction of time enhancement can be utilized in the entire (original) execution time (without enhancement) • Example: If my CPU can be over-clocked for 2 hours straight within a 4 hour period, Fractionenhanced = 2/4 = 0.5 (i.e. 50%) • Note: Fractionenhanced =< 1
Amdahl’s Law: Speedupenhanced • Speedupenhanced measures how much faster the task would run if the enhancement is used for the entire program • Exactly the same definition as Speedup • Example: With enhancement turned on, my program completes in 2 seconds; otherwise, 4 seconds. Speedupenhanced = 4/2 = 2 (i.e. 2x faster with enhancement)
Execution TimeOld 20 secs (66.7%) 10 secs (33.3%) Duration in which enhancement can be applied Duration in which enhancement cannot be applied But not applied 20 secs 5 secs Duration in which enhancement cannot be applied Duration in which enhancement can be applied Applied Execution TimeNew Speedupenhanced = ? Amdahl’s Law: Execution timenew Q: If we know the execution time without enhancement, Fractionenhanced and Speedupenhanced, how do we figure out the new execution time with enhancement? Answer: Speedupenhanced = 2
Total execution time NOT using enhancement Total execution time when enhancement Is used Amdahl’s Law: Execution timenew
Amdahl’s Law:Previous Example 10 secs 20 secs Speedup