Skip to content

Latest commit

 

History

History
36 lines (16 loc) · 1.51 KB

Chapter-1.md

File metadata and controls

36 lines (16 loc) · 1.51 KB

1.1

Question: Suppose you work as a truck driver, and you have been hired to carry a load of potatoes from Boise, Idaho, to Minneapolis, Minnesota, a total distance of 2,500 kilometers. You estimate you can average 100 km/hr driving within the speed limits, requiring a total of 25 hours for the trip.

A. You hear on the news that Montana has just abolished its speed limit, which constitutes 1,500 km of the trip. Your truck can travel at 150 km/hr. What will be your speedup for the trip?

B. You can buy a new turbocharger for your truck at www.fasttrucks.com. They stock a variety of models, but the faster you want to go, the more it will cost. How fast must you travel through Montana to get an overall speedup for your trip of 1.67x?

Answer:

A: $$ \frac{2500/100}{1500/150+(2500-1500)/100} = 1.25x $$

B: Suppose x km/hr.

$$ \frac{2500/100}{1500/x+(2500-1500)/100} = 1.67 $$

$$x=300$$

1.2

Question: The marketing department at your company has promised your customers that the next software release will show a 2x performance improvement. You have been assigned the task of delivering on that promise. You have determined that only 80% of the system can be improved. How much (i.e., what value of k) would you need to improve this part to meet the overall performance target?

Answer:

Amdahl's Law: $$ T_{new} = (1-\alpha)T_{old} + (\alpha T_{old}/k) = T_{old}[(1-\alpha) + \alpha/k] $$

Then speedup $$ S = T_{old}/T_{new} = \frac{1}{(1-\alpha) + \alpha/k} $$

$$ 2 = \frac{1}{(1-0.8) + 0.8/k} $$

$$ k = 2.67 $$