Computer Engineering Rabie A Ramadan Lecture 2 Table
Computer Engineering Rabie A. Ramadan Lecture 2
Table of Contents l Architecture Development and Styles l Performance Measures l Amdahl’s Law 2
Architecture Development and Styles l Performance is the main goal of any architecture • Complex instructions • • • Reduces the number of instructions to be used • Small number of instructions to perform a job. Using different addressing modes that fits the required task Examples: • Complex Instructions Set Computers (CISCs) such as : • Intel Pentium. TM, • Motorola, • MC 68000 TM, • and the IBM & Macintosh Power. PCTM.
Architecture Development and Styles (Cont. ) l Speeding up some of the effective instructions • More than 80% of the instructions executed are those using: • • Assignment statements, conditional branching and procedure calls. Simple assignment statements constitute almost 50% of those operations. • Optimizing such instructions enhances the performance • Example: • • Reduced Instructions Set Computers (RISCs) such as: Sun SPARCTM and MIPS machines.
Amdahl’s Law and Performance Measure l Speedup : • a measure of how a machine performs after some enhancement relative to its original performance.
Amdahl’s Law and Performance Measure (Cont. ) l Not all program instructions execution time can be enhanced • • • May be part of it speedup due to the enhancement for a fraction of time For more than
Group Activity l A machine for which a speedup of 30 is possible after applying an enhancement. If under certain conditions the enhancement was only possible for 30% of the time, what is the speedup due to this partial application of the enhancement?
Answer
Performance Measures
Performance Measures l Performance analysis: • How fast can a program be executed using a given computer? l User Point of View l Lab Engineer • Time taken to execute a given job (program) • Total amount of work done in a given time.
Performance Measures (Cont. ) l Definitions • • Clock Cycle Time • The time between two consecutive rising (trailing) edges of a periodic clock signal Cycle Count (CC) • The number of CPU clock cycles for executing a job
Performance Measures (Cont. ) l l Cycle Time (CT) • A mount of time taken by a cycle Clock Frequency (f) / Clock Rate • f= 1/ CT
First Performance Measure l The CPU time to execute a job is : • CPU time = Clock Count x Clock Time
Performance Measures (Cont. ) l The average number of Clock Cycles Per Instruction (CPI): Not All instructions take the same number of clock cycles l In case of the CPI per instruction is known : l Ii is the repetition time in the given job
Performance Measures (Cont. ) l The relation between the CPI and CPU Time:
Performance Measures (Cont. ) l Another Measure is the rate of instruction execution per unit time: • Millions Instructions Per Second (MIPS)
Group Activity l Drive CPU Time and MIPS in terms of “Clock Rate”?
Group Activity l Consider computing the overall CPI for a machine A for which the following performance measures were recorded when executing a set of benchmark programs. Assume that the clock rate of the CPU is 200 MHz.
Answer l Assuming the execution of 100 instructions, the overall CPI can be computed as:
Group Activity l Suppose that the same set of benchmark programs considered above were executed on another machine, call it machine B, for which the following measures were recorded. What is the MIPS rating for the machine considered in the previous slide (machine A) and machine B assuming a clock rate of 200 MHz?
Answer
Group Activity l Given the following benchmarks, compute the CPU time and MIPS?
Solution Be Carful using it as a performance measure. It does not consider the execution time.
More Performance Measures
Performance Measure l Rate of floating-point instruction execution per unit time • • Million floating-point instructions per second (MFLOPS) Defined only for subset of instructions where floating point is used
Performance Measure (Cont. ) l l l Arithmetic Mean • • Gives a clear picture of the expected behavior of the system Used to compare different systems based on Benchmarks i is the execution time for the ith program n is the total number of programs in the set of benchmarks.
Performance Measure (Cont. ) l l Example Program System A Execution Time System B Execution Time System C Execution Time v 50 100 500 w 200 400 600 x 250 500 y 400 800 z 5000 4100 3500 Average 1180 Note: We could not decide on which system to use due to no great deal of variability
Performance Measure (Cont. ) l l l Geometric Mean • Gives a consistent measure with which to perform comparisons regardless of the distribution of the data. i is the execution time for the ith program n is the total number of programs in the set of benchmarks.
Performance Measure (Cont. ) l Example Program System A Execution Time System B Execution Time System C Execution Time v 50 100 500 w 200 400 600 x 250 500 y 400 800 z 5000 4100 3500 Geometric mean 346. 6 580 840. 7
- Slides: 29