Docsity

Computer Architecture Midterm Practice Problems - Spring 2006, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
EEL 4713/5764, Spring 2006 – Computer Architecture
Midterm #1 – Practice Problems
Out Sat., Feb. 4
The following example problems are representative of the general type and level of
difficult of problems you might see on the real miderm.
Problem 1. Performance metrics (CIO 1 aeo).
Suppose you are in a design scenario with a power budget of Pmax, a cost budget of Cmax,
and where you are building a high-performance parallel system out of processors that
each consume power Punit, have cost Cunit, and have a throughput of Tunit. You are trying
to decide whether to switch your system design over to use a different kind of processor
chip that consumes 60% as much power as one of the original chips, costs 50% more per
chip, and finishes a work unit in 80% of the time that is required on one of the original
processor chips. The overall system needs to be able to complete as many work units as
possible per unit of time. (For this problem, assume that the processors are equivalent in
respects other than the above, and that your application has enough parallel work units as
needed to keep any number of processors busy.)
In the following, show your calculations:
i) On your work units, how many times higher performance does an individual one of the
new processors have, compared to one of the old ones?
ii) The cost-performance of the new processors is ___% larger/smaller (circle one) than
the old ones?
iii) The power-performance of the new chips is ___ the power-performance of the old
ones?
iv) Identify the nature of the engineering problem you should be trying to solve in the
above scenario. What specific quantity should you really be trying to maximize here, and
within what constraints?
pf3
pf4
pf5

Partial preview of the text

Download Computer Architecture Midterm Practice Problems - Spring 2006 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

EEL 4713/5764, Spring 2006 – Computer Architecture

Midterm #1 – Practice Problems

Out Sat., Feb. 4

The following example problems are representative of the general type and level of

difficult of problems you might see on the real miderm.

Problem 1. Performance metrics (CIO 1 aeo).

Suppose you are in a design scenario with a power budget of P max , a cost budget of C max

and where you are building a high-performance parallel system out of processors that

each consume power P unit , have cost C unit , and have a throughput of T unit

. You are trying

to decide whether to switch your system design over to use a different kind of processor

chip that consumes 60% as much power as one of the original chips, costs 50% more per

chip, and finishes a work unit in 80% of the time that is required on one of the original

processor chips. The overall system needs to be able to complete as many work units as

possible per unit of time. (For this problem, assume that the processors are equivalent in

respects other than the above, and that your application has enough parallel work units as

needed to keep any number of processors busy.)

In the following, show your calculations:

i) On your work units, how many times higher performance does an individual one of the

new processors have, compared to one of the old ones?

ii) The cost-performance of the new processors is ___% larger/smaller (circle one) than

the old ones?

iii) The power-performance of the new chips is ___ the power-performance of the old

ones?

iv) Identify the nature of the engineering problem you should be trying to solve in the

above scenario. What specific quantity should you really be trying to maximize here, and

within what constraints?

v) Formulate a mathematical expression (inequality) describing the precise conditions

under which you ought to switch to the new processor, in terms of the variables and

constants given above.

vi) Solve the problem. Supposing that your power budget is 1 kW, your cost budget is

$100,000, and the original processors each consumed 100W and cost $2,000, should you

make the switch to the new processors, or not? Show your calculations, and explain.

Problem #3. C  Assembly (CIO 3 aco)

The following C language function computes the integer square root, that is, given an

integer n ≥ 0, it returns the value r of the largest integer that is less than or equal to the

square root of n , or, in symbols,

r n

Design a correct implementation of this function in MIPS assembly language; that is,

hand-compile this C code to equivalent MIPS assembly. Use standard MIPS calling

conventions, except don’t worry about the frame pointer. Assume that an int is 32 bits.

Don’t worry about whether this particular algorithm does anything sensible when the

argument is negative (it doesn’t). It’s also not very efficient, but it works.

int sqrt(int n){ /* Find integer square root of n*/

int r=0; /* First trial square root = 0 */

while (rr <= n) / While it’s not too big, */

r++; /* keep making it bigger. */

return r-1; /* Too big, return previous. */

Please write neatly, comment your code, and draw a neat table showing any

correspondences that you may have set up between MIPS registers and C code variables.