1 / 16

CPU Performance using Different Parameters

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

dasan
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPU Performance using Different Parameters CS 250: Andrei D. Coronel, MS,CEH,PhD Cand

  2. CPU time CPU time = CPU clock cycles for a program X Clock cycle time = CPU clock cycles for a program Clock rate

  3. CPI (Cycles per Instruction) Cycles per Instruction = CPU clock cycles for a program Instruction count Therefore: CPU clock cycles for a program = CPI * IC

  4. 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

  5. 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

  6. 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

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

  8. This is better CPU clock cycles = Σ CPIi * ICi Where i = 1 to n

  9. Formula adjustment CPU time = (Σ CPIi * ICi ) * clock cycle time

  10. Overall CPI therefore… CPI = (Σ CPIi * ICi ) IC

  11. Overall CPI therefore… CPI = (Σ CPIi * ICi ) IC = Σ CPIi * (ICi ) IC

  12. 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

  13. Option A • Fractionenhanced = 20% • Speedupenhanced = 10 SpeedupFPSQR = 1 (1 – 0.2) + 0.2/10) = 1.25

  14. Option B • Fractionenhanced = 50% • Speedupenhanced = 2 SpeedupFPSQR = 1 (1 – 0.5) + 0.5/2) = 1.33

  15. 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

  16. 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

More Related