1
\$\begingroup\$

I'm trying to solve a question concerning performance. I have the final answer (24 * 10^9)but I can't determine how to get there.

I know the formula for performance is

Execution time: CPI * I * 1/CR CPI = Cycles Per Instruction I = Instructions

Question: Determine the number of instructions for P2 that reduces its execution time to that of P3.

performance

The first step should be to find out the cycles per Instruction for P3. The equation would be:

  8 = 1 / (2.5) * CPI * 40      
  8 = 1/ 2.5 * CPI * 40
  8 = .4 * CPI * 40
  8 = 160 CPI
  1 =                80 / 16 

I know the answer here should be 0.008 CPI, but I don't understand how to get there. 2.5 * 40 would be 100, but it doesn't make mathematical sense to me. What am I missing? Thanks.

\$\endgroup\$
  • \$\begingroup\$ There is a calculation mistake. 0.4*40 = 16 and not 160. So CPI = 8/16=0.5. Otherwise every thing you did was correct. You have reconfirm the answer of 0.008 from other sources. You can always find some mistakes in books. \$\endgroup\$ – Damon Dec 7 '14 at 5:01
  • \$\begingroup\$ I'm sorry but I know that the answer ultimately is 24*10^9. I don't know how I could get there with 0.5 by plugging it into P2's equation for CPI. Please correct me if I'm wrong. \$\endgroup\$ – Carlo Dec 7 '14 at 16:41
1
\$\begingroup\$

Since the clock rate is fixed, the number of instructions needed for the "new" P2 is 8/10 * 30 x 10^9, or 24 x 10^9. That is, if you reduce the number of instructions to 80% of the original, the execution time drops to 80% as well.

Note that the question made no mention of cycles per instruction. It just asked how many instructions are needed to produce the desired execution time.

\$\endgroup\$
  • \$\begingroup\$ 8/10 * 30*10^9 would indeed give the 24*10^9 which I know is 100% correct, but I am really not sure if this is how the answer is to be calculated. I am not saying you are wrong and your solution might be easier but on the test we were supposed to calculate the CPI for P3 first then plug into P2, at least so I believe. Any hunch on if/how this could be achieved? \$\endgroup\$ – Carlo Dec 7 '14 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.