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

Parallel computing
Parallel computingParallel computing
Parallel computingVinay Gupta
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Introduction to Parallel Distributed Computer Systems
Introduction to Parallel Distributed Computer SystemsIntroduction to Parallel Distributed Computer Systems
Introduction to Parallel Distributed Computer SystemsMrMaKKaWi
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
Course 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsCourse 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsAhmed El-Arabawy
 
THE GENERATION OF COMPUTER
THE GENERATION OF COMPUTERTHE GENERATION OF COMPUTER
THE GENERATION OF COMPUTERp.j. pranavan
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnectionSajid Marwat
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingSayed Chhattan Shah
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3Md. Mahedi Mahfuj
 
Advanced computer architecture
Advanced computer architectureAdvanced computer architecture
Advanced computer architectureAjithaSomasundaram
 
Introduction to Computing Lecture 01 history of computers
Introduction to Computing Lecture 01 history of computersIntroduction to Computing Lecture 01 history of computers
Introduction to Computing Lecture 01 history of computersMuhammad Bilal
 

What's hot (20)

Parallel computing
Parallel computingParallel computing
Parallel computing
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Introduction to Parallel Distributed Computer Systems
Introduction to Parallel Distributed Computer SystemsIntroduction to Parallel Distributed Computer Systems
Introduction to Parallel Distributed Computer Systems
 
Computer System Organization
Computer System OrganizationComputer System Organization
Computer System Organization
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Course 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsCourse 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded Systems
 
Kernel (OS)
Kernel (OS)Kernel (OS)
Kernel (OS)
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Superscalar Processor
Superscalar ProcessorSuperscalar Processor
Superscalar Processor
 
Mips 64
Mips 64Mips 64
Mips 64
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
INTERRUPTS
INTERRUPTS INTERRUPTS
INTERRUPTS
 
THE GENERATION OF COMPUTER
THE GENERATION OF COMPUTERTHE GENERATION OF COMPUTER
THE GENERATION OF COMPUTER
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed Computing
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3
 
Advanced computer architecture
Advanced computer architectureAdvanced computer architecture
Advanced computer architecture
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Introduction to Computing Lecture 01 history of computers
Introduction to Computing Lecture 01 history of computersIntroduction to Computing Lecture 01 history of computers
Introduction to Computing Lecture 01 history of computers
 

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
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 
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
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
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
 

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

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 

Recently uploaded (20)

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
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
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 

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