Cpu performance using different parameters
This presentation is the property of its rightful owner.
Sponsored Links
1 / 16

CPU Performance using Different Parameters PowerPoint PPT Presentation


  • 57 Views
  • Uploaded on
  • Presentation posted in: General

CPU Performance using Different Parameters. CS 250: Andrei D. Coronel, MS,CEH,PhD Cand. CPU time. CPU time = CPU clock cycles for a program X Clock cycle time = CPU clock cycles for a program Clock rate. CPI (Cycles per Instruction). Cycles per Instruction

Download Presentation

CPU Performance using Different Parameters

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Cpu performance using different parameters

CPU Performance using Different Parameters

CS 250: Andrei D. Coronel, MS,CEH,PhD Cand


Cpu time

CPU time

CPU time

= CPU clock cycles for a program X Clock cycle time

= CPU clock cycles for a program

Clock rate


Cpi cycles per instruction

CPI (Cycles per Instruction)

Cycles per Instruction

= CPU clock cycles for a program

Instruction count

Therefore:

CPU clock cycles for a program

= CPI * IC


Replace clock cycles for a program with cpi ic

Replace “clock cycles for a program” with (CPI*IC)

CPU time

= CPU clock cycles for a program X Clock cycle time

= CPU clock cycles for a program

Clock rate

= (CPI * IC) * Clock cycle time

= (CPI * IC)

Clock rate


Cpu performance is dependent on 3 factors

CPU performance is dependent on 3 factors

  • Clock cycle time

  • Cycles per Instruction (CPI)

  • Instructions per program

    • It is difficult to change one parameter in complete isolation from others because the basic technologies involved in changing each characteristic are also interdependent


Cpu performance is dependent on 3 factors1

CPU performance is dependent on 3 factors

  • Clock cycle time

    • Hardware technology and organization

  • Cycles per Instruction (CPI)

    • Organization and Instruction Set architecture

  • Instructions per program

    • Instruction set architecture and compiler technology


Another look at cpi ic

Another look at CPI * IC

  • CPU clock cycles = CPI * IC

  • Actual number of cycles per instruction multiplied by the actual number of that instruction in a program

  • However there may be more than one type of instruction


This is better

This is better

CPU clock cycles

= Σ CPIi * ICi

Where i = 1 to n


Formula adjustment

Formula adjustment

CPU time

= (Σ CPIi * ICi ) * clock cycle time


Overall cpi therefore

Overall CPI therefore…

CPI

= (Σ CPIi * ICi )

IC


Overall cpi therefore1

Overall CPI therefore…

CPI

= (Σ CPIi * ICi )

IC

= Σ CPIi * (ICi )

IC


A familiar problem

A familiar problem

  • FPSQR (floating pt sq root) is responsible for 20% of the exec time of a machine

  • FP instructions are responsible for 50% of the execution time

  • Which is faster?

    • Add FPSQR hardware that can speed up this operation by 10

    • Make all FP instructions twice faster


Option a

Option A

  • Fractionenhanced = 20%

  • Speedupenhanced = 10

    SpeedupFPSQR

    = 1

    (1 – 0.2) + 0.2/10)

    = 1.25


Option b

Option B

  • Fractionenhanced = 50%

  • Speedupenhanced = 2

    SpeedupFPSQR

    = 1

    (1 – 0.5) + 0.5/2)

    = 1.33


Problem

Problem

  • Suppose we have made the following measurement:

    • Frequency of all FP operation = 25%

    • Average CPI of FP operations excluding FPSQR = 4.0

    • Average CPI of all other (non-FP) instructions = 1.33

    • Frequency of FPSQR = 3%

    • CPI of FPSQR = 20

  • Assume that the two design alternatives are to reduce the CPI of FPSQR to two, or to reduce the CPI of all FP operations to 2


Answer

Answer

  • CPI original = 1.33 * (1 - 0.25) + 4 * (0.25 - 0.03) + 20 * (0.03)

  • = 2.4775

  • CPI new FPSQR = 1.33 * (1 - 0.25) + 4 * (0.22) + 2 * (0.03)

    = 1.9375

  • CPI new FP = 1.33 * (1- 0.25) + 2 * (0.22) + 2 * (0.03)

    = 1.4975

  • Speedup = 2.4775 / 1.4975


  • Login