diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/README.md b/README.md index 78cf14e..a6da6b5 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Laws, Theories, Principles and Patterns that developers will find useful. * [Introduction](#introduction) * [Laws](#laws) + * [Amdahl's Law](#amdahls-law) * [Brooks's Law](#brookss-law) * [Conway's Law](#conways-law) * [The Hype Cycle & Amara's Law](#the-hype-cycle--amaras-law) @@ -38,6 +39,29 @@ There are lots of laws which people discuss when talking about development. This And here we go! +### Amdahl's Law + +[Amdahl's Law on Wikipedia](https://en.wikipedia.org/wiki/Amdahl%27s_law) + +> Amdahl's Law is a formula which shows the _potential speedup_ of a computational task which can be achieved by increasing the resources of a system. Normally used in parallel computing, it can predict the actual benefit of increasing the number of processors, which is limited by the parallelisability of the program. + +Best illustrated with an example. If a program is made up of two parts, part A, which must be executed by a single processor, and part B, which can be parallelised, then we see that adding multiple processors to the system executing the program can only have a limited benefit. It can potentially greatly improve the speed of part B - but the speed of part A will remain unchanged. + +The diagram below shows some examples of potential improvements in speed: + +![Diagram: Amdahl's Law](./images/amdahls_law.png) + +*(Image Reference: By Daniels220 at English Wikipedia, Creative Commons Attribution-Share Alike 3.0 Unported, https://en.wikipedia.org/wiki/File:AmdahlsLaw.svg)* + +As can be seen, even a program which is 50% parallelisable will benefit very little beyond 10 processing units, where as a program which is 95% parallelisable can still achieve significant speed improvements with over a thousand processing units. + +As [Moore's Law](#TODO) slows, and the acceleration of individual processor speed slows, parallelisation is key to improving performance. Graphics programming is an excellent example - with modern Shader based computing, individual pixels or fragments can be rendered in parallel - this is why modern graphics cards often have many thousands of processing cores (GPUs or Shader Units). + +See also: + +- [Brooks's Law](#brookss-law) +- [Moore's Law](#TODO) + ### Brooks's Law [Brooks's Law on Wikipedia](https://en.m.wikipedia.org/wiki/Brooks%27s_law) diff --git a/images/amdahls_law.png b/images/amdahls_law.png new file mode 100644 index 0000000..3fd7472 Binary files /dev/null and b/images/amdahls_law.png differ