You are on page 1of 17

Computer Architecture

Lecture 6
Performance Characteristics

• How can we assess a computer system?


• Which processor is better Intel or AMD??

• Unfortunately it is not as simple as SPEED …

• Instructions set
• Programming Language
• Compiler
• Programming implementation for application
Performance Characteristics
Clock Speed

• All CPU operations are governed by a system clock

• Clock speed is measured in Hz

• For example 1GHz = 1 billion pulse per second

• This clock signal is generated by quartz crystal


Performance Characteristics
Clock Speed
• Quartz crystal generates a sine wave which is converted to digital for processor

• All actions in processor require this clock signal (synchronization)

• Processor has many features decoding instructions, ALU operations, pipelining


etc

• Not all process take same time to executed

• Direct comparison of clock speed does not tell the whole story
Performance Characteristics
Instruction Execution Rate
• Instruction Count: It is the number of machine instructions executed
for a program until it runs to completion or until some time interval

• Average cycle per instructions (CPI): Number of cycles required to


complete a program

σ𝑛𝑖=1(𝐶𝑃𝐼𝑖 𝑥 𝐼𝑖 )
𝐶𝑃𝐼 =
𝐼𝑐
Performance Characteristics
Instruction Execution Rate

• CPIi number of cycles required for instruction I

• Ii number of instructions executed

• Ic is total instruction count

• Total time required by processor to execute a program

𝑇 = 𝐼𝑐 𝑥 𝐶𝑃𝐼 𝑥 𝜏
Performance Characteristics
Instruction Execution Rate

• Instruction execution involves processor working and time required to


fetch data from memory

• Hence we need to incorporate memory cycle into this equation

𝑇 = 𝐼𝑐 𝑥 [𝑝 + (𝑚𝑥𝑘)] 𝑥 𝜏
• p = Number of processor cycle to decode & execute
• m = memory references needed
• k = memory cycle time / processor cycle time
Performance Characteristics
Instruction Execution Rate

• Program execution is influenced by the following system attributes


• Instruction Set Architecture
• Compiler Technology
• Processor implementation
• Memory design
Performance Characteristics
Instruction Execution Rate

• MIPS: Millions of Instruction Executed per Second

𝐼𝑐 𝑓
• MIPS rate =  
𝑇 𝑥 106 𝐶𝑃𝐼 𝑥 106

• Another performance measure is Floating Point Operations


𝑁𝑜.𝑜𝑓 𝐸𝑥𝑒𝑐𝑢𝑡𝑒𝑑 𝐹𝑙𝑜𝑎𝑡𝑖𝑛𝑔 𝑝𝑜𝑖𝑛𝑡 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑜𝑛𝑠 𝑖𝑛 𝑝𝑟𝑜𝑔𝑟𝑎𝑚
FLOPS :
𝐸𝑥𝑒𝑐𝑢𝑡𝑖𝑜𝑛 𝑇𝑖𝑚𝑒 𝑥 106

It can be MFLOPS, GLOPS, TFLOPS


Performance Characteristics
Example

• CPI : • CPI
( 45000𝑥1 + 32000𝑥2 + 15000𝑥2 +(8000𝑥2)

100000
• CPI: 1.55
Performance Characteristics
Example

• MIPS : • MIPS
𝑓 40𝑥106

𝐶𝑃𝐼 𝑥 106 1.55 𝑥106

MIPS: 25.8
Performance Characteristics
Example

106

• Execution Speed: • Execution speed


1
100000 𝑥 1.55 𝑥 ( 6
)
40 𝑥 10

Execution speed: 3.87msec


Performance Characteristics
Amdahl Law

• System performance can be improved by


• Parallel processing
• Introduction of cache
• Decrease in memory access time

• Amdahl law deals with speedup of a program due to use of multiple


processors
𝑇𝑖𝑚𝑒 𝑡𝑜 𝑒𝑥𝑒𝑐𝑢𝑡𝑒 𝑝𝑟𝑜𝑔𝑟𝑎𝑚 𝑜𝑛 𝑎 𝑠𝑖𝑛𝑔𝑙𝑒 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑜𝑟
Speedup =
𝑇𝑖𝑚𝑒 𝑡𝑜 𝑒𝑥𝑒𝑐𝑢𝑡𝑒 𝑝𝑟𝑜𝑔𝑟𝑎𝑚 𝑜𝑛 𝑁 𝑝𝑎𝑟𝑎𝑙𝑙𝑒𝑙 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑜𝑟𝑠
Performance Characteristics
Amdahl Law

Time to execute program on single Time to execute program on parallel


processor processors N
𝑇(1 – 𝑓) + 𝑇𝐹 𝑇𝐹
𝑇(1 – 𝑓) +
𝑁
Total execution time T N is number of processors
Serial processing code (1 – f)
Parallel processing code f
𝑇𝑖𝑚𝑒 𝑡𝑜 𝑒𝑥𝑒𝑐𝑢𝑡𝑒 𝑝𝑟𝑜𝑔𝑟𝑎𝑚 𝑜𝑛 𝑎 𝑠𝑖𝑛𝑔𝑙𝑒 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑜𝑟
Speedup =
𝑇𝑖𝑚𝑒 𝑡𝑜 𝑒𝑥𝑒𝑐𝑢𝑡𝑒 𝑝𝑟𝑜𝑔𝑟𝑎𝑚 𝑜𝑛 𝑁 𝑝𝑎𝑟𝑎𝑙𝑙𝑒𝑙 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑜𝑟𝑠

1
= 𝑓
1−𝑓 +𝑁
Performance Characteristics
Amdahl Law 1
Speedup = 𝑓
1−𝑓 +𝑁
• If number of parallel processing tasks (f) is too small
• If N is too many then speed up is not effective

• Amdahl Law highlights that development of appropriate software is


needed to utilize the ever growing number of cores

• Versatility of Amdahl Law is that it can be generalized for any design


or technical improvement in computer system
Performance Characteristics
Amdahl Law

𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑛𝑐𝑒 𝑎𝑓𝑡𝑒𝑟 𝑒𝑛ℎ𝑎𝑛𝑐𝑒𝑚𝑒𝑛𝑡


• Speedup =
𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑛𝑐𝑒 𝑏𝑒𝑓𝑜𝑟𝑒 𝑒𝑛ℎ𝑎𝑛𝑐𝑒𝑚𝑒𝑛𝑡

𝐸𝑥𝑐𝑒𝑢𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒 𝑏𝑒𝑓𝑜𝑟𝑒 𝑒𝑛ℎ𝑎𝑛𝑐𝑒𝑚𝑒𝑛𝑡


• Speedup =
𝐸𝑥𝑒𝑐𝑢𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒 𝑎𝑓𝑡𝑒𝑟 𝑒𝑛ℎ𝑎𝑛𝑐𝑒𝑚𝑒𝑛𝑡

1
Speedup = 𝑓
1−𝑓 +𝑆𝑓

If execution time is enhanced by Sf then overall speedup is as above


Performance Characteristics
Useful Links

• https://www.youtube.com/watch?v=uHqbE3JiDPY&ab_channel=Tuto
rialsPoint%28India%29Ltd.

You might also like