From the course: Parallel and Concurrent Programming with Java 2

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Amdahl's law

Amdahl's law - Java Tutorial

From the course: Parallel and Concurrent Programming with Java 2

Start my 1-month free trial

Amdahl's law

- There's a well-known equation for estimating the speedup that a parallel program can achieve called Amdahl's law, which is named after the computer scientist that formulated it. It's a way to estimate how much bang for your buck you'll actually get by parallelizing a program. In this equation for Amdahl's law, P represents the portion of a program that can be made parallel, and S is the speedup for that parallelized portion of the program running on multiple processors. So, for this example, if 95% of our cupcake decorating program can be executed in parallel, and doing so with two processors produces a speedup of two for that part of the program, then the theoretical speedup for the entire program is about 1.9, which is a little bit less than two. If we add a third processor to increase the speedup for the parallelized portion to three, then the overall speedup will be around 2.7. Using four processors gives us a speedup of 3.5, and so on. Now let's say we spend a lot of money and…

Contents