Lecture 15
Learning objectives
After this class, you should be able to:
- Define the terms (i) speedup, (ii) efficiency, and (iii) work.
- Given data for the following operations: (i) reduction, (ii) broadcast, (iii) gather, (iv) scatter, and (v) prefix, show the messages sent at each step and the state of each processor at the end of each step, for the algorithms discussed in class for these operation.
- Derive the time complexity for each of the above operations in the task/channel communication model.
- Explain the idea behind
divide and conquor
andpipelining
, which are used to develop efficient parallel algorithms.- Show how a linear recurrence can be formulated as a parallel prefix problem, and derive the time complexity of the parallel algorithm based on this formulation.
- Given the time on a single processor, the number of processors, and the time taken by an algorithm on those processors, compute the speedup, efficiency, and work.
- Given the sequential or parallelizable fraction of a code, give the maximum possible speedup
Reading assignment
- Foster's book, especially section 1.3 and chapter 3.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Given eight processors with data
1, 3, 2, 4, 5, 3, 1, 8
respectively, show the messages sent at each step of the all-gather operation, and the data present in each processor at the end of each step.- Give an efficient algorithm for the scatter operation, and derive its time complexity.
- Show a pipelined scheme for performing
n > > P
broadcasts onP
processors, with the time complexity mentioned in the lecture 15 slides.- Given the following sequence of data:
1, 3, 2, 4
, give all the prefixes.- Given the following linear recurrence:
xi = i xi-1 + (i+1) xi-2
, computex4
, ifx0 = x1 = 1
.- Give the formal algorithm for iterative parallel prefix and derive its time complexity.
- If a linear recurrence had three terms instead of two, then show how we can formulate it as a parallel prefix problem, and derive the time complexity.
- Preparation for the next lecture
- None.
Last modified: 3 Mar 2010