0% found this document useful (0 votes)
15 views5 pages

PERFORMANCE OF A COMPUTER

Uploaded by

sanjanaasahoo.16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

PERFORMANCE OF A COMPUTER

Uploaded by

sanjanaasahoo.16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CS-2006 : Computer Architecture School of Computer Engineering, SPRING

KIIT Deemed to be University, Bhubaneswar 2021


PERFORMANCE OF A COMPUTER
(Processor Clock, Basic performance Equation)
Sem: 4 th
Section (s): COA-CSE-G1, COA-CSCE-G1 Faculty: Prof. Anil Kumar Swain

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)

 How well a person, machine, etc does a piece of work or an activity.


 The capability of machine or product.
 The accomplishment of a given task measured again present known standards of accuracy,
completeness, cost and speed.

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

 Computer performance is characterized by the amount of useful work accomplished by computer


system compare to the time and resources.
 The performance of computer is measured by amount of time taken by the computer to execute a
program. ( how quickly it can execute programs).

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

 Short response time for a given piece of work


 High throughput (rate of processing work)
 High availability of the computing system or application.
 Fast (or highly compact) data compression and decompression.
 High bandwidth/short data transmission time.

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

Performance of A > performance of B

1 1
=> Execution time of A
> Execution time of B

=> Execution time of B > Execution time of A

That is execution time on B is longer than execution time on A, If A is faster than 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

We know that A is n times faster than B if


Performance of A Execution Time for B
= =n
Performance of B Execution Time for A

=>15/10=1.5
A is therefore 1.5 times faster than B.

Question and Answer

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.

1.2 Processor Clock and Clock rate


 The clock on a computer is not the same as the clock on the wall, which is used to tell time.
 A clock signal is a particular type of signal that oscillates between a high and a low state and is
utilized like a metronome (which keeps the beat for musicians to play music) to coordinate
actions of circuits. A clock signal is produced by a clock generator.
 Example: Students have been sitting in class for a long time. Finally the bell rings throughout
the school signalling the end of the current period. Everyone gets up and moves through the hall
to their next classroom. After a few minutes the bell rings again to signal the start of the next
period. The bell has to ring everywhere in the school at the same time to coordinate movement.
Without the bell, some classes would be released early and others would be released late.
 The various parts of a computer hold instructions and data. Periodically they send this data along
wires to the next processing station. To coordinate this activity, the computer provides
a clock pulse. The clock is a regular pattern of alternating high and low voltages on a wire.
 A clock signal is basically a square wave voltage similar as the one shown below:

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.

 Relation between clock period P and lock rate R

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

o A 500MHz processor has a cycle time of 2ns.


o A 2GHz (2000MHz) CPU has a cycle time of just 0.5ns.

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

 The basic performance equation, which is fundamental to measuring computer performance,


measures the CPU time, is as follows.
 CPU Time To execute a program = T= time/program
 Time require to execute a basic step = P = time/cycle
 Average number of basic steps required to execute one machine instruction = CPI = S =
cycles/instruction
 Number of instructions a program contains is N = instructions/program
Now

Time Time Cycles Instructions


= x x
Program Cycle Instruction Program

CPU Time = P x CPI x N

T=P x Sx N

SxN
T=
R

Reference: CO/ Clarl Hamacher ��� Remember


Book, 5th Ed/ Page-15  �=

Question and Answer

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy