Presentation is loading. Please wait.

Presentation is loading. Please wait.

Performance Cycle time of a computer CPU speed speed = 1 / cycle time

Similar presentations


Presentation on theme: "Performance Cycle time of a computer CPU speed speed = 1 / cycle time"— Presentation transcript:

1 Performance Cycle time of a computer CPU speed speed = 1 / cycle time
The time between two consecutive clock “tics” measured in ms (milli seconds) CPU speed frequency of clock tics measured in MHz speed = 1 / cycle time Example: What is the cycle time of a 333 MHz processor? Given a program, can measure how many ms it takes to execute clock cycles it takes to execute We usually work with clock cycles, and, if required, convert it to actual time after all calculations have been done Suppose speed of the computer = S MHz (I.e. S clock cycles per second) execution time of a program = T msec number of clock cycles for that program = C clocks How are these quantities related ?

2 CPI - Cycles per instruction
CPI - The average number of cycles each instruction takes for a given program. Simple uniprocessor : > 1 (generally much more) Pipelined processor : > 1 (but closer to 1) Multiprocessor : can be less than 1 CPI = (number of cycles taken by the program) / (number of instructions) Example: A program takes 10 ms to complete 500 K instructions on a 100 MHz processor. What is the CPI of this machine on this program? Time to execute 500 K instruction = 10 ms = 0.01 sec One clock cycle = 1 / (100 * 10^6) seconds Therefore, cycles for 500 instructions = (0.01) * (100 * 10^6) = 10^6 Hence, CPI = 10^6 / (500 * 10^3) = 2

3 Amdahl’s Law Speeding up a given operation only increases overall speed in a manner proportional to how often that operation is used in programs. Execution time after improvement = (Execution time unaffected by improvement) + ( (Execution time affected by improvement) / (Amount of improvement) ) If I make DIV faster by a factor of 10, and it is used in 5% of all operations, how much faster will my machine run (on the average) ? If instead I speedup every instruction by 5%, how much faster will my machine run ?

4 Instruction Classes For performance evaluation, we classify instructions into various classes based on how many clock cycles it takes to execute them. Given frequencies of execution of various categories of instructions, can find the average CPI by taking a weighted sum. Remember: Take arithmetic mean to get average time Take harmonic mean to get average frequency


Download ppt "Performance Cycle time of a computer CPU speed speed = 1 / cycle time"

Similar presentations


Ads by Google