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

Cpu performance matrix
Cpu performance matrixCpu performance matrix
Cpu performance matrixRehman baig
 
1 Computer Architecture
1 Computer Architecture1 Computer Architecture
1 Computer Architecturefika sweety
 
Instruction set and instruction execution cycle
Instruction set and instruction execution cycleInstruction set and instruction execution cycle
Instruction set and instruction execution cycleMkaur01
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel systemManish Singh
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESpriyasoundar
 
Unit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureUnit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureBalaji Vignesh
 
Generation of computer
Generation of computerGeneration of computer
Generation of computerMohit Saini
 
1.Basic Structure of Computer System.ppt
1.Basic Structure of Computer System.ppt1.Basic Structure of Computer System.ppt
1.Basic Structure of Computer System.pptJEEVANANTHAMG6
 
Coa module1
Coa module1Coa module1
Coa module1cs19club
 
Generation of computers
Generation of computersGeneration of computers
Generation of computerscpjcollege
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unitchidabdu
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMKamran Ashraf
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
Fundamentals of operating system
Fundamentals of operating systemFundamentals of operating system
Fundamentals of operating systemJayesh Chauhan
 

What's hot (20)

Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Cpu performance matrix
Cpu performance matrixCpu performance matrix
Cpu performance matrix
 
1 Computer Architecture
1 Computer Architecture1 Computer Architecture
1 Computer Architecture
 
Instruction set and instruction execution cycle
Instruction set and instruction execution cycleInstruction set and instruction execution cycle
Instruction set and instruction execution cycle
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
 
AI - Fuzzy Logic Systems
AI - Fuzzy Logic SystemsAI - Fuzzy Logic Systems
AI - Fuzzy Logic Systems
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Unit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureUnit 5 Advanced Computer Architecture
Unit 5 Advanced Computer Architecture
 
Generation of computer
Generation of computerGeneration of computer
Generation of computer
 
1.Basic Structure of Computer System.ppt
1.Basic Structure of Computer System.ppt1.Basic Structure of Computer System.ppt
1.Basic Structure of Computer System.ppt
 
Coa module1
Coa module1Coa module1
Coa module1
 
Generation of computers
Generation of computersGeneration of computers
Generation of computers
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISM
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 
Fundamentals of operating system
Fundamentals of operating systemFundamentals of operating system
Fundamentals of operating system
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 

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
 
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)
 
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
 
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

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
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
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
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
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
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
 

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