On my homework the question asks:
A program executes serially in 200 seconds. If it is parallelized, 7 seconds of overhead are required for synchronization, locking, and communication. Compute the execution time, ideal speedup (if there were no overhead required), actual speedup, and the percentage of the ideal speedup that is obtained for 1, 2, 4, 8, 16, 32, 64, and 128 processors.
How do I calculate the answer to this? It is not something that has been covered in class yet and the homework is due before the next time the class meets.
My guess is that I divide 200 seconds by the number of cores and then add 7 * # cores to get the total response time. I don't think it is that simple.
Amdahl's law says: T(n) = T(1)[B + 1/n(1-B)] where B is the percentage of the algorithm that is not parallelized and n is the number of cores. If I assume that the 7 seconds mentioned is the part of the algorithm that is not parallelized, I can get the percentage by saying:
7sec * n B = -------- 200sec
Then I plug the value for B into Amdahl's equation. Coencidentally, this gives me the same answers as I got before when I did my own formula:
200 --- + [7 * (n - 1)] n
After doing a little bit of algebra, I discovered that my formula is a simplified version of Amdahl's formula. Of course all of this assumes I am correct when I read the question as if the 7 seconds are the part of the algorithm that is not parallelized.
Thanks for looking,