SlideShare a Scribd company logo
1 of 19
Evaluation of Computer
performance
Dr. Prasenjit Dey
Performance
 The performance of a computer is defined by its speed of
processing of the instructions
 Faster the machine, better the performance
 What are the factors influences the performance of a
computer?
Performance Metrics
 Response Time
 The total time required by an instruction to complete
 From start time of the instruction to the finish time
 It is also known as elapsed time
 Response time = Memory access time + waiting time + CPU
time
 Throughput:
 Number of instructions completed in a specific time
Execution Time
 CPU time
 It is the time when an instruction utilizes the CPU
 Time duration when an instruction is in running state
 It is also known as execution time
 time spent to execute the lines of codes in a program
 CPU time = user CPU time + system CPU time
 elapsed time = user CPU time + system CPU time + waiting time
 Computer performance is measured on the basis of CPU time
Comparison of Performance
 The performance of a machine is inversely proportional to
the CPU time
 Performance = 1/CPU time
 If machine A is n times faster than machine B then
 Performance(A)/performance(B) = n
Clock Cycles
 CPU time is measured with the help of CPU cycles
 Each instruction uses a certain number of CPU cycles to execute an
instruction
 The time taken by an instruction is
 (number of CPU cycles) x (time to execute 1 CPU cycle)
 If all instructions take equal number of cycles then,
 The time required to execute a program of N instructions is
 N x (number of CPU cycle) x (time to execute 1 CPU cycle)
 Avg. program execution time
 (cycles/program) x (seconds/cycle)
 seconds/cycle  cycle time
 Clock rate/frequency  cycle/seconds, used more often
Performance of a Program
 CPU execution time of a program is
 (No. of CPU cycles) x (cycle time)
 (No. of CPU cycles)/(clock rate)
 An efficient program should require less number of CPU
cycles and/or high clock rate
 clock rate  1 Hz. = 1 cycle/sec,
 If clock rate = 200 Mhz?
 Time to execute a program = 1/(200*106) = 5*10-3*10-6 =
5*10-9 sec
Performance of a Program
 In computer, different instructions use different amounts of
CPU cycles
 Bitwise instructions require less number of CPU cycles,
whereas multiplicative instructions, floating point instructions
require more number of CPU cycles,
 To compute the execution time of a program, one should
compute the avg. CPU cycle time or clock rate
CPI: Cycles Per Instruction
 For a given program
 Compute number of instructions
 Compute total number of cycles to execute all instructions
 Divide total number of cycles by number of instructions
 cycles per instruction (CPI)
 The avg. amount of time required to execute an instruction in a
program
 Measured in terms of MIPS (millions of instructions per second)
CPU Execution Time
 CPU execution time of a program is
 N x ( 𝐢=𝟏
𝐍
𝐜𝐲𝐜𝐥𝐞 𝐭𝐢𝐦𝐞 𝐟𝐨𝐫 𝐢𝐧𝐬𝐭𝐫𝐜𝐭𝐢𝐨𝐧 𝐢)/N x cycle time,
 Here N is the total number of instructions in a program
 Average CPI x instruction count x cycle time
 (Average CPI x instruction count) / clock rate
Problem 1
 Let there are 2 machines, machine A and machine B, which
execute the sample program. Where,
 Machine A clock cycle is 10ns and CPI is 2
 Machine B clock cycle is 20ns and CPI is 1.2
 Which one has better performance?
 Computation for machine A
 Avg. CPI x clock cycle time = 2 x 10 = 20ns
 Computation for machine B
 Avg. CPI x clock cycle time = 1.2 x 20 = 24ns
 Machine A has better performance for this program
Problem 2
 Let us consider that two programs that contain three different
types of instructions: type A, type B, and type C
 Type A, type B, and type C instructions require 4, 3, 5 cycles
respectively.
 Suppose program 1, uses 1 type A instructions, 2 type B
instructions, and 2 type C instructions
 Suppose program 2, uses 1 type A instructions, 4 type B
