asda

Page 1

Computer Engineering

Rabie A. Ramadan Lecture 2


Table of Contents 

Architecture Development and Styles

Performance Measures

Amdahl’s Law

2


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):

Not All instructions take the same number of clock cycles 

In case of the CPI per instruction is known :

Ii is the repetition time in the given job


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 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

Note: We could not decide on which system to use due to no great deal of variability


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


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.