Docsity

Interconnection Network Design: Switching Techniques and Routing Algorithms, Slides of Parallel Computing and Programming

Partial preview of the text

Download Interconnection Network Design: Switching Techniques and Routing Algorithms and more Slides Parallel Computing and Programming in PDF only on Docsity!

Interconnection Network Design

Contd.

Switching Techniques

  • Circuit Switching: Apath is reserved. Communication starts. The path is released when communication is control message is sent from source to destination and a complete.
  • Store-and-forward policy (Packet Switching): each switch waits for the full packet to arrive in switch before sending to the next switch (good for WAN)
  • Cut-through routing or worm hole routing: switch examines the header, decides where to send the message, and then starts forwarding it immediately - In worm hole routing, when head of message is blocked, message stays strung out over the network, potentially blocking other messages (needs only buffer the piece of the packet that is sent between switches). CM-5 uses it, with each switch buffer being 4 bits per port. - Cut through routing lets the tail continue when head is blocked, storing the whole message into an intermmediate switch. (Requires a buffer large enough to hold the largest packet).

Store and Forward vs. Cut-Through

  • Advantage
    • Latency reduces from function of:

number of intermediate switches X by the size of the packet

to

time for 1st part of the packet to negotiate the switches

  • the packet size ÷ interconnect BW

Store&Forward vs Cut-Through

Routing

  • • (^) what if message is fragmented?h(n/b + ∆) vs n/b + h ∆
  • wormhole vs virtual cut-through

3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 3 21 0 3 2 1 0 3 2 1 0 3 2 1 0

3 2 1 0 3 2 1 0 3 2 1 3 2 0 3 1 0 2 1 0 3 2 1 0

0 1 2 3

Time^3 21

Store & Forward Routing Cut-Through Routing Source Dest Dest

Example

Q. Compare the efficiency of store-and-forward (packet switching) vs. wormhole routing for transmission of a 20 bytes packet between a source and destination, which are d-nodes apart. Each node takes 0. microsecond and link transfer rate is 20 MB/sec. Answer: Time to transfer 20 bytes over a link = 20/20 MB/sec = 1 microsecond. Packet switching: # nodes x (node delay + transfer time)= d x (.25 + 1) = 1.25 d microseconds Wormhole: (# nodes x node delay) + transfer time = 0.25 d + 1 Book: For d=7, packet switching takes 8.75 microseconds vs. 2. microseconds for wormhole routing

Contention

  • Two packets trying to use the same link at same time
    • limited buffering
    • drop?
  • Most parallel mach. networks block in place
    • link-level flow control
    • tree saturation
  • Closed system - offered load depends on delivered

Congestion Control

  • Packet switched networks do not reserve

bandwidth; this leads to contention (connection

based limits input)

  • Solution: prevent packets from entering until

contention is reduced (e.g., freeway on-ramp

metering lights)

  • Options:
    • Packet discarding: If packet arrives at switch and no room in buffer, packet is discarded (e.g., UDP)
    • Flow control: between pairs of receivers and senders; use feedback to tell sender when allowed to send nextDocsity.com

Flow Control

  • What do you do when push comes to

shove?

  • Ethernet: collision detection and retry after delay
  • FDDI, token ring: arbitration token
  • TCP/WAN: buffer, drop, adjust rate
  • any solution must adjust to output rate
  • Link-level flow control Data

Ready

Routing

  • Recall: routing algorithm determines
    • which of the possible paths are used as routes
    • how the route is determined
    • R: N x N -> C, which at each switch maps the destination node nd to the next channel on the route
  • Issues:
    • Routing mechanism
      • arithmetic
      • source-based port select
      • table driven Docsity.com

Routing Mechanism

  • need to select output port for each input

packet

  • in a few cycles
  • Simple arithmetic in regular topologies
  • ex: ∆x, ∆y routing in a grid
  • west (-x) ∆x < 0
  • east (+x) ∆x > 0
  • south (-y) ∆x = 0, ∆y < 0
  • north (+y) ∆x = 0, ∆y > 0
  • processor ∆x = 0, ∆y = 0

Properties of Routing Algorithms

  • Deterministic
    • route determined by (source, dest), not intermediate state (i.e. traffic)
  • Adaptive
    • route influenced by traffic along the way
  • Minimal
    • only selects shortest paths
  • Deadlock free
    • no traffic pattern can lead to a situation where no packets mover forward Docsity.com

Deadlock Freedom

  • How can it arise?
    • necessary conditions:
      • shared resource
      • incrementally allocated
      • non-preemptible
    • think of a channel as a shared resource that is acquired incrementally
      • source buffer then dest. buffer
      • channels along a route
  • How do you avoid it?
    • constrain how channel resources are allocated
    • ex: dimension order
  • How do you prove that a routing algorithm isDocsity.com

Example: k-ary 2D array

  • Theorem: x,y routing is deadlock free
  • Numbering
    • +x channel (i,y) -> (i+1,y) gets i
    • similarly for -x with 0 as most positive edge
    • +y channel (x,j) -> (x,j+1) gets N+j
    • similarly for -y channels
  • any routing sequence: x direction, turn,

y direction is increasing

1 2 3 (^210) 00 01 02 03

10 11 12 13 20 21 22 23

30 31 32 33

17

18 16 19

17

18

Deadlock free wormhole

networks?

  • Basic dimension order routing techniques don’t work for k-ary d- cubes
    • only for k-ary d-arrays (bi-directional)
  • Idea: add channels!
    • provide multiple “virtual channels” to break the dependence cycle
    • good for BW too!
    • Do not need to add links, or xbar, only buffer resources
  • This adds nodes the the CDG, remove edges?

Input Ports OutputPorts

Cross-Bar