instructions, and 1 type C instructions
 Then which program is faster?
 Computation for program 1
 1*4 + 2*3 + 2*5 = 20cycles
 Computation for program 2
 1*4 + 4*3 + 1*5 = 21cycles
 Program is 1 faster
Problem 3
 Suppose your program consists of 2500 instructions. The
proportion of different kinds of instructions in the program is as
follow: Data transfer instruction 50%, arithmetic instruction 30%
and branching related instructions 20%. The cycles consumed by
these types of instructions are 2, 5, and 10 respectively. What will
be the execution time for a 4 GHz processor to execute your
program?
 Avg CPI = 0.5*2 + 0.3*5 + 0.2*10 = 4.5
 Avg execution time = 2500* (4.5/4 *106 )Sec
= 2500*1.125 *10-6 Sec
= 2.8125ms
Amdahl's Law
 It computes the overall performance enhancement when the
performance of a fraction of code(program) is enhanced
 Overall performance enhancement 
 Overall Speedup = old execution time/new execution time
=
1
(1 – fraction_enhanced) + fraction_enhanced
speedup
 Fraction_enhanced
 The sub part of the code/program which has been enhanced by using
some hardware or compiler
 Speedup
 The performance gain in the enhanced fraction of code
Amdahl's Law: example
 Let a program contains 10 multiplicative instructions and 10
additive instructions. Each multiplicative instruction takes 50ns and
each additive instructions take 10ns.
 Now by adding some hardware, we enhanced the performance of
multiplicative instructions and complete a multiplicative instructions
in 20ns.
 What will be the overall speedup?
 Old execution time = 50*10 + 10*10 =600ns
 New execution time =
1
(1 – fraction_enhanced) + fraction_enhanced
speedup
=
1
1−
500
600
+
500
600
500
200
=
1
1
6
+(
1
3
)
=
1
3
6
=
3
6
= 2
Problems on Amdahl's Law
 With the use of Amdahl’s law, conclude among the given options
which possible improvement is the best one
 Possible improvement
A. Branch CPI can be decreased from 4 to 3
B. Increase clock frequency from 2 to 2.3GHz
C. Store CPI can be decreased from 3 to 2
Instruction type Frequency CPI
ALU 40% 1
Branch 20% 4
Load 30% 2
Store 10% 3
Solution
 Avg. CPI = (0.4*1 + 0.2*4 + 0.3*2 + 0.1*3) = 2.1
 Clock rate = 2GHz
 Avg. instruction execution time = Avg. CPI/clock rate = 2.1/2 =
1.05*10-6 sec
 Case A
 Current execution time = (0.4*1 + 0.2*3 + 0.3*2 + 0.1*3)/2 = 0.95*10-6 sec
 Case B
 Increase clock frequency from 2 to 2.3
 Current execution time = (0.4*1 + 0.2*4 + 0.3*2 + 0.1*3)/(2.3) = 0.91*10-6 sec
 Case C
 Current execution time = (0.4*1 + 0.2*4 + 0.3*2 + 0.1*2)/2 = 1*10-6 sec
Conclusion
 Performance of a machine measured with the help of
clock cycles
 Each instructions require different clock cycles, need
to compute average clock cycle per instruction(CPI)
 Overall performance gain can be achieved by
enhancing a fraction of a program
Thank you

More Related Content

What's hot

Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptmali yogesh kumar
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System CallsVandana Salve
 
program partitioning and scheduling IN Advanced Computer Architecture
program partitioning and scheduling  IN Advanced Computer Architectureprogram partitioning and scheduling  IN Advanced Computer Architecture
program partitioning and scheduling IN Advanced Computer ArchitecturePankaj Kumar Jain
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionRenu Kewalramani
 
Trends in computer architecture
Trends in computer architectureTrends in computer architecture
Trends in computer architecturemuhammedsalihabbas
 
Performance analysis and randamized agoritham
Performance analysis and randamized agorithamPerformance analysis and randamized agoritham
Performance analysis and randamized agorithamlilyMalar1
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMKamran Ashraf
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9koolkampus
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compilerIffat Anjum
 
