CDA3101Exam2Soln

# CDA3101Exam2Soln - CDA 3101 Exam 2(Fall 2006 Time 1 hr 40...

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

1 CDA 3101 Exam 2 (Fall 2006) Last Name ____________________ Time: 1 hr. 40 mins. First Name ____________________ Honor Code Statement On my honor, I have neither given nor received unauthorized aid on this exam. _______________________ ________________________ Signature UFID Show all your work to get partial credit. 1. (20 points) a. Suppose a program (running on a MIPS processor) has the following distribution of instruction types. 0% Floating point CPI = 3 30% Integer CPI = 1 30% Load CPI = 10 10% Store CPI = 5 30% Branches CPI = 4 What is the effective CPI for this program? If the program is 100 million instructions, and was run on a 500 MHz computer, how many seconds would it take this program to run? Effective CPI = 3 (0%) + 1 (30%) + 10 (30%) + 5 (10%) + 4 (30%) = 0 + 0.3 + 3 + 0.5 + 1.2 = 5 CPU Time = 10 8 * 5 * (2 x 10 -9 sec/cycle) = 1 second b. Refer to the distribution given in part (a). Suppose a team of engineers has two plans. Plan A lowers the CPI of the loads to 3 and the CPI of stores to 1, but as a result, they must lower the clock speed even further from 500 MHz to 200 MHz (while keeping the distribution and the number of instructions the same as in part (a) ). Plan B handles branches differently and lowers their CPI down to 1, but unfortunately happens to increase the number of instructions to 120 million (while keeping the distribution and the clock speed the same as in part (a) ). Which (if either) of these two plans will yield a performance increase for the program in part (a)? Plan A: New Effective CPI = 2.5. New CCT = (5 x 10 -9 sec/cycle). New CPU time = 1.25 seconds (BAD) Plan B: New effective CPI = 4.1. New CPU time = 1.2 x 10 8 * 4.1 * 2 x 10 -9 = 0.984 seconds. (GOOD). So plan B will yield a small performance increase!

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

View Full Document
2 2. (32 points) Using the single-cycle datapath figure given as part of Q. 3, simulate sw \$t0, 24(\$t1) (which occurs at address 0x00400020 and has a hex encoding of
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

CDA3101Exam2Soln - CDA 3101 Exam 2(Fall 2006 Time 1 hr 40...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online