Uploaded by SUKRUTH RAMESH

Amdahl’s Law Explained

advertisement
Amdahl’s Law: Explained
Sukruth Ramesh
sukruthr@campus.uni-paderborn.de
Paderborn University
Paderborn, Germany
ABSTRACT
The Amdahl’s Law is introduced in section 1, section 2 explains
the law, section 3 provides mathematical equation and section 4
discusses an experiment based on the equation of Amdahl’s law.
1
INTRODUCTION
The concept of adding more processors to improve the performance
of the computer is not valid and the reason behind this observation
is explained by Amdahl’s law.[1] This law is used to quantify the
amount of the improvement in the performance of the computer
can be achieved by the increasing the number of processors.
2
PROBLEM DESCRIPTION
To start with , let us consider a processor which can complete a
given task in ‘T’ time having number of processors as 1. Now, if
the number of processors is increased to ‘n’, then the same task
must take ‘T/n’ time assuming the load has been distributed to
other processors. Then in this case the efficiency of the computer
increases linearly as the number of processors increased. This can
be shown by the Figure 1. In Figure 1, shows the result of an experiment where speedup achieved changes linearly as the number of
processors are increased.
In reality this does not hold .i.e. the speedup does not increase
linearly. Amdahl’s law shows that the amount of performance enhanced depends not entirely on the number of processors but also
on other factors. Each program can be broken down such that
(1) Certain sections of the code which must be run serially and
cannot run concurrently. Hence this part of code cannot run
in parallel.
(2) Sections of code which can run concurrently. Hence this part
of code run in parallel.
Hence, according to Amdahl’s law factors which effect the speedup
as explained Factors which effect the speedup as explained.
• Percentage of serial and parallel execution of program.
• Number of processors on which the program is running.
3
MATHEMATICAL EQUATION
Figure 1: Linear Relation
where T is total time with 1 processor. The equation for n-processors
would change to
𝑇𝑛 = 𝑆 + 𝑃/𝑛
(2)
Since the parallel sections can be divided among ‘n’ processors.Assume
the value of T = 1, then from equation 1
𝑆 +𝑃 = 1
𝑆 = (1 − 𝑃)
𝑇𝑛 = (1 − 𝑃) + 𝑃/𝑛
𝑆𝑝𝑒𝑒𝑑𝑢𝑝 = 𝑇 /𝑇𝑛
Therefore, Admdahl’s Law can be represened as
𝑆𝑝𝑒𝑒𝑑𝑢𝑝 = 1/(1 − 𝑃) + 𝑃/𝑛
4
Derivation
For deriving the equation for Amdahl’s Law [2], let us consider a
computer that takes ‘T’ time to execute the program. Let the program contain sections of code which must run serially represented
as ‘S’ and parallel sections is represented as ‘P’. Now we have,
𝑇 =𝑆 +𝑃
(4)
Equation 4 shows that the program can be executed in Tn time,
where (1 – P) represents the serializable part and P/n represents
parallel part. Hence overall speedup which is obtained can be shown
by
This section we can derive an equation to represent the law in
mathematical form.
3.1
(3)
Substituting equation 3 in equation2, We get
(1)
EXPERIMENT
To show the observations graphically, an experiment is designed.
In the experiment 4 cases are considered, each case represents 20%,
40%, 60% and 80% part of the code which can run in parallel. The
number of processors are increased from 10 to 70, increasing by
number 10 in each step. The speedup achieved is recorded and
plotted against the number of processors. Figure 2 summarizes the
results as a graph.
Sukruth Ramesh
5
CONCLUSION
Amdahl’s Law shows that there is no linear relation between the
number of processors and speedup achieved. The speedup depends
on the portion of the program which can be executed parallel. Initially for a particular case(amount of parallelization) as the number
of processors increases the speedup also increases. But after certain
increase in processors the speedup achieved becomes constant and
is not affected by the increase in processors. This phenomenon can
be shown in Figure 2.
This Law explains very basic concept of the parallel computing,
hence holds a lot of significance.
REFERENCES
Figure 2: Illustration of Amdahl’s Law
[1] Gene Amdahl. Validity of the single processor approach to achieving large scale
computing capabilities, reprinted from the afips conference proceedings, vol. 30
(atlantic city, n.j., apr. 18–20). Solid-State Circuits Newsletter, IEEE, 12:19 – 20, 02
2007.
[2] Frank Devai. The Refutation of Amdahl’s Law and Its Variants, pages 79–96. 09
2018.
Download