0% found this document useful (0 votes)
30 views3 pages

HW1 Sol

The document presents solutions to a homework assignment for an advanced computer architecture course, covering various calculations related to computer performance, die cost estimation, and Amdahl's Law. It includes detailed answers for four questions, each with sub-parts addressing specific computational problems. Key findings include execution time comparisons between two computers and the implications of vectorization on speedup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

HW1 Sol

The document presents solutions to a homework assignment for an advanced computer architecture course, covering various calculations related to computer performance, die cost estimation, and Amdahl's Law. It includes detailed answers for four questions, each with sub-parts addressing specific computational problems. Key findings include execution time comparisons between two computers and the implications of vectorization on speedup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Homework 1 - Solution

(EE275: Advanced Computer Architecture)

Due Date: 9/8


Answer 1: (25 points)
a) (8 points) 35/10000 x 3333 = 11.67 days
b) (8 points) There are several correct answers. One would be that, with the current system,
one computer fails approximately every 5 minutes. 5 minutes is unlikely to be enough
time to isolate the computer, swap it out, and get the computer back on line again. 10
minutes, however, is much more likely. In any case, it would greatly extend the amount
of time before 1/3 of the computers have failed at once. Because the cost of downtime is
so huge, being able to extend this is very valuable.
c) (9 points) $90,000 = (x + x + x + 2x)/4
$360,000 = 5x
$72,000 = x
4th quarter = $144,000/hr

Answer 2: (25 points)


Based on given facts, we first need to find out the number of dies per wafer by
(6 points) DiePerWafer = π x (WaferDiameter / 2)2 / DieArea − π x WaferDiameter / (2 x
DieArea)1/2
= 3.14 x (30 / 2)2 / 1.5 x 1.5 − 3.14 x 30 / (2 x 1.5 x1.5)1/2
≈ 270
Since we could ignore bad wafers, the wafer yield is 100%. So, the die yield is
(6 points) DieYield = WaferYield x 1/(1+ DefectsPerUnitArea x DieArea)N
= 100% x 1/(1+0.04x1.5x1.5)12
≈ 0.36
Now, we could estimate the die cost as
(7 points) DieCost = WaferCost / (DiesPerWafer x DieYield)
= 6000 /(270 x 0.36)
≈ 61.73
(6 points) If we want to make a profit of 40% of costs, the selling price should cover both the cost
and the
profit, which is $61.73 x (1 + 40%) ≈ $86.42.
Answer 3: (25 points)
a) (8 points) In order to compute the average CPI, all given instruction types need to be
considered as
AverageCPIA = CPUClockCyclesA / InstructionCountA
= (1 x 6 + 4 x12 + 2 x14 + 5 x 9 + 2 x15) x109 / (6 +12 +14 + 9 +15) x109
≈ 2.80
AverageCPIB = CPUClockCyclesB / InstructionCountB
= (2 x 8 + 1 x10 + 4 x13+ 3x14 + 4 x18) x109 / (8 +10 +13+14 +18) x109
≈ 3.05
b) (8 points) The total execution time for computer A is
ExecutionTimeA = ClockCyclesA / ClockRateA
= (1 x 6 + 4 x12 + 2 x 14 + 5 x 9 + 2 x15) x 109 / (3 x 109)
≈ 52.33s
For computer B, it is
ExecutionTimeB = ClockCyclesB / ClockRateB
= (2 x 8 +1 x 10 + 4 x 13+ 3 x 14 + 4 x18) x109 / (2.7 x 109)
≈ 71.11s
c) (9 points) In this question, we only consider the mixed instruction types with given
percentages to
calculate the execution time for both computer A and B.
ExecutionTimeA = InstructionCounts x AverageCPIA / ClockRateA
= (50% x 4 + 30% x 5 + 20% x 2) / (3 x 109) x InstructionCounts
= 1.3 x 10−9 x InstructionCounts
ExecutionTimeB = InstructionCounts x AverageCPIB / ClockRateB
= (50% x 1+ 30% x 3+ 20% x 4) / (2.7 x109 ) x InstructionCounts
≈ 0.81x10−9 x InstructionCounts
Computer B has a smaller execution time than computer A. The speedup is
Speedup = ExecutionTimeA / ExecutionTimeB
≈1.6
Therefore, computer B is faster than computer A by 1.6x.
Answer 4: (25 points)
a) (8 points) Suppose the percentage of vectorization is X. Based on Amdahl’s Law, we
have
Speedupoverall = 1 / [(1 - Fractionenhanced )+ Fractionenhanced / Speedupenhanced]
2 = 1 / [(1 - X)+ X/20]
X ≈ 52.63%

b) (8 points) The maximum speedup can be achieved if the percentage of vectorization is


100%. So the maximum speedup is
MaxSpeedupoverall = 1 / [(1− Fractionenhanced )+ Fractionenhanced / Speedupenhanced]
= 1 /[ (1−100%)+ 100% / 20]
= 20
If only one-half of the maximum speedup is needed with the percentage of vectorization
as X, using Amdahl’s Law
Speedupoverall = 1 / [(1− Fractionenhanced)+ Fractionenhanced / Speedupenhanced]
20 / 2 = 1 / [(1− X)+ X/20]
X ≈ 94.74%

c) (9 points) Based on Amdahl’s Law, the speedup that the hardware group could achieve is
Speedupoverall = 1 / [(1− Fractionenhanced)+ Fractionenhanced / Speedupenhanced]
= 1 /[(1− 70%)+ 70% / (2 × 20)]
≈ 3.1496
For the compiler crew, they have to increase the original percentage of vectorization to X
for achieving the same speedup as what the hardware group does. X can be found by
using Amdahl’s Law again as
Speedupoverall = 1 / [(1− Fractionenhanced)+ Fractionenhanced / Speedupenhanced]
3.1496 = 1 / [(1− X)+ X / 20]
X ≈ 71.84%
So, the increase of the percentage of vectorization is 1.84%. Comparing to a significant
additional engineering investment required by the hardware group, adding a small
amount of the percentage of vectorization costs less. It is defiantly worth investing the
compiler crew!

You might also like