Amdahl’s Law: If P is the part of a program that can be run in parallel on N processors, and (1 − P) is the part that cannot be parallelized and must run sequentially, then the maximum speedup that can be achieved by using N processors is
Using Threads to tasks in parallel, causes 2 issues we must take care of:
- Visibility : Am I looking at the “Most Updated Data”?
- Access : I want to change D and He wants to change D as well, both on the same time.
If either of the above is not taken care of properly, it can result into problems like Deadlocks, Incorrect Data and so on.
To be Continued…