PERFORMANCE OF A COMPUTER
PERFORMANCE OF A COMPUTER
Lecture Summary
1. Processor clock
2. Basic performance equation
1 PERFORMANCE OF A COMPUTER
The dictionary meaning of performance (from CALD - Computer Advanced Learners Dictionary)
When we say high performance cars are most expensive, what we understand? Here high performance
means the car is fast, powerfull and easy to control.
Definition
The speed with which a computer execute program is affected by the design of its hardware and its
machine language instructions. Because programs are usually written in a high level language,
performance is also affected by the compiler that translate program in to machine language. For the best
performance is ,it is necessary to design the compiler , the machine instruction set and the hardware in a
co-ordinate way .
Depending on the context good compiler performance may involve one or more of the followings
Lecture Notes of Computer Architecture by Prof. Anil Kumar Swain, KIIT-CSE Page 1 / 5
1.1 System Performance Measurement
Knowing the performance level of a computer system is a common requirement for computer users
(buyers, programmer, etc.). Performance comparison of two or more computers is a frequent need for
making a choice between several computers.
For a given computer, there are two simple measurements that give us an idea about its performance.
Throughput and Response Time
Response time (also called execution time)
Response time is the time between the start and compilation of a task. In other words, this is the
time taken by the computer , to execute a given program, from start to end of the program.
The response time for a program is different for different computer.
Throughput (also called bandwidth)
Throughput is the total amount of work done in a given time. In other words, this is the work
done (total number of programs executed) by the computer during a given period of time.
We can relate performance and execution time for computer A :
1
Performance of A =
Execution time of A
This means that for two computers A and B, if the performance of A is greater than the performance of
B, we have
1 1
=> Execution time of A
> Execution time of B
When we compare the performance of two different computers A and B quantitatively we say “A is n
times faster than B” or equivalently “A is n times as fast as B”.
Performance of A Execution time of B Remember
= =n
Performance of B Execution time of A
Lecture Notes of Computer Architecture by Prof. Anil Kumar Swain, KIIT-CSE Page 2 / 5
Example-1 (Ref-Patterson/P-29)
If a computer a runs a program in 10 seconds and B runs the same program in 15 seconds, how much
faster is A than B?
Answer
=>15/10=1.5
A is therefore 1.5 times faster than B.
1) To maximize performance, we want to minimize response time or execution time for some task
(True/ False). Answer: True
2) Do the following changes to a computer system increase throughput, decrease response time or
both?
Case1: Replacing the processor in a computer with a faster version.
Case2: Adding additional processors to a system that uses multiple processors for separate tasks.
For example searching the world wide web.
Answer : In case1: both response time and throughput are improved because decreasing
response time almost always improves throughput. In cese2: Only throughput increases because
no one task gets work done faster.
Lecture Notes of Computer Architecture by Prof. Anil Kumar Swain, KIIT-CSE Page 3 / 5
In other words, we can say processor circuits are controlled by a timing signal called a clock.
The clock defines regular time intervals, called clock cycles.
The clock cycle time or clock period is just the length of a cycle. One “cycle” is the
minimum time it takes the CPU to do any work. To execute a machine instruction, the
processor divides the action to be performed into a sequence of basic steps, such that each step
can be completed in one clock cycle.
Clock rate: The rate at which the clock cycle repeats itself is called clock rate. In other words
the clock rate is the speed at which a processor executes instructions. The clock rate, or
frequency, is the reciprocal of the cycle time.
� Remember
� =
�
Of course, the lower the cycle time and the higher the clock rate, the faster a given architecture
can run.
Clock rate is measured in cycles per second. The term “cycles per second” is called hertz (Hz).
Some examples illustrate some typical frequencies.
The term “million” is denoted by the prefix Mega (M), and “billion” is denoted by the prefix
Giga (G). Hence 500 million cycles per second is usually abbreviated to 500 Megahertz (MHz),
and 1250 million cycles per second is abbreviated to 1250 million = 1.25 billion=1.25 Gigahertz
(GHz).
When you buy a computer, one of the first things you probably look for is the speed of the
computer. These days, it's not unusual to here rates as fast as 3 GHz. But what is 3 Ghz referring
to? This is referring to the clock rate.
Every processor has its own built-in clock, this clock dictates how fast the processor can process
the data (0's and 1's).
If a processor is advertised as having a speed of 2GHz, this means that it can process data
internally 2 billion times a second (every clock cycle). If the processor is a 32-bit processor
running at 2GHz then it can potentially process 32 bits of data simultaneously, 2 billion times a
second !!
Every computer contains an internal clock that regulates the rate at which instructions are
executed and synchronizes all the various computer components. The CPU requires a fixed
number of clock ticks (or clock cycles) to execute each instruction. The faster the clock, the more
instructions the CPU can execute per second.
Lecture Notes of Computer Architecture by Prof. Anil Kumar Swain, KIIT-CSE Page 4 / 5
1.3 Basic Performance Equation
We know, Response time or Execution time is the time taken by the computer , to execute a
given program, from start to end of the program.
There are three equally important components of execution time.
i) Clock cycle time/clock period – It is just the length of a cycle.
ii) CPI - It is is the average number of clock cycles per instruction, for a particular
machine and program.
iii) Number of instructions in a program – It is the dynamic instruction count that is
how many instructions are actually executed when the program runs, not the static
instruction count that is how many lines of code are in a program.
T=P x Sx N
SxN
T=
R
1) A processor advertised as having a 900 MHz clock is always provides better performance than a
700-MHz processor (True/False). Justify your answer.
Answer: False because both processors may have a different value of S.
2) When run on a given system, a program takes 1,000, 000 cycles. If the system achieves a CPI of
40, how many instructions were executed in running the program?
Answer:
We know CPI = Cycles/Instructions
Instructions = Cycles/CPI = 1,000, 000/ 40 = 25, 000
Lecture Notes of Computer Architecture by Prof. Anil Kumar Swain, KIIT-CSE Page 5 / 5