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=
![2.6*10^(6)](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/5a3ck1e4snbc8pyywdc8084mdfcgxzndo3.png)
For Processor P_2:
CPU CLOCK CYClE=
![2*10^(6)](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/3jun2gl4weiztu4vhfdc0irta7xrfdbi5b.png)
Step-by-step 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=
![\sum_(n=1)^(i)*CPI_i*C_i](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/9j0li09jvefrjgaqt919f4av8exjwc3dyj.png)
Where:
C_i is the instructions of each class (Calculated above)
For Processor P_1:
CPU CLOCK CYClE=
![(1*1*10^(5))+ (2*2*10^(5))+ (3*5*10^(5))+ (3*2*10^(5))](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/9rqbv5u4c21gizy7p65qiuc7p6p3yb3w61.png)
CPU CLOCK CYClE=
![2.6*10^(6)](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/5a3ck1e4snbc8pyywdc8084mdfcgxzndo3.png)
For Processor P_2:
CPU CLOCK CYClE=
![(2*1*10^(5))+ (2*2*10^(5))+ (2*5*10^(5))+ (2*2*10^(5))](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/xjrbtpxhz20ec24o2nf5o4c2tpnlwm563l.png)
CPU CLOCK CYClE=
![2*10^(6)](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/3jun2gl4weiztu4vhfdc0irta7xrfdbi5b.png)
Now:
CPU TIME=CPU CLOCK CYClE/CYCLE RATE
For Processor P_1:
CPU TIME=
![(2.6*10^(6) )/(2.5*GHz) =1.04ms](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/48snk61aijt7fnj65nhp931ilvmclft2ik.png)
For Processor P_2:
CPU TIME=
![(2*10^(6) )/(3*GHz) =666.67ms](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/xsg07re53jeb45vsvpu3m30k8gwjiac8s1.png)
Processor P_2 is faster than P_1.
Part A:
CPI=CPU CLOCK CYClE/Number of instructions
For Processor P_1:
CPI=
![(2.6*10^(6))/(1*10^(6))=2.6](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/842cpcnzj681wjmmz0cplicecwvqedg72m.png)
For Processor P_2:
CPI=
![(2*10^(6))/(1*10^(6))=2](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/g2gw8zz6iey29e7fwdf5ue6x4pxkdr8wib.png)
Part B:
For Processor P_1:
CPU CLOCK CYClE=
![(1*1*10^(5))+ (2*2*10^(5))+ (3*5*10^(5))+ (3*2*10^(5))](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/9rqbv5u4c21gizy7p65qiuc7p6p3yb3w61.png)
CPU CLOCK CYClE=
![2.6*10^(6)](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/5a3ck1e4snbc8pyywdc8084mdfcgxzndo3.png)
For Processor P_2:
CPU CLOCK CYClE=
![(2*1*10^(5))+ (2*2*10^(5))+ (2*5*10^(5))+ (2*2*10^(5))](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/xjrbtpxhz20ec24o2nf5o4c2tpnlwm563l.png)
CPU CLOCK CYClE=
![2*10^(6)](https://img.qammunity.org/2021/formulas/computers-and-technology/high-school/3jun2gl4weiztu4vhfdc0irta7xrfdbi5b.png)