sample-midtermfa16

# sample-midtermfa16 - Sample Questions for Midterm Exam 1...

This preview shows pages 1–3. Sign up to view the full content.

Sample Questions for Midterm Exam 1. For a typical workload, the percentages of three groups of instructions and their average CPI are given in the following table. Instruction Percentage CPI Integer 50 1 Load/Store 30 3 Floating-point 20 10 There are two possible ways to make performance improvement. First, an enhanced compiler can reduce the floating-point instructions to ½ of the original floating-point instructions with the cost of increasing the integer instructions by 30% of the original integer instructions. Second, a new pipeline technique can reduce the average CPI of the floating-point instruction from 10 to 5 without increasing the clock cycle time. Compare the performance improvement of the two solutions. Calculate which solution is better and by how much. Answer: First enhancement: Percentage Adjusted % CPI Integer 50*(1+30%)=65 65/105=61.9 1 Load/Store 30 30/105=28.6 3 Floating P 20*1/2 = 10 10/105=9.5 10 CPI = 61.9%*1 + 28.6%*3 + 9.5%*10 = 2.427 Second enhancement: (better) CPI = 50%*1 +30%*3 + 20%*5 = 2.4 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. The execution cycles for various instructions are given in the following table. All units are
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern