Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Computer Architecture Consider two processors P1 and P2 of the same instruction

ID: 3883126 • Letter: C

Question

Computer Architecture

Consider two processors P1 and P2 of the same instruction set architecture. The instructions can be divided into four classes according to their CPI (class A, B, C, and D). And, their clock rate and CPI are like below: Assume that a program has total of 10^6 instructions, which are divided into classes as follows: 20% of A instructions, 10% B. 30% C. and 40% D. a. What is the average CPI of each processor? b Which processor is faster in the total execution time by how much?

Explanation / Answer

For processor P1:

The clock rate(R) = 2GHz

Instruction count(I)= 106

The average clock per Instruction (CPI) = 1*20/100 + 3*10/100 + 2*30/100 + 3*40/100 = 1*0.2 + 3*0.1 + 2*0.3 + 3*0.4 = 0.2+0.3+0.6+1.2 = 2.3

So, execution time = (1/R)*I*CPI= =(1/2) * 10-9 * 106 * 2.3 sec = 0.5* 10-9 *106 * 2.3 sec.= 1.15 * 10-3 sec

For processor P2:

The clock rate(R) = 2.5 GHz

Instruction count(I)=106

The average clock per Instruction (CPI) = 1*20/100 + 2*10/100 + 3*30/100 + 3*40/100 = 1*0.2 + 2*0.1 + 3*0.3 + 3*0.4 = 0.2+0.2+0.9+1.2 = 2.5

So, execution time = (1/R)*I*CPI= =(1/2.5) * 10-9 * 106 * 2.5 sec = 0.4* 10-9 *106 * 2.5 sec.= 10-3 sec

a) The average CPI for Processor P1 is 2.3 and The average CPI for Processor P2 is 2.5

b) For processor P1 execution time is 1.15 * 10-3 sec and for processor P2 execution time is 10-3 sec.

So, it is clear that processor P2 is faster, because it takes less time to execute same number of instructions than the other one.

Speed up = 1.15 * 10-3 /10-3 =1.15 or 15 % faster

So, the processor P2 is 15% faster than processor P1.

/*If this helps you, please let me know by giving a positive thumbs up. In case you have any queries, do let me know. I will revert back to you. Thank you!!*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote