What is Amdahl's law?
Amdahl's law is primarily used in computer architecture. It is used in parallel computing to make predictions regarding the theoretical speedup when multiple processors are used.
We define Amdahl's law as follows:
The formula that gives the theoretical speedup in the latency of execution of a task. This speedup is calculated for a fixed workload in accordance with the resources.
We can also define it as:
The overall performance improvement that is obtained by optimizing a part of the system. However, this improvement is limited by the fraction of time that the improved part is actually used.
Formula
The formula for Amdahl's law is:
Where:
is the ratio of the parallelizable code over the total execution time. is the number of processors or the part of the task that speeds up due to the improved system resources.
Example
We have
Solution
Converting the value of
Replacing the values in the equation, we get:
When we solve this equation, we get:
This formula gives us:
We ignore the whole part and focus on the decimal part, which gives us optimization. Thus, the speedup will be
Drawbacks
Amdahl's law has a few drawbacks. These are as follows:
Scaling falls off when the number of processors increases. This is due to synchronization barriers (locks) and memory collisions.
It isn't easy to compute the value of
. This is because the serializable part occurs not only in code but also in the kernel and the hardware. Secondly, is an essential part of this too.profiling A method used for understanding the relative complexity of different parts of concern for an architecture. Consistency of the private data cache of the multiprocessor systems is also to be considered.
Free Resources