0% found this document useful (0 votes)
17 views3 pages

CPU Performance Metrics

The document discusses CPU performance metrics, emphasizing the relationship between execution time and performance, where performance is inversely related to execution time. It explains how to calculate CPU execution time using clock cycles and clock cycle time, and introduces the concept of Cycles Per Instruction (CPI) as a factor affecting performance. The document concludes by outlining the three key factors that influence CPU execution time: instruction count, clock cycle time, and CPI.

Uploaded by

preetikaanjana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

CPU Performance Metrics

The document discusses CPU performance metrics, emphasizing the relationship between execution time and performance, where performance is inversely related to execution time. It explains how to calculate CPU execution time using clock cycles and clock cycle time, and introduces the concept of Cycles Per Instruction (CPI) as a factor affecting performance. The document concludes by outlining the three key factors that influence CPU execution time: instruction count, clock cycle time, and CPI.

Uploaded by

preetikaanjana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CPU Performance Metrics

If we have to maximize performance, we obviously need to minimize our execution time.


Performance is inversely related to execution time.

Performance = 1/ Execution time

If a processor X is n times faster than Y, then,

Decreasing response time almost always improves throughput.

As an example, If computer A runs a program in 10 seconds and computer B runs the same program
in 20 seconds, how much faster is A than B?

Speedup of A over B = 20 /10 = 2, indicating A is two times faster than B.

Execution time is the time the CPU spends working on the task, it does not include the time waiting
for I/O or running other programs.

To determine the CPU execution time for a program, you can find out the total number of clock
cycles that the program takes and multiply it by the clock cycle time.
Since the CPU execution time is a product of these two factors, you can improve performance by
either reducing the length of the clock cycle time or by the number of clock cycles required for a
program.

Example:

A program runs on computer A with a 2 GHz clock in 10 seconds. What clock rate must a computer B
run at to run this program in 6 seconds? Unfortunately, to accomplish this, computer B will require
1.2 times as many clock cycles as computer A to run the program.

CPI: A single machine instruction may take one or more CPU cycles to complete termed as the Cycles
Per Instruction (CPI). Average (or effective) CPI of a program: The average CPI of all instructions
executed in the program on a given CPU design.

Example: Computers A and B implement the same ISA. Computer A has a clock cycle time of 250 ps
and an effective CPI of 2.0 for some program and computer B has a clock cycle time of 500 ps and an
effective CPI of 1.2 for the same program. Which computer is faster and by how much?

Each computer executes the same number of instructions, I, so

We can now write the basic performance equation as:


These equations separate the three key factors that affect performance

• Can measure the CPU execution time by running the program

• The clock rate is usually given

• Can measure overall instruction count by using profilers/ simulators without knowing all of
the implementation details

• CPI varies by instruction type and ISA implementation for which we must know the
implementation details

To conclude, if you look at the aspects of the CPU execution time, you have three factors which
affect the CPU execution time – the
clock cycle time, the average number of
clock cycles per instruction which is your CPI value and the instruction count.

1. Instruction count is affected by different factors – depends on the way


the program is written.
2. Clock cycle time depends upon the CPU organization and also depends
upon the technology that is used.
3. CPI, which is the average number of clock cycles per instruction,
depends upon the program used because you may use complicated
instructions which have a number of elementary operations or simple
instructions.

You might also like