Homework #5 Due: Wednesday, Sept. 23 at 5 PM
5. There is a paradigm shift making parallel programming conceptually different from sequential programming. A simple example is summing an array x containing n elements.
Sequential Algorithm:
Algorithm to for o1 < n i++{
[yX+nsna //endfor
Parallel Pair-Wise Summation:
a) How long would each algorithm take?
b) How many processors does the pair-wise summation algorithm utilize?
We can categorize sources of overhead in parallel programs that limit speedup as follows:
1) Interprocess communication/interaction - processors need to communicate data (i.e., intermediate results)
2) Idle processors - processors can be idle for a variety of reasons:
a) Load imbalance - a processor is assigned less work than others so it sits idle waiting for others to finish
b) Synchronization - processors need to coordinate their operations (e.g., barrier synchronization) so processors done sooner must wait for others to complete
c) Non-parallelizable computation/task - some serial component that cannot be done in parallel
Amdahl's law applies here.
3) Parallelization overhead - additional costs in the parallel solution that are not in the sequential computation