Respuesta :
Answer:
Processor P_2 is faster than P_1.
Part A:
For Processor P_1:
CPI=2.6
For Processor P_2:
CPI=2
Part B:
For Processor P_1:
CPU CLOCK CYClE=[tex]2.6*10^{6}[/tex]
For Processor P_2:
CPU CLOCK CYClE=[tex]2*10^{6}[/tex]
Explanation:
We will find the instructions executed of each class:
For Class A=1*10^{6} *10%=1*10^{5}
For Class B=1*10^{6} *20%=2*10^{5}
For Class C=1*10^{6} *50%=5*10^{5}
For Class D=1*10^{6} *20%=2*10^{5}
CPU CLOCK CYClE=[tex]\sum_{n=1}^{i}*CPI_i*C_i[/tex]
Where:
C_i is the instructions of each class (Calculated above)
For Processor P_1:
CPU CLOCK CYClE=[tex](1*1*10^{5})+ (2*2*10^{5})+ (3*5*10^{5})+ (3*2*10^{5})[/tex]
CPU CLOCK CYClE=[tex]2.6*10^{6}[/tex]
For Processor P_2:
CPU CLOCK CYClE=[tex](2*1*10^{5})+ (2*2*10^{5})+ (2*5*10^{5})+ (2*2*10^{5})[/tex]
CPU CLOCK CYClE=[tex]2*10^{6}[/tex]
Now:
CPU TIME=CPU CLOCK CYClE/CYCLE RATE
For Processor P_1:
CPU TIME=[tex]\frac{2.6*10^{6} }{2.5*GHz} =1.04ms[/tex]
For Processor P_2:
CPU TIME=[tex]\frac{2*10^{6} }{3*GHz} =666.67ms[/tex]
Processor P_2 is faster than P_1.
Part A:
CPI=CPU CLOCK CYClE/Number of instructions
For Processor P_1:
CPI=[tex]\frac{2.6*10^{6}}{1*10^{6}}=2.6[/tex]
For Processor P_2:
CPI=[tex]\frac{2*10^{6}}{1*10^{6}}=2[/tex]
Part B:
For Processor P_1:
CPU CLOCK CYClE=[tex](1*1*10^{5})+ (2*2*10^{5})+ (3*5*10^{5})+ (3*2*10^{5})[/tex]
CPU CLOCK CYClE=[tex]2.6*10^{6}[/tex]
For Processor P_2:
CPU CLOCK CYClE=[tex](2*1*10^{5})+ (2*2*10^{5})+ (2*5*10^{5})+ (2*2*10^{5})[/tex]
CPU CLOCK CYClE=[tex]2*10^{6}[/tex]