What is the Amdahl’s law? This law which is named after Gene Amdahl is quite fundamental in the field of parallel programming and is quite extensively used. The Amdahl’s law is used to predict how much speedup can be obtained by parallelizing a particular algorithm.
Amdahl’s law states that the overall speedup of applying the improvement will be:
which represents the speedup achievable from an improvement to a computation that affects a proportion P of that computation when the improvement has a speedup of S.
To understand this equation better, let N be the number of cores over which the algorithm will be divided or distributed upon and let P be the proportion of the algorithm that is parallelized. Then (1-P) is the portion of the program that is sequentially executed.
Now lets try an intuitive derivation of the Amdahl’s law. To start off, we define speedup as the ratio of the time taken to execute a program using a serial algorithm to the time taken to execute a program using a parallel algorithm. Here, time can be in any unit. So, if we have an algorithm that is executed sequentially and we create a new algorithm for the same problem that is identical to our sequential algorithm (new algorithm is also sequential), then speedup is obviously 1. Because we did not do anything new.
