retagged by
5,757 views
31 votes
31 votes

The floating point unit of a processor using a design $D$ takes $2t$ cycles compared to $t$ cycles taken by the fixed point unit. There are two more design suggestions $D_1$ and $D_2$. $D_1$ uses $30\%$ more cycles for fixed point unit but $30\%$ less cycles for floating point unit as compared to design $D$. $D_2$ uses $40\%$ less cycles for fixed point unit but $10\%$ more cycles for floating point unit as compared to design $D$. For a given program which has $80\%$ fixed point operations and $20\%$ floating point operations, which of the following ordering reflects the relative performances of three designs?
($D_i > D_j$ denotes that $D_i$ is faster than $D_j$)

  1. $D_1 > D > D_2$
  2. $D_2 > D > D_1$
  3. $D > D_2 > D_1$
  4. $D > D_1 > D_2$
retagged by

2 Answers

Best answer
53 votes
53 votes

(B) is correct.
 

$T = 0.8 \times \text{time taken in fixed point} + 0.2 \times \text{time taken in floating point}$

$D = 0.8 \times t + 0.2 \times 2t = 1.2t$

$D_1 = 0.8\times 1.3 t + 0.2 \times 0.7 \times 2t = 1.04 t + .28t = 1.32t$

$D_2 = 0.8 \times 0.6 t + 0.2 \times 1.1 \times 2t = 0.48t + .44t = 0.92t$
 

So, $D_2$ is the best design for this given program followed by $D$ and then $D_1$. Option B.

edited by
12 votes
12 votes

Suppose t=1ns, there are total 100 operations, 80 fixed point operations and 20 floating point operations,
Time taken by design D = 80*1ns + 20*2ns = 80+40 =$120 ns$
Time taken by design D1 = 1.3*80 + 0.7*40 = 104 + 28 = $132 ns$
Time taken by design D2 = 0.6*80 + 1.1*40 = 48 + 44 = $92 ns$

Now, we can see that D2 is fastest, D is faster than D1.
Hence (B) is correct option D2 > D > D1

Answer:

Related questions

56 votes
56 votes
5 answers
1