Skip to content
Sahithyan's S3
1
Sahithyan's S3 — Operating Systems

Amdahl's Law

The performance rule that tells how much speed-up a program can gain when only part of it can run in parallel.

All programs have a serial portion and a parallel portion. Addition of CPU cores only speeds up the parallel portion. The performance improvement gained is limited by the fraction of time that the improved part is actually used.

Speedup(N)=1S+1SN\text{Speedup}(N) = \cfrac{1}{S + \frac{1 - S}{N}}

Here:

  • NN - number of processing cores
  • SS - serial portion of the task
  • P=1SP = 1- S - parallel portion of the task

Serial portion of an application has disproportionate effect on performance gained by adding additional cores.

If SS is large, speedup is small even with many cores. As NN increases, the speedup approaches 1S\frac{1}{S}, which is the maximum.