1 / 52

CSE 8383 - Advanced Computer Architecture

CSE 8383 - Advanced Computer Architecture. Week-12 April 8, 2004 engr.smu.edu/~rewini/8383. Contents. Dynamic Networks Message Passing Mechanisms Message Passing in PVM. Dynamic Network Analysis. Parameters: Cost: number of switches Delay: latency Blocking characteristics

randy
Download Presentation

CSE 8383 - Advanced Computer Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 8383 - Advanced Computer Architecture Week-12 April 8, 2004 engr.smu.edu/~rewini/8383

  2. Contents • Dynamic Networks • Message Passing Mechanisms • Message Passing in PVM

  3. Dynamic Network Analysis • Parameters: • Cost: number of switches • Delay: latency • Blocking characteristics • Fault tolerance

  4. M M M M MIMD Distributed Memory Systems P P P P Interconnection Networks

  5. Interconnection Network Taxonomy Interconnection Network Dynamic Static Bus-based Switch-based 1-D 2-D HC Crossbar Single Multiple SS MS

  6. Dynamic Interconnection Networks • Communication patterns are based on program demands • Connections are established on the fly during program execution • Multistage Interconnection Network (MIN) and Crossbar

  7. Switch Modules • A x B switch module • A inputs and B outputs • In practice, A = B = power of 2 • Each input is connected to one or more outputs (conflicts must be avoided) • One-to-one (permutation) and one-to-many are allowed

  8. 2x2 Switch Binary Switch Legitimate States = 4 Permutation Connections = 2

  9. Straight Exchange Upper-broadcast Lower-broadcast The different setting of the 2X2 SE Legitimate Connections

  10. Group Work General Case ??

  11. Multistage Interconnection Networks ISC  Inter-stage Connection Patterns ISC1 ISC2 ISCn switches switches switches

  12. Perfect-Shuffle Routing Function • Given x = {an, an-1, …, a2, a1} • P(x) = {an-1, …, a2, a1 , an} X =110001 P(x) = 100011

  13. Perfect Shuffle Example 000  000 001  010 010  100 011  110 100  001 101  011 110  101 111  111

  14. 000 000 001 001 010 010 011 011 100 100 101 101 110 110 111 111 Perfect-Shuffle

  15. Exchange Routing Function • Given x = {an, an-1, …, a2, a1} • Ei(x) = {an, an-1, …, ai, …, a2, a1} X = 0000000 E3(x) = 0000100

  16. Exchange E1 000 001 001 000 010 011 011 010 100 101 101 100 110 111 111 110

  17. 000 000 001 001 010 010 011 011 100 100 101 101 110 110 111 111 Exchange E1

  18. Butterfly Routing Function • Given x = {an, an-1, …, a2, a1} • B(x) = {a1 , an-1, …, a2, an} X =010001 P(x) = 110000

  19. Butterfly Example 000  000 001  100 010  010 011  110 100  001 101  101 110  011 111  111

  20. 000 000 001 001 010 010 011 011 100 100 101 101 110 110 111 111 Butterfly

  21. Multi-stage network 000 000 001 001 010 010 011 011 100 100 101 101 110 110 111 111

  22. MIN (cont.) An 8X8 Banyan network

  23. Min Implementation Control (X) Source (S) Destination (D) X = f(S,D)

  24. A C A C B D B D X = 0 X = 1 ( ) ) crossed (straight Example

  25. Consider this MIN stage 2 stage 1 stage 3 D1 S1 D2 S2 S3 D3 D4 S4 D5 S5 D6 S6 D7 S7 S8 D8

  26. Example (Cont.) • Let control variable be X1, X2, X3 • Find the values of X1, X2, X3 to connect: • S1  D6 • S7  D5 • S4  D1

  27. The 3 connections stage 2 stage 1 stage 3 D1 S1 D2 S2 S3 D3 D4 S4 D5 S5 D6 S6 D7 S7 S8 D8

  28. Boolean Functions • X = x1, x2, x3 • S = s2, s2, s3 • D = d1, d2, d3 • Find X = f(S,D)

  29. M1 M2 M3 M4 M5 M6 M7 M8 P1 P2 P3 P4 P5 P6 P7 P8 Crossbar Switch

  30. Analysis and performance metricsdynamic networks • Performance comparison of dynamic networks

  31. Message Passing Mechanisms • Message Format • Message  arbitrary number of fixed length packets • Packet  basic unit containing destination address. Sequence number is needed • A packet can further be divided into flits (flow control digits) • Routing and sequence occupy header flit

  32. Message, Packets, Flits Message Packet Destination Sequence Data flit

  33. Store and Forward Routing • Packets are the basic units of information flow • Each node uses a packet buffer • A packet is transferred from S to D through a sequence of intermediate nodes • Channel and buffer must be available

  34. Wormhole Routing • Flits are the basic units of information flow • Each node uses a flit buffer • Flits are transferred from S to D through a sequence of intermediate routers in order (Pipeline) • Can be visualized as a railroad train • Flits from different packets cannot be mixed up

  35. Latency Analysis • L  packet length (in bits) • W  Channel bandwidth (bits/sec) • D  Distance (number of hops) • F  flit length (in bits) • TSF = D * L/W • TWH = L/W + D* F/W  L/Wif L>>F (independent of D)

  36. Communication Patterns • Point to Point  1 - 1 • Multicast  1 - n • Broadcast  1 - all • Conference  n - n

  37. Routing Efficiency • Two Parameters • Channel Traffic (number of channels used to deliver the message involved) • Communication Latency (distance)

  38. Multicast on a mesh (5 unicasts) Traffic ? Latency ?

  39. Multicast on a mesh (multicast pattern 1 Traffic ? Latency ?

  40. Multicast on a mesh (multicast pattern 2) Traffic ? Latency ?

  41. Broadcast (tree structure) 3 2 3 4 2 1 2 3 1 1 2

  42. Message Passing in PVM Sending Task Receiving Task User application Library User application Library 5 1 4 8 6 2 3 7 Daemon Daemon

  43. 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)

  44. 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)

  45. Send (3 steps) • A send buffer must be initialized • The message is packed into the buffer • The completed message is sent to its destination(s)

  46. Receive (2 steps) • The message is received • The received items are unpacked

  47. Message Buffers • Buffer Creation (before packing) Bufid = pvm_initsend(encoding_option) Bufid = pvm_mkbuf(encoding_option) Encoding option Meaning 0 XDR 1 No encoding 2 Leave data in place

  48. Message Buffers (cont.) • Data Packing pvm_pk*() • pvm_pkstr() – one argument pvm_pkstr(“This is my data”); • Others – three arguments • 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

  49. 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)

  50. 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)

More Related