CDA3101 F13 Exam1 ANSWERKEY
CDA3101 F13 Exam1 ANSWERKEY
CDA3101 F13 Exam1 ANSWERKEY
I have not looked at anyone else’s paper, and I have not obtained unauthorized help in
completing this exam. Also, I have adhered to and upheld all standards of honesty as
stated in the University Honesty Policy and in the course syllabus.
SCORES: TOTAL EXAM SCORE: ____ / 120 pts This part for Instructor & TAs only.
Q1: ____ Q2: ____ Q3: ____ Q4: ____ Q5: ____ EC-1: ____ EC-2: ____
This exam has six regular questions and one extra-credit question. Complete the questions
that are easiest for you first, then complete what you can of the difficult questions. There is
no penalty for guessing. However, on questions involving calculation, you must show your
work. If you do not show your work, you risk getting only partial credit for any answer.
Q1. (25 pts) Define the following terms using 1-3 sentences or a formula (5 pts each):
(b) Datapath
Part of a computer that does the work of arithmetic and logic calculations and performs
other instructions including but not limited to I/O and branching.
(c) Benchmark
In computing, a benchmark is the act of running a computer program, a set of programs,
or other operations, in order to assess the relative performance of an object, normally by
running a number of standard tests and trials against it. The term 'benchmark' is also
mostly utilized for the purposes of elaborately-designed benchmarking programs
themselves. [Source: http://en.wikipedia.org/wiki/Benchmark_(computing) ]
Q2. (25 pts) Given the following parameters, answer each of the following two questions
for the program P1 on machine M1 (10 pts for 2.1, 15 pts for 2.2):
2.1) Calculate the execution time texe for P1 on M1 (show all work):
2.2) If M1 runs program P2 2.9 times faster than P1 with clock rate and CPI remaining
the same as in 2.1, above, then what variable in the performance equation changed,
and by how much? (Answer using analysis, and show all work to get full credit):
If CPI and clock rate are unchanged, then the remaining variable is IC.
For P2 to run 2.9 times faster, the runtime must be 1 / 2.9 ~ 0.345 that of P1.
This means that IC of P2 must be 0.345 times the IC of P1, so we have
IC(P2) ~ 0.345 IC(P1) = 0.345 26,395 ~ 9,102 instructions
Q3. (30 pts) Diagram and give an example of each of the following MIPS instruction
formats, then tell what each format is used for: (10 pts each)
Q4. (20 pts) A computer M2 has the following CPIs for instruction types A thru D, and a
program P3 has the following mix of instructions (Note: pct = percent):
M2: Type A CPIA = 1.7 Type B CPIB = 2.1 Type C CPIC = 2.7 Type D CPID = 2.4
P3: Type A = 22 pct Type B = 29 pct Type C = 17 pct Type D = remaining pct
4.2 (10 pts) Calculate the runtime of P3 on M2 if IC = 22,311 and clock rate is 3.3 GHz:
Q5. (20 pts) This question has two parts: 5.1 and 5.2. Explain in detail to get full credit.
5.1) What are the best benchmarks to use, and why? (10 pts)
The best benchmarks are the real programs you plan to run on a given computer.
Measuring the runtime of these programs will measure your actual workload.
452) What are SPEC CPU benchmarks about? Why was SPEC2000 CPU benchmark
suite retired? (5 pts each)
SPEC CPU2000 benchmark suite was retired because (a) it no longer was found to
represent the actual workload(s) on most machines after 2006, and (b) the SPEC
CPU2006 benchmark suite superseded CPU2000.
CDA 3101 Midterm Exam #1 Fall 2013
EC-1. (20 pts) Given a computer M4 with clock rate = 3.1 GHz and a hardware accelerator
that can make Type A instructions go 7 times faster, answer the following:
EC-1.1 (7 pts) If a program P4 has 29 pct Type A instructions and the remainder are
Type B instructions, and its IC = 35,450 – will the accelerator make P4 run at least 2
times faster on M4 than it would without an accelerator? SHOW ALL WORK
EC-1.2 (13 pts) Use Amdahl’s Law to determine how much faster the accelerator
needs to go to make P4 run 5.5 times faster on M4 (with accelerator) than it did without
an accelerator. SHOW ALL WORK
Suppose the accelerator was infinitely fast (as fast as it can go!!).
Then, 0.71 of the program would not be speeded up, so the limiting
speedup in this case would be
max = t / tA = 1 / 0.71 ~ 1.408 times < 5.5 times
This speedup cannot be achieved, for the same general reason as in EC-1.1.
EC-2. (10 pts) Give two examples from MIPS ISA of the design principle “SIMPLICITY
FAVORS REGULARITY” EXPLAIN IN DETAIL (5 pts each)
Example 1: MIPS has a regular instruction format (32 bits per instruction, 6-bit opcode
for all instructions, etc.) which makes decoding simpler (and faster).
Example 2: MIPS has 32-bit registers only, instead of the multiple register sizes in
CISC architectures like Intel x86. This makes hardware design simpler.