ParallelComputing 2 2015
ParallelComputing 2 2015
[email protected]
1
Model Paralel Prosesor
• Processor Arrays
• Multiprocessors Oak Ridge National
• Multicomputers Laboratory, multicomputer.
FLUENT, multiprocessors
2
ASCI White, Massively Parallel Processor (MPP),
processor arrays
Processor Array
Processor array
Processing
element Data
Interconnection network
memory
Front end computer
Processing
element Data
Program and
memory
data memory
Processing
element Data
CPU
memory
I/O 3
Bagan umum processor arrays
Processor Array
Front end
• Front end computer:
sekuensial vektor komputer
yang dibantu oleh processor
array untuk melakukan tugasnya.
Processor array
Switching mechanism
5
Multiprocessors
UMA Ethernet
Terminal
Console
Interface Adapter 2 – 30
Board Board 32-bit
System Bus
Printer
NUMA
Switching mechanism
I/O Devices
8
Multicomputers
nCube 2
Processor Processor
9
Taxonomi Flynn
Instruksi
10
Taxonomi Flynn
data x data x y z
P1 P1 P2 P3
sin(x) sin(x) sin(y) sin(z)
SISD SIMD
data x data x y z
P1 P2 P3 P1 P2 P3
MISD MIMD 11
Taxonomi Flynn
SIMD
Example:
for (i=0; i<10; i++)
~ if (a[i]<b[i])
~ c[i] = a[i]+b[i];
~ else
~ c{i] = 0;
a[] 4 1 7 2 9 3 3 0 6 7
b[] 5 3 4 1 4 5 3 1 4 8
c[]
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
12
Taxonomi Flynn
SIMD
Example:
for (i=0; i<10; i++)
~ if (a[i]<b[i])
~ c[i] = a[i]+b[i];
~ else
~ c{i] = 0;
a[] 4 1 7 2 9 3 3 0 6 7
b[] 5 3 4 1 4 5 3 1 4 8
c[]
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
13
Taxonomi Flynn
SIMD
Example:
for (i=0; i<10; i++)
~ if (a[i]<b[i])
~ c[i] = a[i]+b[i];
~ else
~ c{i] = 0;
a[] 4 1 7 2 9 3 3 0 6 7
b[] 5 3 4 1 4 5 3 1 4 8
c[] 9 4 8 1 15
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
14
Taxonomi Flynn
SIMD
Example:
for (i=0; i<10; i++)
~ if (a[i]<b[i])
~ c[i] = a[i]+b[i];
~ else
~ c{i] = 0;
a[] 4 1 7 2 9 3 3 0 6 7
b[] 5 3 4 1 4 5 3 1 4 8
c[] 9 4 0 0 0 8 0 1 0 15
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
15
Connection Network
static networks
• Komunikasi point-to-point menghubungkan antar prosesor.
• Komunikasi ini disebut juga dengan direct networks.
dynamic networks
• Komunikasi dijalankan secara dinamis menggunakan switch
untuk membangun jalur antar prosesor dan memory bersama.
• Komunikasi ini disebut juga dengan indirect networks.
16
Connection Network
p p p p
p p p p
network interface/switch switching element
prosesor
17
Dynamic network
18
Dynamic network
Cross bar
19
Dynamic network
Keuntungan: sederhana.
20
Dynamic network
Interchange Box
0 0 1 0
0 0 0 0
1 1 1 0
Straight Upper Broadcast
0 1 1 1
0 1 0 1
1 1 1 0
Hypercube Connection
N = 2m 1
N = jumlah input atau output
m = jumlah tingkat
3
Setiap tingkat terdiri dari N/2 interchange box.
2
4 5
0 1 1: 0 – 4, 1 – 5, 2 – 6, 3 – 7
2: 0 – 2, 1 – 3, 4 – 6, 5 – 7
6 7
2 3: 0 – 1, 2 – 3, 4 – 5, 6 - 7
3
22
Dynamic network
Contoh: Untuk 8 input atau output
Hypercube Connection maka diperlukan:
8 = 2m , m = 3, jadi 3 tingkat
Tiap tingkat terdiri dari 8/2 = 4 interchange box.
1 2 3
0 0 0 0 0 0
0 0
4 4 2 2 1 1 1
1 1
1 1 1 1 2 2
2 2 3
5 5 3 3 3 3 2
3 3
2 2 4 4
4 4 4 4 4 5
6 6 6 6 5 5 0 1
5 5
3 3 5 5 6 6 6 7
6 6
2 3
7 7 7 7 7 7
7 7
23
Dynamic network
1 1
Rumus koneksi:
i dihubungkan dengan 2i modulo (N-1) 2 2
3 3
Untuk N = 8
0 0 mod(7) = 0 4 4
1 2 mod(7) = 2
5 5
2 4 mod(7) = 4
3 6 mod(7) = 6
6 6
4 8 mod(7) = 1
5 10 mod(7) = 3 7 7
6 12 mod(7) = 5
7 14 mod(7) = 7 24
Topologi Paralel
Prosesor
25
Definisi Graph
26
Definisi Graph
9
6
7 12
5
3
7
4
Graph berarah, Graph tak berarah, Graph tak berarah,
tak berbobot, tak berbobot, Berbobot, tersambung
tersambung tersambung
Graph berarah,
tak berbobot,
tak tersambung
27
Properti Graph
B
Graph planar Graph nonplanar
E F
Pada graph disebelah,
diameternya adalah 3,
D
yaitu jarak antara titik C
A dan G (ada 3 penggal garis)
A
B
Jarak dua titik,
adalah jumlah edge terpendek yang menghubungkan
dua titik tersebut. Jarak titik A dan F adalah 2.
29
Properti Graph
E F
D
C
A B
Dalam contoh graph ini,
bisection width nya adalah 4, yaitu dengan menghapus penggal garis
A – D, B – C, F – G, E - H (ada 4 penggal garis).
30
Properti Graph
31
Properti Graph
Spanning tree
Garis yang menjadi bagian dalam
spanning tree disebut branch, dan
garis yang tidak menjadi bagiannya
disebut chord.
Berlaku persamaan:
Spanning tree adalah tree Jumlah branch = n - 1
didalam graph yang mencakup Jumlah chord = e – n + 1
semua titik didalam graph tersebut.
Graph merah adalah contoh dua
alternatif spanning tree dari graph
warna hitam. 32
Properti Graph
Binomial tree
Binomial tree dengan tinggi 0 bebentuk titik tunggal. Binomial tree
dengan tinggi h dibentuk dari penggabungan 2 binomial tree dengan
tinggi h-1 dengan menghubungkan root dari kedua tree tersebut dimana
salah satu root akan menjadi root dari binomial gabungan.
33
Topologi Jaringan Prosesor
34
Topologi Jaringan Prosesor
a b c
Hypercube
4 12
0 8
5
13
1 9
6 14
2 10
7
15
3
11
2k k 2k - 1 tetap tidak
tetap 36
Topologi Jaringan Prosesor
Butterfly