Previous | Next --- Slide 24 of 60
Back to Lecture Thumbnails
ekr

If P4 takes 20% longer to complete then that means that 16.66% of the parallel program runtime is serial, right? Not that it makes a big difference to the maximum speedup.

jcarchi

Hm.. I agree with the math on that. Also wondering if that is correct (20/120 vs 20/100). If someone can comment on this, that would be great!

ChandlerBing

My thinking is that it is 20% of the 'parallel' runtime execution. P4 takes 20% longer to complete than each P takes to finish its parallel execution. So compared to that execution time, 20% is the serialization. Someone please correct me if I am wrong.

ekr

I'm pretty sure that's wrong. If P1 through P3 take 5x seconds to run, and P4 takes 6x seconds, then P4 takes (6x-5x) / 5x = 20% longer. But the total parallel runtime is 6x seconds, since it runs until all four workers complete. So, x / 6x = 16.67% of the total runtime is serial.

ChandlerBing

@ekr Ohh I assumed that parallel runtime is 5x, as I thought it referred to the time when P1-P4 are working in parallel. Yes then that makes sense, thanks!