computer science and engineering parallel and distributed processing cse 8380 march 03, 2005 session...
TRANSCRIPT
![Page 1: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/1.jpg)
Computer Science and Engineering
Parallel and Distributed ProcessingParallel and Distributed Processing
CSE 8380CSE 8380
March 03, 2005March 03, 2005
Session 15Session 15
![Page 2: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/2.jpg)
Computer Science and Engineering
Scheduling
Review Optimal Algorithms without communication
Interval Orders 2 Processors
Communication Models Optimal Algorithms with communication Heuristics
![Page 3: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/3.jpg)
Computer Science and Engineering
Interval Orders
A task graph is an interval order when its nodes can be mapped into intervals on the real line, and two elements are related iff the corresponding intervals do not overlap.
For any interval ordered pair of nodes u and v, either the successors of u are also successors of v or the successors of v are also successors of u.
![Page 4: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/4.jpg)
Computer Science and Engineering
Scheduling interval ordered tasks
1. The number of successors of each node is used as each node’s priority
2. Whenever a processor becomes available, assign it the unexecuted ready task with the highest priority
(complexity?)
![Page 5: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/5.jpg)
Computer Science and Engineering
Example
0 0 0
3 2 1
4 5 61
9
1 1
1 1 1
1 1 1
1 2 3
654
7 8
Time P1 P2
123
4 5 6
87 9
P30
1
2
3
![Page 6: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/6.jpg)
Computer Science and Engineering
Two Processor Scheduling
1. Assign 1 to one of the terminal tasks.
2. Let labels 1,2,...,j-1 have been assigned. Let S be the set of unassigned tasks with no unlabeled successors. We next select an element of S to be assigned label j. For each node x in S define l(x) as follows: Let y1, y2, ...,yk be the immediate successors of x. Then l(x) is the decreasing sequence of integers formed by ordering the set {L(y1), L(y2),..., L(yk)}. Let x be an element of S such that for all x' in S, l(x) ≤ l(x') (lexicographically). Define L(x) to be j.
3. Use L(v) as the priority of task v and ties are broken arbitrary.
4. Whenever a processor becomes available, assign it the unexecuted ready task with the highest priority. Ties are broken arbitrarily.
![Page 7: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/7.jpg)
Computer Science and Engineering
Example2 1
4
1
5 1
6 1
7 1
8
1
1
1
9
1
10
111
1
15
1
13
13
1
12
114
1
16
1
17
1
12 3
4 56
78 910
11 12
13
14
15 16 17
1
3
4
2
5
67
16
9
10
11
12
15
8
17
13
14
P1 P2time
![Page 8: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/8.jpg)
Computer Science and Engineering
Communication Models
Completion Time Execution time Communication time
Completion Time as 2 Components Completion Time from the Gantt Chart
![Page 9: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/9.jpg)
Computer Science and Engineering
Completion Time as 2 Components
Completion Time = Execution Time + Total Communication Delay
Total Communication Delay = Number of communication messages * delay per message
Execution time maximum finishing time of any task Number of communication messages
model A Model B
![Page 10: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/10.jpg)
Computer Science and Engineering
Number of communication Messages Given a task graph G = (V,E) and its allocation on m
processors f, we use proc(v) to refer to the processor to which task v is assigned.
Model A: number of messages =the number of node pairs (u,v) such that (u,v)belongs to E and proc(u) ≠ proc(v).
Model B: number of messages =the number of processor-task pairs (P,v) such that processor P does not compute task v but computes at least one direct successor of v.
![Page 11: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/11.jpg)
Computer Science and Engineering
Completion Time from the Gantt Chart (Model C)
Completion Time = Schedule Length This model assumes the existence of an I/O
processor with every processor in the system
Communication delay between two tasks allocated to the same processor is negligible.
Communication delay is counted only between two tasks assigned to different processors
![Page 12: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/12.jpg)
Computer Science and Engineering
Example
A
1
D
1
E
1
B
1
C
1
Assume a system with 2 processors
![Page 13: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/13.jpg)
Computer Science and Engineering
Models A and B
Assume tasks A, B, and D are assigned to P1 and tasks C and E are assigned to p2
A
B
D
P1
C
E
P2
Model A
Number of messages = 2
Completion time = 3 + 2
Model B
Number of messages = 1
Completion time = 3 + 1
![Page 14: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/14.jpg)
Computer Science and Engineering
Model C
A
B
C D
E
Communication Delay
P1 P20
1
2
3
4
![Page 15: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/15.jpg)
Computer Science and Engineering
Optimal Algorithms with Communication
Interval orders on n processors In-forests / out-forests on two processors
Refer to the lecture and the chapter on scheduling for the details
![Page 16: Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15](https://reader036.vdocuments.mx/reader036/viewer/2022082709/56649f565503460f94c79f3d/html5/thumbnails/16.jpg)
Computer Science and Engineering
Heuristics
Discussion of Heuristics Examples
Refer to the lecture and the chapter on scheduling for the details