contents: 0-1. CA Intro
Measuring CPU performance
- Clock period: the duration of a clock cycle
- How long the computer takes to perform a single basic operation
- Clock rate (frequency): cyclespersecond=clockperiod1
- How many basic operations can be performed in a second
CPUtime=Clockcycles×Clockperiod=Clockcycles×Clockrate1
What is CPI?
Clock Cycles per instruction
: Average number of clock cycles per instruction for a program or program fragment
CPUtime=Clockcycles×Clockrate1=Instructioncount×CPI×Clockrate1
CPI can be affected by
- Cost for each instruction type: CPIi
- The frequency of each type of instructions: Fi=InstructioncountInstructioncounti
CPI=i=1∑nCPIi×Fi
More about
Benchmark
: a tool for measuring the performance of computers
Performance=n∏i=1nExecutiontimeratioi1=n∏i=1nExecutiontimeREF,iExecutiontimeX,i1 =n∏i=1nExecutiontimeX,iExecutiontimeREF,i
Amdahl's law
Executiontimeafterimprovement
=AmountofimprovementExecutiontimeaffectedbyimprovement+Executiontimeunaffected