Cse - 321 - 2
Cse - 321 - 2
Cse - 321 - 2
Chapter - 2
X is faster than Y
Continuation
PerformanceX
= n
PerformanceY
PerformanceA
=n
PerformanceB
PerformanceA
PerformanceB =
n
CPU execution time / CPU time
Execution Time
CPU time
• Example:
• Unix time command –
• 90.7u 12.9s 2:39 65%
90.7 + 12.9
= 0.65
159
Continuation
• Clock cycle – Almost all computers are
constructed using a clock that determines
when events take place. These discrete time
intervals are called clock cycles (ticks / clock
ticks / clock periods / clocks / cycles).
CPI
Using the Performance Equation
• Sequence 1 executes 2 + 1 + 2 = 5
instructions.
• Sequence 2 executes 4 + 1 + 1 = 6
instructions.
• So sequence 2 executes most instructions.
Solution
• CPU clock cycles1 = (2×1) + (1×2) +
(2×3) = 2 + 2 + 6 = 10 cycles
Here,
CPU execution time , p1= (CPI * Instructions) / clock rate
= (1.25* 10^6)/ (4*10^9)
A measurement of program
execution speed based on the
number of millions of
instructions.
Limitations of MIPS:
Firstly, MIPS specifies the instruction execution rate but does not
specify the capabilities of the instructions.