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.
2
4
Threads-based parallelism
5
6
my data
my data
7
8
PC PC PC
Private data Private data Private data
Shared data Thread 1 Thread 2 Thread 3
9
10
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
12
13
Memory
Processor
Shared Bus
Processor Processor Processor Processor
14
15
process
16
17
Process-based parallelism
18
19
20
21
asynchronous
has started to be received
message has gone
must wait until the message arrives
22
23
received.
24
25
Process-based parallelism
26
groups of processes is required
implemented separately, for efficiency
27
28
29
30
0 1 2 3 4 5 1 3 4 5 2
31
0 1 2 3 4 5 1 3 4 5 2
32
Strik ike? e?
33
1 3 4 5 2 15
distributed-memory
processor-core
the interconnect, between nodes/OS’s
Processor Processor Processor Processor Processor Processor Processor Processor
Interconnect
34
35
How we use the parallel models
36
nodes
machine?
cores on the same node are fast
to the network
Interconnect
37
programs run by a special job launcher
allocation to nodes
38
39
40