0% found this document useful (0 votes)
424 views2 pages

1 What Is Amdahl's Law?: Example: Let A Program Have 40 Percent of Its Code Enhanced (So F

Amdahl's law is used to predict the maximum speedup from improving part of a system. It can be used to determine: 1) The overall speedup if the fraction improved (fE) and improvement factor (fI) are known 2) The fI if fE and speedup are known 3) The fE if fI and speedup are known Examples are provided for each type of problem to demonstrate how to set up and solve the Amdahl's law equation.

Uploaded by

Dev Rishi Thakur
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)
424 views2 pages

1 What Is Amdahl's Law?: Example: Let A Program Have 40 Percent of Its Code Enhanced (So F

Amdahl's law is used to predict the maximum speedup from improving part of a system. It can be used to determine: 1) The overall speedup if the fraction improved (fE) and improvement factor (fI) are known 2) The fI if fE and speedup are known 3) The fE if fI and speedup are known Examples are provided for each type of problem to demonstrate how to set up and solve the Amdahl's law equation.

Uploaded by

Dev Rishi Thakur
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/ 2

CDA3101 – Spring 2016 Amdahl’s Law Tutorial Plain Text – MSS – 14 Apr 2016

1 What is Amdahl’s Law?


Amdahl's law is an expression used to find the maximum expected improvement to an overall system when
only part of the system is improved. It is often used in parallel computing to predict the theoretical
maximum speedup using multiple processors.
(source: https://en.wikipedia.org/wiki/Amdahl%27s_law )

2 What Kinds of Problems Do We Solve with Amdahl’s Law?


Recall how we defined performance of a system that has been sped up:

There are three types of problems to be solved using the following Amdahl’s Law equation:

Let Speedup be denoted by “S”, fraction enhanced be denoted by “fE”, and factor of improvement be
denoted by “fI”. Then we can write the above equation as
S = ( (1 – fE) + (fE / fI) )-1 .
The three problem types are as follows:
1. Determine S given fE and fI
2. Determine fI given S and fE
3. Determine fE given S and fI
Let us consider an example of each type of problem, as follows.

2.1 Problem Type 1 – Predict System Speedup


If we know fE and fI, then we use the Speedup equation (above) to determine S.
Example: Let a program have 40 percent of its code enhanced (so fE = 0.4) to run 2.3 times faster (so
fI = 2.3). What is the overall system speedup S?
Step 1: Setup the equation: S = ( (1 – fE) + (fE / fI) )-1
Step 2: Plug in values & solve S = ( (1 – 0.4) + (0.4 / 2.3) )-1
= ( 0.6 + 0.174 )-1 = 1 / 0.774
= 1.292

2.2 Problem Type 2 – Predict Speedup of Fraction Enhanced


If we know fE and S, then we solve the Speedup equation (above) to determine fI , as follows:
CDA3101 – Spring 2016 Amdahl’s Law Tutorial Plain Text – MSS – 14 Apr 2016

Example: Let a program have 40 percent of its code enhanced (so fE = 0.4) to yield a system speedup
4.3 times faster (so S = 4.3). What is the factor of improvement fI of the portion enhanced?
Case #1:
Can we do this? In other words, let’s determine if by enhancing 40 percent of the system, it is
possible to make the system go 4.3 times faster …
Step 1: Assume the limit, where fI = infinity, so S = ( (1 – fE) + (fE / fI) )-1  S = 1 / (1 – fE)
Step 2: Plug in values & solve S = ( (1 – 0.4) )-1 = 1 / 0.6 = 1.67 .
Step 3: So S = 1.67 is the maximum possible speedup, and we cannot achieve S = 4.3 !!

Case #2:
A different case: Let’s determine if by enhancing 40 percent of the system, it is possible to make
the system go 1.3 times faster …
Step 1: Assume the limit, where fI = infinity, so S = ( (1 – fE) + (fE / fI) )-1  S = 1 / (1 – fE)
Step 2: Plug in values & solve S = ( (1 – 0.4) )-1 = 1 / 0.6 = 1.67 .
Step 3: So S = 1.67 is the maximum possible speedup, and we can achieve S = 1.3 !!
Step 4: Solve speedup equation for fI : 1/S = (1 – fE) + (fE / fI) [invert both sides]
1/S – (1 – fE) = fE / fI [subtract (1 – fE)]
(1/S – (1 – fE) ) = fI / fE
-1
[invert both sides]
fE · (1/S – (1 – fE) ) = fI -1
[multiply by fE]
Step 5: Plug in values & solve: fI = fE · (1/S – (1 – fE) ) -1

= 0.4 · (1/1.3 – (1 – 0.4) )-1


= 0.4 / (0.769 – 0.6) = 2.367
Step 6: Check your work: S = ( (1 – fE) + (fE / fI) )-1 = ( 0.6 + (0.4/2.367))-1 = 1.3 

2.3 Problem Type 3 – Predict Fraction of System to be Enhanced


If we know fI and S, then we solve the Speedup equation (above) to determine fE , as follows:
Example: Let a program have a portion fE of its code enhanced to run 4 times faster (so fI = 4), to yield
a system speedup 3.3 times faster (so S = 3.3). What is the fraction enhanced (fE)?
Step 1: Can this be done? Assuming fI = infinity, S = 3.3 = ( (1 – fE) )-1 so minimum fE = 0.697
Yes, this can be done for maximum fI, so let’s solve the equation to determine actual fE
Step 2: Solve speedup equation for fE : S = ( (1 – fE) + (fE / fI) )-1 [state the equation]
3.3 = ( (1 – fE) + (fE / 4) ) -1
[plug in values]
(1 – fE) + fE/4 = 1/3.3 = 0.303 [invert both sides]
1 – 0.75fE = 0.303 [regroup]
0.75fE = 1 – 0.303 = 0.697 [commutativity]
fE = 0.697 / 0.75 = 0.929 [divide by 0.75]
Step 3: Check your work: S = ( (1 – fE) + (fE / fI) ) -1
= ( 0.071 + (0.929/4))-1 = 3.3 

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy