Beginner Topic 3 of 51 Concurrency & Parallelism
Amdahl's Law
Formula bounding speedup by the serial fraction.
How it works
Amdahl's law gives the theoretical maximum speedup from parallelizing a program: if a fraction p of the work can be parallelized over n processors and the rest 1 minus p is serial, speedup is 1 divided by ((1 minus p) plus p over n). As n grows, speedup approaches 1/(1 minus p), so a program that is 95 percent parallel can never exceed a 20 times speedup. Gustafson's law counters that larger problems scale the parallel portion, giving scaled speedup.
Where it is used
Capacity planning for multicore and cluster hardware, deciding whether to parallelize and where to optimize use Amdahl's law to estimate returns.
Common pitfall
It assumes fixed problem size and ignores overhead from communication and synchronization, so real speedups are lower. Misjudging the serial fraction gives unrealistic expectations. It highlights that optimizing the serial part can matter more than adding cores. Measure serial and parallel parts, consider problem scaling and look at efficiency, speedup divided by processors.
Where it fits in the course
Amdahl's Law is topic 3 of 51 in Concurrency & Parallelism, rated Beginner. It follows Sequential Bottlenecks. The next topic is Threads in Practice.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Concurrency & Parallelism quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Concurrency & Parallelism quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Amdahl's Law?
Where do people use Amdahl's Law?
What is the most common mistake with Amdahl's Law?
What should I learn before this topic?
How can I practice it?
Is Amdahl's Law hard to learn?
How long does it take to learn Amdahl's Law?
Which topics are related to Amdahl's Law?
What should I study after Amdahl's Law?
Related topics
- Sequential Bottlenecks (Concurrency & Parallelism)
- Threads in Practice (Concurrency & Parallelism)
- Concurrency vs Parallelism (Concurrency & Parallelism)
- Thread Pools (Concurrency & Parallelism)