1
\$\begingroup\$

I am learning computer architecture and organization. I have the following doubt. Given below is a question along with its solution but I think that the solution is wrong. You can see the question here question number 5.

Consider an instruction pipeline for the MIPS32 processor where data references constitute 42% of the instructions, and the ideal CPI ignoring memory structural hazards is 1.25. How much faster is the ideal machine without the memory structural hazard versus the machine with the hazard?

a. 1.34  
b. 1.26  
c. 1.38  
d. None of the above  

Correct answer is (a).  
Speedup = (Ideal CPI x Pipeline Depth) / (Ideal CPI + Stall cycles per instr)  
So, Speedupideal= 1.25 x Depth / (1.25 + 0) = Depth  
And, Speedupreal= 1.25 x Depth / (1.25 + 0.42 x 1) = 1.25 x Depth / 1.67  
Required answer = 1.67 / 1.25 = 1.34 (approx.)  

The solution calculates Speedupideal and Speedupreal and then it divides them. I don't understand how it gives the answer. I think the solution is wrong. Moreover, the solution says that the stall cycles per instruction are 0.42 * 1 which I think it got from the data references but I don't understand how it got stall cycles per instruction from data references.

As I am a beginner my concepts are not very clear so some help will be appreciated.

\$\endgroup\$
3
  • \$\begingroup\$ Why you think it's wrong, what's your version of answer? \$\endgroup\$
    – Mitu Raj
    Commented May 21, 2021 at 4:48
  • \$\begingroup\$ @MituRaj I am not saying it is wrong. I am saying I am unable to understand their solution. According to me only speedup should be calculated, Speedup= 1.25 x Depth / (1.25 + 0.42 x 1). Putting depth =5, we get 3.74. \$\endgroup\$ Commented May 21, 2021 at 5:11
  • \$\begingroup\$ You said "I think the solution is wrong". Then you should simply justify that in the question with your version (not in comments). You can edit your question to add that details. \$\endgroup\$
    – Mitu Raj
    Commented May 21, 2021 at 5:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.