Parallel Models
Different ways to exploit parallelism
Parallel Models Different ways to exploit parallelism Reusing this - - PowerPoint PPT Presentation
Parallel Models Different ways to exploit parallelism Reusing this material This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License.
Different ways to exploit parallelism
This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_US
This means you are free to copy and redistribute the material and adapt and build on the material under the following terms: You must give appropriate credit, provide a link to the license and indicate if changes were made. If you adapt or build on the material you must distribute your work under the same license as the original. Note that this presentation contains images owned by others. Please seek their permission before reusing these images.
Threads-based parallelism
my data
my data
PC PC PC
Private data Private data Private data
Shared data Thread 1 Thread 2 Thread 3 7
loop: i = istart,istop myasum += a[i] end loop asum asum=0
11
addition, multiplication, max, min, and, or.
asum = 0; for (i=0; i < n; i++) asum += a[i];
the operations can proceed in parallel
Memory
Processor
Shared Bus
Processor Processor Processor Processor
12
13
14
process
15
Process-based parallelism
asynchronous
has started to be received
message has gone
must wait until the message arrives 21
22
received. 23
24
Process-based parallelism
groups of processes is required
implemented separately, for efficiency 26
27
28
0 1 2 3 4 5 1 3 4 5 2
29
0 1 2 3 4 5 1 3 4 5 2
30
Strik ike? e?
31
1 3 4 5 2 15
32
distributed-memory
processor-core
the interconnect, between nodes/OS’s
Processor Processor Processor Processor Processor Processor Processor Processor
Interconnect
How we use the parallel models
nodes
machine?
cores on the same node are fast
to the network
Interconnect
programs run by a special job launcher
allocation to nodes