Session-22 - Lyle School of Engineering

Download Report

Transcript Session-22 - Lyle School of Engineering

Advanced Computer
Architecture
CSE 8383
April 6, 2006
Session 22
Copyright by Hesham El-Rewini
Computer Science and Engineering
Contents



Communication Patterns
Message Passing in PVM (Section 8.4)
Network Computing (Chapter 7)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Routing Efficiency

Two Parameters


Channel Traffic (number of channels
used to deliver the message involved)
Communication Latency (distance)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Multicast on a mesh (5 unicasts)
Traffic ?
Latency ?
Copyright by Hesham El-Rewini
Computer Science and Engineering
Multicast on a mesh (multicast pattern 1)
Traffic ?
Latency ?
Copyright by Hesham El-Rewini
Computer Science and Engineering
Multicast on a mesh (multicast pattern 2)
Traffic ?
Latency ?
Copyright by Hesham El-Rewini
Computer Science and Engineering
Broadcast (tree structure)
3
2
3
4
2
1
2
3
1
2
1
Copyright by Hesham El-Rewini
Computer Science and Engineering
Message Passing in PVM (Revisit)
Sending Task
User
application
1
3
Daemon
Copyright by Hesham El-Rewini
User
application
Library
4
2
Receiving Task
5
Library
8
6
7
Daemon
Computer Science and Engineering
Standard PVM asynchronous
communication




A sending task issues a send command (point 1)
The message is transferred to the daemon
(point 2)
Control is returned to the user application
(points 3 & 4)
The daemon will transmit the message on the
physical wire sometime after returning control
to the user application (point 3)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Standard PVM asynchronous
communication (cont.)



The receiving task issues a receive command
(point 5) at some other time
In the case of a blocking receive, the receiving
task blocks on the daemon waiting for a
message (point 6). After the message arrives,
control is returned to the user application
(points 7 & 8)
In the case of a non-blocking receive, control is
returned to the user application immediately
(points 7 & 8)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Send (3 steps)
1.
2.
3.
A send buffer must be initialized
The message is packed into the buffer
The completed message is sent to its
destination(s)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Receive (2 steps)
1.
2.
The message is received
The received items are
unpacked
Copyright by Hesham El-Rewini
Computer Science and Engineering
Message Buffers

Buffer Creation (before packing)
Bufid = pvm_initsend(encoding_option)
Bufid = pvm_mkbuf(encoding_option)
Encoding option
0
1
2
Copyright by Hesham El-Rewini
Meaning
XDR
No encoding
Leave data in place
Computer Science and Engineering
Message Buffers (cont.)

Data Packing
pvm_pk*()

pvm_pkstr() – one argument
pvm_pkstr(“This is my data”);

Others – three arguments
1.
2.
3.

Pointer to the first item
Number of items to be packed
Stride
pvm_pkint(my_array, n, 1);
Packing functions can be called multiple
times to pack data into a single message
Copyright by Hesham El-Rewini
Computer Science and Engineering
Sending a message

Point to point (one receiver)
info = pvm_send(tid, tag)

broadcast (multiple receivers)
info = pvm_mcast(tids, n, tag)
info = pvm_bcast(group_name, tag)

Pack and Send (one step)
info = pvm_psend(tid, tag, my_array, length, data type)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Receiving a message

Blocking
bufid = pvm_recv(tid, tag)
-1  wild card in either tid or tag

Nonblocking
bufid = pvm_nrecv(tid, tag)
bufid = 0 (no message was received)

Timeout
bufid = pvm_trecv(tid, tag, timeout)
bufid = 0 (no message was received)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Different Receive in PVM
Time
Funciton
is called
Pvm_recv()
wait
Pvm_nrecv()
Continue
execution
Time is
expired
Message
arrival
Pvm_trecv()
wait
Resume
execution
Resume
execution
Blocking
Copyright by Hesham El-Rewini
Non-blocking
Timeout
Computer Science and Engineering
Data unpacking
pvm_upk*()

pvm_upkstr() – one argument
pvm_upkstr(string);

Others – three arguments
1.
2.
3.
Pointer to the first item
Number of items to be unpacked
Stride
pvm_upkint(my_array, n, 1);
Copyright by Hesham El-Rewini
Computer Science and Engineering
Networks Computing

Four categories




WAN
MAN
LAN
SAN

Internet

TCP/IP
Copyright by Hesham El-Rewini
Computer Science and Engineering
Other Network technologies





Fast Ethernet and Gigabit Ethernet
The Fiber Distributed Data Interface (FDDI)
High-Performance Parallel Interface (HIPPI)
Asynchronous Transfer Mode (ATM)
Scalable Coherent Interface (SCI)
Copyright by Hesham El-Rewini
Computer Science and Engineering
10Gbps
SCI
HiPPI
1000Mbps
1000 Base T
ATM
FDDI
100Mbps
100 Base T
10Mbps
10 Base T
SAN
LAN
MAN
WAN
A representation of network technologies
Copyright by Hesham El-Rewini
Computer Science and Engineering
Client/Server Systems
Client
Client
Server
Server Threads
Interconnection
Network
Copyright by Hesham El-Rewini
Computer Science and Engineering
Sockets


Sockets are used to provide the capability of making
connections from one application running on one
machine to another running on a different machine.
Once a socket is created, it can be used to wait for an
incoming connection (passive socket) or can be used
to initiate connection (active socket).
Client
Serve
r
A Socket Connection
Copyright by Hesham El-Rewini
Computer Science and Engineering
A Client Server Framework for Parallel
Applications
Server 1
Server 2
Server 3
Slaves (Workers)
Server n
Interconnection
Network
Client
Copyright by Hesham El-Rewini
Master (Supervisor)
Computer Science and Engineering
Computer Clusters



Advances in commodity processors
and network technology
Network of PCs and workstations
connected via LAN or WAN forms a
Parallel System
Compete favorably
(cost/performance)
Copyright by Hesham El-Rewini
Computer Science and Engineering
Cluster Architecture
Programming Environment
Middleware
OS
M
C
P
OS
I/O
M
C
OS
I/O
P
Interconnection
Network
Copyright by Hesham El-Rewini
M
C
I/O
P
Home cluster
Computer Science and Engineering
Grids
Geographically
distributed platforms.
Internet
Dependable, consistent,
pervasive, and
inexpensive access to
high end computing.
Copyright by Hesham El-Rewini
Computer Science and Engineering