Lecture 14 run time environment
Lecture 14 run time environmentLecture 14 run time environment
Lecture 14 run time environmentIffat Anjum
 
Operating system 02 os as an extended machine
Operating system 02 os as an extended machineOperating system 02 os as an extended machine
Operating system 02 os as an extended machineVaibhav Khanna
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
 

What's hot (20)

Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
program partitioning and scheduling IN Advanced Computer Architecture
program partitioning and scheduling  IN Advanced Computer Architectureprogram partitioning and scheduling  IN Advanced Computer Architecture
program partitioning and scheduling IN Advanced Computer Architecture
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 
Trends in computer architecture
Trends in computer architectureTrends in computer architecture
Trends in computer architecture
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Performance analysis and randamized agoritham
Performance analysis and randamized agorithamPerformance analysis and randamized agoritham
Performance analysis and randamized agoritham
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISM
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
Interrupt
InterruptInterrupt
Interrupt
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Lecture 14 run time environment
Lecture 14 run time environmentLecture 14 run time environment
Lecture 14 run time environment
 
Operating system 02 os as an extended machine
Operating system 02 os as an extended machineOperating system 02 os as an extended machine
Operating system 02 os as an extended machine
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
Program control
Program controlProgram control
Program control
 

Similar to Evaluation of computer performance

Kiến trúc máy tính-COE 301 - Performance.ppt
Kiến trúc máy tính-COE 301 - Performance.pptKiến trúc máy tính-COE 301 - Performance.ppt
Kiến trúc máy tính-COE 301 - Performance.pptTriTrang4
 
COMPUTER ARCHITECTURE BASIC CONCEPT
COMPUTER ARCHITECTURE BASIC CONCEPTCOMPUTER ARCHITECTURE BASIC CONCEPT
COMPUTER ARCHITECTURE BASIC CONCEPTAzizul Mamun
 
L07_performance and cost in advanced hardware- computer architecture.pptx
L07_performance and cost in advanced hardware- computer architecture.pptxL07_performance and cost in advanced hardware- computer architecture.pptx
L07_performance and cost in advanced hardware- computer architecture.pptxIsaac383415
 
Measuring Performance by Irfanullah
Measuring Performance by IrfanullahMeasuring Performance by Irfanullah
Measuring Performance by Irfanullahguest2e9811e
 
Computer architecture short note (version 8)
Computer architecture short note (version 8)Computer architecture short note (version 8)
Computer architecture short note (version 8)Nimmi Weeraddana
 
Cpu performance matrix
Cpu performance matrixCpu performance matrix
Cpu performance matrixRehman baig
 
Performance of processor.ppt
Performance of processor.pptPerformance of processor.ppt
Performance of processor.pptnivedita murugan
 
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceLec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceHsien-Hsin Sean Lee, Ph.D.
 
Measuringperformance 090527015748-phpapp01
Measuringperformance 090527015748-phpapp01Measuringperformance 090527015748-phpapp01
Measuringperformance 090527015748-phpapp01manishajadhav13j
 
performance evaluation of parallel processors.pptx
performance evaluation of parallel processors.pptxperformance evaluation of parallel processors.pptx
performance evaluation of parallel processors.pptxnivedita murugan
 
performance uploading.pptx
performance uploading.pptxperformance uploading.pptx
performance uploading.pptxSanthiS10
 
Computer Architecture Performance and Energy
Computer Architecture Performance and EnergyComputer Architecture Performance and Energy
Computer Architecture Performance and EnergyJason J Pulikkottil
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6Shah Zaib
 
Lecture 3
Lecture 3Lecture 3
Lecture 3Mr SMAK
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdfRajMantry
 

Similar to Evaluation of computer performance (20)

Kiến trúc máy tính-COE 301 - Performance.ppt
Kiến trúc máy tính-COE 301 - Performance.pptKiến trúc máy tính-COE 301 - Performance.ppt
Kiến trúc máy tính-COE 301 - Performance.ppt
 
COMPUTER ARCHITECTURE BASIC CONCEPT
COMPUTER ARCHITECTURE BASIC CONCEPTCOMPUTER ARCHITECTURE BASIC CONCEPT
COMPUTER ARCHITECTURE BASIC CONCEPT
 
