SEN307 Lecture 8
SEN307 Lecture 8
On the other hand, a laboratory engineer measure its performance of his system by the throughput.
.
CPU Clock Cycle as …………………..>> CC
Clock Frequency as ………………….>> f
Cycle Time as …………………………..>> CT
• F = 1/CT
• Computer Performance = 1/Execution Time
• CC = instruction * CPI
• = CPU Time * Clockrate
Solution
CPIA = CPI =(σ𝑛𝑘=𝑖 𝐶𝑃𝐼 ∗ 𝐼𝐴)/(𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝑐𝑜𝑢𝑛𝑡)
= (38*1 + 15*3 + 42*4 + 5*5)/100
= (38 + 45 + 168 + 25)/100
= 276/100
= 2.76
.
= (35 + 60 + 45 + 100)/100
= 240/100
= 2.4
.
Branch 2 4
Other 4 3
MACHINE B
ALU 10 1
Load & Store 8 2
Branch 2 4
Other 4 3
Calculate the overall CPI for A and B and their MIPS and CPU Time respectively
.
MIPSA = clock rate/(CPI) *106
= (200 *106)/(2.2 *106)
= 90.9
.
MIPSB = clock rate/(CPI) *106
= (200 *106)/(1.92 *106)
= 104.2
Solution
.
Let’s first find the number of clock cycle required for the program A
.
What clock rate should we have to get this time reduction.
Solution
Performance = 1/execution time
= 1/CC/Clock rate
= clock rate/(Instruction * CPI)
A) Processor 1:
Performance = clock rate/(Instruction * CPI)
= (3*109)/1.5 = 2*109 = 2GHZ
Example 5 cont..
Processor 2:
Performance = clock rate/(Instruction * CPI)
= (2.5*109)/1 = 2.5*109 = 2.5GHZ
Processor 3:
Performance = clock rate/(Instruction * CPI)
= (4*109)/2.2 = 1.8*109 = 1.8GHZ
.
Therefore, processor 2 has the highest performance
(B)
P1:CPU Time = Clock cycle/clock rate
CC = CPU Time * Clock rate
= 10 * 3*109 = 30*109
CC = Instruction *CPI
Instruction = CC/CPI
Instruction = (30*109)/1.5 = 20*109
Example 5 cont..
P2:CPU Time = Clock cycle/clock rate
CC = CPU Time * Clock rate
= 10 * 2.5*109 = 25*109
CC = Instruction *CPI
Instruction = CC/CPI
Instruction = (25*109)/1 = 25*109
.
P3:CPU Time = Clock cycle/clock rate
CC = CPU Time * Clock rate
= 10 * 4*109 = 40*109
CC = Instruction *CPI
Instruction = CC/CPI
Instruction = (40*109)/2.2 = 18.18*109
Example 5 cont..
(C)
P1:CPInew = CPIold * 1.2
= 1.5 *1.2
= 1.8
clock rate = ((20*109) * 1.8)/7
= 5.14GHZ
.
P2:CPInew = CPIold * 1.2
= 1 *1.2
= 1.2
clock rate = ((25*109) * 1.2)/7
= 4.29GHZ
Solution
Lets first find the CPU Time for machine A
CPUA = Clock Cycle/Clock rate
.
50s = CC/500*106
CC = 50 * 500*106
= 25*109
Lets get the clock rate of machine B
CPUB = Clock Cycle/Clock rate
20s = 2.5*(25*109)/clock rate
Clock rate = 2.5 *(25*109)/20
= (62.5*109)/20
= 3.125 *109
= 312.5*106
Example 7
Consider having a program that runs in 50s on Computer A, which has a 500MHZ clock, we would
like to run the same program on another machine B in 20s. If machine B requires 2.5times as many
clock