Suppose a program consists of 20% floating point multiply instructions, 20% floa
ID: 3589885 • Letter: S
Question
Suppose a program consists of 20% floating point multiply instructions, 20% floating point divide instructions, and the remaining 60% are other instructions. Floating point division instructions take 6 times as many clock cycles as do floating point multiplication instructions, and floating point multiplication instructions take 4 times as many clock cycles as each of the non-floating point instructions.
a) [15 points] Suppose the execution of floating point multiplication instructions is made 8/5 times faster, without changing the execution speed for any other instructions. Use Amdahl's Law to determine what speedup would be achieved for that program? Round your answer to the nearest one-thousandth.
b) [15 points] Suppose the execution of floating point multiplication instructions is made 8/5 faster, and the execution of floating point division instructions is made 3/2 faster. Use Amdahl's Law to determine what speedup would be achieved for that program? Round your answer to the nearest one-thousandth.
Explanation / Answer
Amdahl's law
Execution time after improvement = (Execution time affected by improvement)/(Amount of Improvement) + Execution time unaffected
a)
Floating point multiplication cycles before improvement = 4T
Floating point divison cycles before improvement = 24 T
Floating point multiplication cycles after improvement = 4T/1.6 = 2.5T
Floating point division cycle after imporvement = 6*2.5T = 15 T
where T is cycles taken for non floating point instruction
Overall speed up in floating point division = 24T/15T = 1.6
Execution time after improvement = 20/1.6 + 20/1.6 + 60 =85
Overall speed up = (100-85)/100 *100 = 15%
b)
Floating point division cycle after doing improvement in floating point division instruciton = 15T/1.5 = 10 T
Overall speed up in floating point division instruciton = 24T / 10 T = 2.4
Execution time after improvement = 20/1.6 + 20/2.4 + 60 = 80.833
Overall speed up = 19.17%
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.