L07_performance and cost in advanced hardware- computer architecture.pptx
L07_performance and cost in advanced hardware- computer architecture.pptxL07_performance and cost in advanced hardware- computer architecture.pptx
L07_performance and cost in advanced hardware- computer architecture.pptx
 
Measuring Performance by Irfanullah
Measuring Performance by IrfanullahMeasuring Performance by Irfanullah
Measuring Performance by Irfanullah
 
Computer architecture short note (version 8)
Computer architecture short note (version 8)Computer architecture short note (version 8)
Computer architecture short note (version 8)
 
Cpu performance matrix
Cpu performance matrixCpu performance matrix
Cpu performance matrix
 
Performance of processor.ppt
Performance of processor.pptPerformance of processor.ppt
Performance of processor.ppt
 
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceLec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
 
Measuringperformance 090527015748-phpapp01
Measuringperformance 090527015748-phpapp01Measuringperformance 090527015748-phpapp01
Measuringperformance 090527015748-phpapp01
 
performance evaluation of parallel processors.pptx
performance evaluation of parallel processors.pptxperformance evaluation of parallel processors.pptx
performance evaluation of parallel processors.pptx
 
performance uploading.pptx
performance uploading.pptxperformance uploading.pptx
performance uploading.pptx
 
Computer Architecture Performance and Energy
Computer Architecture Performance and EnergyComputer Architecture Performance and Energy
Computer Architecture Performance and Energy
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6
 
04 performance
04 performance04 performance
04 performance
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
02 performance
02 performance02 performance
02 performance
 
performance
performanceperformance
performance
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdf
 
1571 mean
1571 mean1571 mean
1571 mean
 
COA Unit-5.pptx
COA Unit-5.pptxCOA Unit-5.pptx
COA Unit-5.pptx
 

More from Prasenjit Dey

Dynamic interconnection networks
Dynamic interconnection networksDynamic interconnection networks
Dynamic interconnection networksPrasenjit Dey
 
Machine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classificationMachine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classificationPrasenjit Dey
 
Machine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionMachine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionPrasenjit Dey
 
Machine learning in agriculture module 2
Machine learning in agriculture module 2Machine learning in agriculture module 2
Machine learning in agriculture module 2Prasenjit Dey
 
Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1Prasenjit Dey
 
Support vector machine
Support vector machineSupport vector machine
Support vector machinePrasenjit Dey
 
Numerical on general pipelines
Numerical on general pipelinesNumerical on general pipelines
Numerical on general pipelinesPrasenjit Dey
 
General pipeline concepts
General pipeline conceptsGeneral pipeline concepts
General pipeline conceptsPrasenjit Dey
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPSPrasenjit Dey
 
Page replacement and thrashing
Page replacement and thrashingPage replacement and thrashing
Page replacement and thrashingPrasenjit Dey
 
Register transfer and microoperations part 2
Register transfer and microoperations part 2Register transfer and microoperations part 2
Register transfer and microoperations part 2Prasenjit Dey
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Prasenjit Dey
 
Register transfer and microoperations part 1
Register transfer and microoperations part 1Register transfer and microoperations part 1
Register transfer and microoperations part 1Prasenjit Dey
 
Different types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROMDifferent types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROMPrasenjit Dey
 
Carry look ahead adder
Carry look ahead adder Carry look ahead adder
Carry look ahead adder Prasenjit Dey
 
Binary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmBinary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmPrasenjit Dey
 
Computer organization basics and number systems
Computer organization basics and number systemsComputer organization basics and number systems
Computer organization basics and number systemsPrasenjit Dey
 

More from Prasenjit Dey (20)

Dynamic interconnection networks
Dynamic interconnection networksDynamic interconnection networks
Dynamic interconnection networks
 
Machine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classificationMachine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classification
 
Machine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionMachine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regression
 
Machine learning in agriculture module 2
Machine learning in agriculture module 2Machine learning in agriculture module 2
Machine learning in agriculture module 2
 
Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Numerical on general pipelines
Numerical on general pipelinesNumerical on general pipelines
Numerical on general pipelines
 
