Parallelization in bidirectional dedicated system

advertisement
1
HAMS Technologies
www.hams.co.in
director@hams.co.in
priyank@hams.co.in
vivek@hams.co.in
HAMS Technologies
»
Consider that you have a big task that can be divided into four independent task. Also
consider that you can spawn infinite number of communication process but one
process can communicate with exactly one another process at a time. We have one
master process responsible to distribute one task among four different worker
process.
»
Now we will see the different possible communication topologies and analyze the
behavior of each.
Master Node
Master
Node
Worker-1
Worker-1
Worker-4
Master
Node
Worker-2
Internediate
Intermediate
Communication
Node-2
Communication Node -1
Intermediate1
Worker2
Worker3
Intermediate-2
Intermediate3
Worker-3
Worker-4
Worker
1
Worker
2
Worker
3
Worker
4
2
HAMS Technologies
Direct (star) topology
Communication will happened as follow
At time unit 1
Submit job-1, Master Node to Worker-1
At time unit 2
Worker1
Submit job-2, Master Node to Worker-2
At time unit 3
Submit job-3, Master Node to Worker-3
Worker4
Master
Node
Worker2
At time unit 4
Submit job-4, Master Node to Worker-4
At time unit 5
Receive job-1, Worker-1 to Master Node
Worker3
At time unit 6
Receive job-2, Worker-2 to Master Node
At time unit 7
Receive job-3, Worker-3 to Master Node
At time unit 8
Receive job-4, Worker-4 to Master Node
Total time for communication = 8 units
HAMS Technologies
3
Binary tree topology
Communication will happened as follow
At time unit 1
Submit job-1 and job-2, Master Node to Intermediate-1
At time unit 2
Master Node
Submit job-3 and job4, Master Node to intermediate-2 AND
Submit job-1, Intermediate-1 to worker-1
At time unit 3
Submit job-3, Intermediate-2 to Worker-3 AND
Submit job-2, Intermediate-1 to Worker-2
At time unit 4
Internediate
Intermediate
Communication
Node-2
Communication Node -1
Submit job-4, Intermediate-2 to Worker-4 AND
Receive Job-1, Worker-1 to intermediate-1
At time unit 5
Receive job-2, Worker-1 to intermediate-1 AND
Receive Job-3, Worker-3 to intermediate-2
At time unit 6
Worker
1
Worker
2
Worker
3
Receive job-1 and job-2, intermediate-1 to Master Node AND
Receive Job-4, Worker-4 to intermediate-2
Worker
4
At time unit 7
Receive job-3 and job-4, intermediate-2 to Master Node
Total time for communication = 7 units
Major Problem with Binary topology..
4
1. Communication is not balanced
2. Many idle node at every stage due to unavailability of data or due to business of relative
node, So We suggest and going for exponential kind of tree
HAMS Technologies
Exponential tree (with variation) topology
Communication will happened as follow
At time unit 1
Send job-3 and job-4, Master Node to Intermediate-2
At time unit 2
Send job-2, Master Node to intermediate-1 AND
Send job-4, Intermediate-2 to Intermediate-3
Master
Node
At time unit 3
Send job-1, Master Node to Worker-1 AND
Send job-2, Intermediate-1 to Worker-2 AND
Send job-3, Intermediate-2 to Worker-3 AND
Send job-4, Intermediate-3 to Worker-4
Worker-1
Intermediate-1
Worker-2
Worker-3
Intermediate-2
At time unit 4
Received job-1, Worker-1 to Master Node AND
Received job-2, Worker-2 to Intermediate-1 AND
Received job-3, Worker-3 to Intermediate-2 AND
Received job-4, Worker-4 to Intermediate-3
Intermediate-3
At time unit 5
Received job-2, Intermediate-1 to Master Node AND
Received job-4, Intermediate-3 to Intermediate-2
Worker-4
At time unit 6
Receive job-3 and job-4, intermediate-2 to Master Node AND
Receive Job-4, Worker-4 to intermediate-2
Total time for communication = 6 units
HAMS Technologies
5
Comparison between Time taken by different topologies
Topology
Time taken (for
scheduling 4 jobs
to 4 worker
process)
Reason and Conclusion
Direct
8 unit
One process (Master-node) is sending/receiving
all the jobs. So Master node becomes the
bottleneck here. In general for X worker processes
it will take 2X unit time
Binary
7 Unit
Communication task is divided but many process
has to wait for other relative process to be free.
This consume extra time. In general for X worker
process, this approach will take 2X-1 unit time
Exponential
kind of tree
6 unit
Communication will be smooth in this case. In
general for X worker process, this approach will
take 2*(X-1) unit times
6
HAMS Technologies
Thank you
Kindly drop us a mail at below mention address for any
suggestion and clarification. We like to hear from you
HAMS Technologies
www.hams.co.in
director@hams.co.in
priyank@hams.co.in
vivek@hams.co.in
7
HAMS Technologies
Download