Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 April 6, 2006 Session 22.

Similar presentations


Presentation on theme: "Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 April 6, 2006 Session 22."— Presentation transcript:

1 Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 April 6, 2006 Session 22

2 Computer Science and Engineering Copyright by Hesham El-Rewini Contents Communication Patterns Message Passing in PVM (Section 8.4) Network Computing (Chapter 7)

3 Computer Science and Engineering Copyright by Hesham El-Rewini Routing Efficiency Two Parameters Channel Traffic (number of channels used to deliver the message involved) Communication Latency (distance)

4 Computer Science and Engineering Copyright by Hesham El-Rewini Multicast on a mesh (5 unicasts) Traffic ? Latency ?

5 Computer Science and Engineering Copyright by Hesham El-Rewini Multicast on a mesh (multicast pattern 1) Traffic ? Latency ?

6 Computer Science and Engineering Copyright by Hesham El-Rewini Multicast on a mesh (multicast pattern 2) Traffic ? Latency ?

7 Computer Science and Engineering Copyright by Hesham El-Rewini Broadcast (tree structure) 3 23 4 2 12 3 1 1 2

8 Computer Science and Engineering Copyright by Hesham El-Rewini Message Passing in PVM (Revisit) User application Library Daemon 1 23 4 User application Library Daemon 5 6 7 8 Sending TaskReceiving Task

9 Computer Science and Engineering Copyright by Hesham El-Rewini 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)

10 Computer Science and Engineering Copyright by Hesham El-Rewini 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)

11 Computer Science and Engineering Copyright by Hesham El-Rewini Send (3 steps) 1. A send buffer must be initialized 2. The message is packed into the buffer 3. The completed message is sent to its destination(s)

12 Computer Science and Engineering Copyright by Hesham El-Rewini Receive (2 steps) 1. The message is received 2. The received items are unpacked

13 Computer Science and Engineering Copyright by Hesham El-Rewini Message Buffers Buffer Creation (before packing) Bufid = pvm_initsend(encoding_option) Bufid = pvm_mkbuf(encoding_option) Encoding optionMeaning 0XDR 1No encoding 2Leave data in place

14 Computer Science and Engineering Copyright by Hesham El-Rewini Message Buffers (cont.) Data Packing pvm_pk*() pvm_pkstr() – one argument pvm_pkstr(“This is my data”); Others – three arguments 1. Pointer to the first item 2. Number of items to be packed 3. Stride pvm_pkint(my_array, n, 1); Packing functions can be called multiple times to pack data into a single message

15 Computer Science and Engineering Copyright by Hesham El-Rewini 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)

16 Computer Science and Engineering Copyright by Hesham El-Rewini 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)

17 Computer Science and Engineering Copyright by Hesham El-Rewini Different Receive in PVM Pvm_recv() wait Time Funciton is called Time is expired Message arrival Blocking Pvm_nrecv() Continue execution Non-blocking Pvm_trecv() wait Timeout Resume execution

18 Computer Science and Engineering Copyright by Hesham El-Rewini Data unpacking pvm_upk*() pvm_upkstr() – one argument pvm_upkstr(string); Others – three arguments 1. Pointer to the first item 2. Number of items to be unpacked 3. Stride pvm_upkint(my_array, n, 1);

19 Computer Science and Engineering Copyright by Hesham El-Rewini Networks Computing Four categories WAN MAN LAN SAN Internet TCP/IP

20 Computer Science and Engineering Copyright by Hesham El-Rewini 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)

21 Computer Science and Engineering Copyright by Hesham El-Rewini HiPPI ATM 10 Base T 100 Base T SCI SANLANMAN WAN 10Mbps 100Mbps 1000Mbps 10Gbps 1000 Base T FDDI A representation of network technologies

22 Computer Science and Engineering Copyright by Hesham El-Rewini Client/Server Systems Interconnection Network Interconnection Network Server Threads Client Server Client

23 Computer Science and Engineering Copyright by Hesham El-Rewini 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

24 Computer Science and Engineering Copyright by Hesham El-Rewini A Client Server Framework for Parallel Applications Interconnection Network Interconnection Network Master (Supervisor) Server 1 Server 2 Server 3Server n Client Slaves (Workers)

25 Computer Science and Engineering Copyright by Hesham El-Rewini 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)

26 Computer Science and Engineering Copyright by Hesham El-Rewini Cluster Architecture M C P I/O OS M C P I/O OS M C P I/O OS Middleware Programming Environment Interconnection Network Home cluster

27 Computer Science and Engineering Copyright by Hesham El-Rewini Internet Grids Dependable, consistent, pervasive, and inexpensive access to high end computing. Geographically distributed platforms.


Download ppt "Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 April 6, 2006 Session 22."

Similar presentations


Ads by Google