General pipeline concepts
General pipeline conceptsGeneral pipeline concepts
General pipeline concepts
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPS
 
Page replacement and thrashing
Page replacement and thrashingPage replacement and thrashing
Page replacement and thrashing
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
Register transfer and microoperations part 2
Register transfer and microoperations part 2Register transfer and microoperations part 2
Register transfer and microoperations part 2
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
Register transfer and microoperations part 1
Register transfer and microoperations part 1Register transfer and microoperations part 1
Register transfer and microoperations part 1
 
Different types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROMDifferent types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROM
 
Cache memory
Cache  memoryCache  memory
Cache memory
 
Carry look ahead adder
Carry look ahead adder Carry look ahead adder
Carry look ahead adder
 
Binary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmBinary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithm
 
Booth's algorithm
Booth's algorithm Booth's algorithm
Booth's algorithm
 
Computer organization basics and number systems
Computer organization basics and number systemsComputer organization basics and number systems
Computer organization basics and number systems
 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

Evaluation of computer performance

  • 2. Performance  The performance of a computer is defined by its speed of processing of the instructions  Faster the machine, better the performance  What are the factors influences the performance of a computer?
  • 3. Performance Metrics  Response Time  The total time required by an instruction to complete  From start time of the instruction to the finish time  It is also known as elapsed time  Response time = Memory access time + waiting time + CPU time  Throughput:  Number of instructions completed in a specific time
  • 4. Execution Time  CPU time  It is the time when an instruction utilizes the CPU  Time duration when an instruction is in running state  It is also known as execution time  time spent to execute the lines of codes in a program  CPU time = user CPU time + system CPU time  elapsed time = user CPU time + system CPU time + waiting time  Computer performance is measured on the basis of CPU time
  • 5. Comparison of Performance  The performance of a machine is inversely proportional to the CPU time  Performance = 1/CPU time  If machine A is n times faster than machine B then  Performance(A)/performance(B) = n
  • 6. Clock Cycles  CPU time is measured with the help of CPU cycles  Each instruction uses a certain number of CPU cycles to execute an instruction  The time taken by an instruction is  (number of CPU cycles) x (time to execute 1 CPU cycle)  If all instructions take equal number of cycles then,  The time required to execute a program of N instructions is  N x (number of CPU cycle) x (time to execute 1 CPU cycle)  Avg. program execution time  (cycles/program) x (seconds/cycle)  seconds/cycle  cycle time  Clock rate/frequency  cycle/seconds, used more often
  • 7. Performance of a Program  CPU execution time of a program is  (No. of CPU cycles) x (cycle time)  (No. of CPU cycles)/(clock rate)  An efficient program should require less number of CPU cycles and/or high clock rate  clock rate  1 Hz. = 1 cycle/sec,  If clock rate = 200 Mhz?  Time to execute a program = 1/(200*106) = 5*10-3*10-6 = 5*10-9 sec
  • 8. Performance of a Program  In computer, different instructions use different amounts of CPU cycles  Bitwise instructions require less number of CPU cycles, whereas multiplicative instructions, floating point instructions require more number of CPU cycles,  To compute the execution time of a program, one should compute the avg. CPU cycle time or clock rate
  • 9. CPI: Cycles Per Instruction  For a given program  Compute number of instructions  Compute total number of cycles to execute all instructions  Divide total number of cycles by number of instructions  cycles per instruction (CPI)  The avg. amount of time required to execute an instruction in a program  Measured in terms of MIPS (millions of instructions per second)
  • 10. CPU Execution Time  CPU execution time of a program is  N x ( 𝐢=𝟏 𝐍 𝐜𝐲𝐜𝐥𝐞 𝐭𝐢𝐦𝐞 𝐟𝐨𝐫 𝐢𝐧𝐬𝐭𝐫𝐜𝐭𝐢𝐨𝐧 𝐢)/N x cycle time,  Here N is the total number of instructions in a program  Average CPI x instruction count x cycle time  (Average CPI x instruction count) / clock rate
  • 11. Problem 1  Let there are 2 machines, machine A and machine B, which execute the sample program. Where,  Machine A clock cycle is 10ns and CPI is 2  Machine B clock cycle is 20ns and CPI is 1.2  Which one has better performance?  Computation for machine A  Avg. CPI x clock cycle time = 2 x 10 = 20ns  Computation for machine B  Avg. CPI x clock cycle time = 1.2 x 20 = 24ns  Machine A has better performance for this program
  • 12. Problem 2  Let us consider that two programs that contain three different types of instructions: type A, type B, and type C  Type A, type B, and type C instructions require 4, 3, 5 cycles respectively.  Suppose program 1, uses 1 type A instructions, 2 type B instructions, and 2 type C instructions  Suppose program 2, uses 1 type A instructions, 4 type B instructions, and 1 type C instructions  Then which program is faster?  Computation for program 1  1*4 + 2*3 + 2*5 = 20cycles  Computation for program 2  1*4 + 4*3 + 1*5 = 21cycles  Program is 1 faster
  • 13. Problem 3  Suppose your program consists of 2500 instructions. The proportion of different kinds of instructions in the program is as follow: Data transfer instruction 50%, arithmetic instruction 30% and branching related instructions 20%. The cycles consumed by these types of instructions are 2, 5, and 10 respectively. What will be the execution time for a 4 GHz processor to execute your program?  Avg CPI = 0.5*2 + 0.3*5 + 0.2*10 = 4.5  Avg execution time = 2500* (4.5/4 *106 )Sec = 2500*1.125 *10-6 Sec = 2.8125ms
  • 14. Amdahl's Law  It computes the overall performance enhancement when the performance of a fraction of code(program) is enhanced  Overall performance enhancement   Overall Speedup = old execution time/new execution time = 1 (1 – fraction_enhanced) + fraction_enhanced speedup  Fraction_enhanced  The sub part of the code/program which has been enhanced by using some hardware or compiler  Speedup  The performance gain in the enhanced fraction of code
  • 15. Amdahl's Law: example  Let a program contains 10 multiplicative instructions and 10 additive instructions. Each multiplicative instruction takes 50ns and each additive instructions take 10ns.  Now by adding some hardware, we enhanced the performance of multiplicative instructions and complete a multiplicative instructions in 20ns.  What will be the overall speedup?  Old execution time = 50*10 + 10*10 =600ns  New execution time = 1 (1 – fraction_enhanced) + fraction_enhanced speedup = 1 1− 500 600 + 500 600 500 200 = 1 1 6 +( 1 3 ) = 1 3 6 = 3 6 = 2
  • 16. Problems on Amdahl's Law  With the use of Amdahl’s law, conclude among the given options which possible improvement is the best one  Possible improvement A. Branch CPI can be decreased from 4 to 3 B. Increase clock frequency from 2 to 2.3GHz C. Store CPI can be decreased from 3 to 2 Instruction type Frequency CPI ALU 40% 1 Branch 20% 4 Load 30% 2 Store 10% 3
  • 17. Solution  Avg. CPI = (0.4*1 + 0.2*4 + 0.3*2 + 0.1*3) = 2.1  Clock rate = 2GHz  Avg. instruction execution time = Avg. CPI/clock rate = 2.1/2 = 1.05*10-6 sec  Case A  Current execution time = (0.4*1 + 0.2*3 + 0.3*2 + 0.1*3)/2 = 0.95*10-6 sec  Case B  Increase clock frequency from 2 to 2.3  Current execution time = (0.4*1 + 0.2*4 + 0.3*2 + 0.1*3)/(2.3) = 0.91*10-6 sec  Case C  Current execution time = (0.4*1 + 0.2*4 + 0.3*2 + 0.1*2)/2 = 1*10-6 sec
  • 18. Conclusion  Performance of a machine measured with the help of clock cycles  Each instructions require different clock cycles, need to compute average clock cycle per instruction(CPI)  Overall performance gain can be achieved by enhancing a fraction of a program