简体   繁体   中英

Trying to understand Amdahl's Law

I am trying to answer a school assignment but i am getting confused to what the question is trying to ask.

A design optimization was applied to a computer system in order to increase the performance of a given execution mode by a factor of 10. The optimized mode is used 50% of the time, measured as a percentage of the execution time after the optimization has been applied.

(a) What is the global speedup value that is achieved with this optimization? Remind: Amdahl's law defines the global speedup as a function of the optimized fraction before the optimization is applied. As a consequence, the 50% ratio cannot be directly used to evaluate this speedup value.

(b) What is the percentage of the original execution time that is affected by this optimization?

(c) How much should such execution mode be optimized in order to achieve a global speedup of 5? Can a global speedup of 12 be achieved? And 11?

When trying to calculate answer A) i came to the answer 1.81 ( 20/11 )

T' = 0.5 * T + 0.5 * T/10 = T/2 + (1/20)T = (11/20) * T

Speedup = T / T' = T / ((11/20) * T = 20/11 = 1.81

For me this answer makes sense but in the professor's solutions say otherwise:

(a) 5.5

(b) 91%

(c) Yes it can with an optimization by a factor of 25/3. No, because factor can't be negative, so it is impossible. Also no, because ∞ optimization → impossible

I can't solve the other ones because i am confused with the first one.

Why is 5.5 the correct answer?

Let's suppose a computer has two states A and B, and after whatever optimization, it spends 0 ≤ p ≤ 1 of its time in state A, and q = 1 - p of its time in state B. (So p is something like.5, or.27).

State A was sped up by a factor of X. State B was sped up by a factor of Y.

So before, it was spending time p * X + q * Y time that it can now do in p + q = 1 unit of time. So its speed up is p * X + q * Y .

Applying this to the problem you were given: p = q =.5 , X=10 , Y=1 (no speedup). 10 * (.5) + 1 * (.5) = 5.5

This easily generalizes.

After optimization, time = x minutes optimized mode + x minutes other = 2x.

Before optimization, time = 10x minutes unoptimized mode + x minutes other = 11x.

Speedup = 11x/2x = 5.5

I love Amdahl's argument , incl. " improvers ", so let's start from facts

I will not answer the assignment questions directly, yet will help you learn the know-why, which is to my deepest belief & decades of joy to experience working with the most skilled people the core of what education should promote in our knowledge

( introducing text, decomposed )

 A design optimization was applied to a COMPUTER SYSTEM ___ [Fig.1:A] in order to increase the performance of a given EXECUTION MODE_________________ [Fig.1:B] by a FACTOR of 10._________________________ [Fig.1:C]

Fig.1:

BEFORE  
      +------------------------------------------------------------A: SYSTEM
      |  +----------------------------------------------------B    |
      |  |                                                    |    |
      |  |                                                    |    |
      |  |                                                    |    |
      |  +----------------------------------------------------+    |
      +--:----------------------------------------------------:----+
         :                                                    :
         :                                                    :
         :           C: FACTOR ~ 10 x_________________________/
         :          /
AFTER    :         /
      +--:--------/--A*
      |  +------B*   |
      |  | 10x  |    |
      |  | less |    |
      |  | time |    |
      |  +123456+    |
      +12+------+3456+

D:         in smarter, optimised  "EXECUTION MODE",
  the 50% was duration of the said EXECUTION MODE, whereas
      50% was duration of the original, not modified, part

(... text continued, decomposed )

 The optimized mode is used 50% of the TIME,__________ [FACT Fig.1:D] measured as a percentage of the execution time AFTER the optimization has been applied.

(... first question, decomposed )

 (a) What is the global SPEEDUP value that is achieved with ( AFTER ) this optimization?

Remind: Amdahl's law defines the global speedup as a function of the optimized fraction before the optimization is applied. As a consequence, the 50% ratio cannot be directly used to evaluate this speedup value.

(... second question )
(b) What is the percentage of the original execution time that is affected by this optimization?

full-A-duration ~  10 x duration-of-B* // == duration-of-B         as was BEFORE
                  + 1 x duration-of-B* // == duration-of-( A - B ) as is
                                       // == duration-of-( A*- B*)    the same
( ref: FACT [Fig.1:D] )

Since here,
the classics apply - just do not forget what to compare to what

(... third, fourth and fifth questions )
(c) How much should such EXECUTION MODE (improving just the block B -to- B* ) be optimized in order to achieve a global speedup of 5?


Can a global speedup
here not restricted to touch only B , so can be smart in improving A -to- A* :P professor will either accept and warmly appreciate your skills and insightful argumentation on doing this, or punish you to dare use crystal-clear logic of the task to the limits the text was not prohibiting us from doing so;) -- [ SAFETY WARNING ] best not to use this skilled strategy on auto-grader(s) or Artificial-"Intelligence"-powered grading Bots... for obvious reasons these rigid, pre-wired or LSqE-penalised algorithms will hardly award you any extra points for innovative thinking, as thinking is "not included" there, while batteries might 've been, might've been not? )
of 12 be achieved?

And 11?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM