Upload
agatha-hall
View
217
Download
0
Embed Size (px)
DESCRIPTION
Architecture Development and Styles 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 PentiumTM, Motorola, MC68000TM, and the IBM & Macintosh PowerPCTM.
Citation preview
Computer Engineering
Rabie A. Ramadan
Lecture 2
Table of Contents
2
Architecture Development and Styles
Performance Measures
Amdahl’s Law
Architecture Development and Styles 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 PentiumTM, • Motorola, • MC68000TM, • and the IBM & Macintosh PowerPCTM.
Architecture Development and Styles (Cont.)
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
Speedup : • a measure of how a machine performs after some enhancement
relative to its original performance.
Amdahl’s Law and Performance Measure (Cont.)
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 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
Performance analysis: • How fast can a program be executed using a given computer?
User Point of View • Time taken to execute a given job (program)
Lab Engineer• Total amount of work done in a given time.
Performance Measures (Cont.)
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.)
Cycle Time (CT)• A mount of time taken by a cycle
Clock Frequency (f) / Clock Rate • f= 1/ CT
First Performance Measure
The CPU time to execute a job is : • CPU time = Clock Count x Clock Time
Performance Measures (Cont.) The average number of Clock Cycles Per Instruction (CPI):
In case of the CPI per instruction is known :
Ii is the repetition time in the given job
Not All instructions take the same number of clock cycles
Performance Measures (Cont.)
The relation between the CPI and CPU Time:
Performance Measures (Cont.)
Another Measure is the rate of instruction execution per unit time: • Millions Instructions Per Second (MIPS)
Group Activity
Drive CPU Time and MIPS in terms of “Clock Rate”?
Group Activity 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 Assuming the execution of 100 instructions, the overall
CPI can be computed as:
Group Activity 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 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 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.) 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.) Example
Note: We could not decide on which system to use due to no great deal of variability
Program System A Execution Time
System B Execution Time
System C Execution Time
v 50 100 500
w 200 400 600
x 250 500 500
y 400 800 800
z 5000 4100 3500
Average 1180 1180 1180
Performance Measure (Cont.) 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.) 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 500
y 400 800 800
z 5000 4100 3500
Geometric mean
346.6 580 840.7