Enter the proportion of the program that cannot be parallelized (1 – p) and the number of processors used (n) into the calculator to determine the overall speedup achieved by parallel processing; this calculator can also evaluate any of the variables given the others are known.

## Amdahl’S Law Formula

The following formula is used to calculate the speedup achieved by using parallel processing according to Amdahl’s Law:

Speedup = {1}/({(1 - p) + {p}/{n}})

Variables:

- Speedup is the overall speedup achieved by parallel processing
- p is the proportion of the program that can be parallelized (between 0 and 1)
- n is the number of processors used

To calculate the speedup, subtract the proportion of the program that cannot be parallelized (1 – p) from 1. Divide the result by the sum of the proportion of the program that can be parallelized (p) divided by the number of processors used (n).

## What is Amdahl’S Law?

Amdahl’s Law, named after computer architect Gene Amdahl, is a formula used to find the maximum improvement possible by enhancing a particular part of a system. In the context of parallel computing, it is used to predict the theoretical maximum speedup for program processing using multiple processors. The law states that the speedup of a program using a parallel algorithm is limited by the time needed for the sequential fraction of the program. In other words, if a program needs 20 hours to complete in sequential mode (i.e., with one processor) and a particular part of the program which takes one hour to execute cannot be parallelized, while the remaining 19 hours (95%) of execution time can be parallelized, then regardless of how many processors are devoted to a parallelized execution of this program, the minimum execution time cannot be less than that critical one hour. Hence, the speedup is limited by the non-parallelizable section of the process.

## How to Calculate Amdahl’S Law?

The following steps outline how to calculate Amdahl’s Law:

- First, determine the speedup factor (S).
- Next, determine the proportion of the program that can be parallelized (P).
- Next, calculate the speedup of the parallel portion (Sp) using the formula Sp = 1 / (1 – P).
- Next, calculate the speedup of the non-parallel portion (Sn) using the formula Sn = 1.
- Finally, calculate the overall speedup (So) using the formula So = S = 1 / ((1 – P) + (P / S)).

**Example Problem : **

Use the following variables as an example problem to test your knowledge.

speedup factor (S) = 4

proportion of the program that can be parallelized (P) = 0.6