Lecture 4
Lecture 4
Computer Architecture
CPU Performance
Measurement
Why we need performance?
Hardware performance is key to the effectiveness of
entire system of hardware and software
Accessing the performance can be quite challenging
performance of computers
Performance Measure: e.g.
Plane Passenger Cruising Cruising Passenger
Capacity range Speed throughput
(miles) (m.p.h) (passengers x
m.p.h)
Boeing 777
Boeing 747
Sud
Concorde
Douglas DC-
8
Performance Measure: e.g.
Plane Passenger Cruising Cruising Passenger
Capacity range Speed throughput
(miles) (m.p.h) (passengers x
m.p.h)
Boeing 777 375
Boeing 747 470
Sud 132
Concorde
Douglas DC- 146
8
Performance Measure: e.g.
Plane Passenger Cruising Cruising Passenger
Capacity range Speed throughput
(miles) (m.p.h) (passengers x
m.p.h)
Boeing 777 375 4630
Boeing 747 470 4150
Sud 132 4000
Concorde
Douglas DC- 146 8720
8
Performance Measure: e.g.
Plane Passenger Cruising Cruising Passenger
Capacity range Speed throughput
(miles) (m.p.h) (passengers x
m.p.h)
Boeing 777 375 4630 610
Boeing 747 470 4150 610
Sud 132 4000 1350
Concorde
Douglas DC- 146 8720 544
8
Performance Measure: e.g.
Plane Passenger Cruising Cruising Passenger
Capacity range Speed throughput
(miles) (m.p.h) (passengers x
m.p.h)
Boeing 777 375 4630 610 228750
Boeing 747 470 4150 610 286700
Sud 132 4000 1350 178200
Concorde
Douglas DC- 146 8720 544 79424
8
Measuring Performance: computers…..
Response Time vs. throughput
1 . > 1 .
Execution timeX Execution timeY
1. Clock time
2. Number of clocks taken
Measuring Performance (contd.)
Let us denote:
The number of CPU clock cycles taken to execute a job by ‘CC’ (cycle count)
The cycle time by ‘CT’
Alternatively, because clock rate and clock cycle time are inverses,
Example:
A program runs in 10 seconds on a computer A, which
has a 2 GHz clock. We are trying to help a computer
designer build a computer B, which will run this
program in 6 seconds. The designer has determined that
a substantial increase in the clock rate is possible, but
this increase will affect the rest of CPU design, causing
computer B to require 1.2 times as many clock cycles as
computer A for this program. What clock rate should we
tell the designer to target?
Solution???
Instruction Performance
The performance equations above did not include any
reference to the number of instructions needed for the
program
since the compiler clearly generated instructions to
execute and the computer had to execute the instructions
to run the program, the execution time must depend on
the number of instructions in a program.
In this way we can say that execution time is equals to
the number of instructions executed multiplied by the
average time per instruction
Instruction Performance
• Therefore, the number of clock cycles required for a
program can be written as