1 / 70

Routing Algorithms

Routing Algorithms. Overview. Routing Algorithm fixed by Routing function Selection function Determinant of key properties Connectivity Deadlock and routing freedom Fault tolerance adaptivity. A single function for deterministic protocols. Taxonomy. Routing Algorithms. multicast.

Télécharger la présentation

Routing Algorithms

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. Routing Algorithms

  2. Overview • Routing Algorithm fixed by • Routing function • Selection function • Determinant of key properties • Connectivity • Deadlock and routing freedom • Fault tolerance • adaptivity A single function for deterministic protocols

  3. Taxonomy Routing Algorithms multicast # Destinations Unicast Routing Decisions Centralized Source Distributed Multi-phase Table Lookup Finite State Machine Implementation Deterministic Adaptive Adaptivity Progressive Backtracking Progressiveness Profitable Misrouting Minimality Complete Partial Number of Paths

  4. Generic Router Architecture

  5. Elaboration • Source Routing • Static paths defined at the source • Extensions to street-sign routing • Multiphase routing • Used for reliable routing • Load balancing • Irregular networks typically need table look-up or source routing • Interval routing • Making table-based routing more efficient

  6. Interval Routing 0 4 8 12 • Each output link corresponds to an interval of nodes • Union of intervals at a node is the set of all destination nodes • Must be able to distinguish invalid intervals (at the edges of a mesh) • Use overlapping intervals for fault tolerance 1 5 9 13 2 6 10 14 3 7 11 15

  7. Some Finer Points • Oblivious vs. deterministic protocols • Typically referring to use of network state • Deterministic protocols are oblivious • Converse may not be true • Fully, maximal, and true fully adaptive • Fully: maximize alternative physical paths • Maximal: maximize all routing options • True: no constraints on VC usage • Deadlock recovery-based methods

  8. Classes of Routing Algorithms • Deterministic Routing • Partially Adaptive • Fully Adaptive • Maximally Adaptive • Non-minimal Routing • Routing in MINs

  9. Deterministic Routing Algorithms Binary Hypercube • Strictly increasing or decreasing order of dimension • Acyclic channel dependencies Mesh Deterministic routing

  10. c10 c0 n0 n1 c01 c11 c03 c1 c3 c02 n3 n2 c2 c10 c12 n0 n1 c00 c03 c11 c01 c12 n3 n2 c02 Tori • Dimension order routing • Create an acyclic channel dependency graph with the following routing function c0i whenj<i, c1i whenj >i c13 Deterministic routing

  11. Deterministic Routing Algorithms: Implementation Issues • Relatively, the most inexpensive to implement • Absolute addressing • Relative Addressing • Header update • Necessary to maintain uniformity of implementation • Source routing • Street sign addressing: only encode the turns Deterministic routing

  12. Partially Adaptive Routing Algorithms • Trade-off between hardware resources and adaptivity • Maximize adaptivity for given resources • Minimize resources required for a given level of adaptivity • Typically exploit regular topologies Partially Adaptive Routing

  13. Planar Adaptive Routing • Packets are routed adaptively in a series of two dimensional planes • Order of planes (dimensions) is arbitrary • Routing in two dimension uses two virtual networks • Increasing and decreasing networks A0 A0 A2 A1 A1 Planar adaptive Planar adaptive Fully adaptive Partially Adaptive Routing

  14. Adaptive Routing in Two Dimensions 0 1 2 3 0 1 2 3 4 5 6 7 4 5 6 7 8 9 10 11 8 9 10 11 12 13 14 15 12 13 14 15 Decreasing Network Increasing Network Di+1 Di Partially Adaptive Routing

  15. PAR in Multidimensional Networks • Routing is fully adaptive in a plane • When can you skip a plane? A0 Dimension i+2 Dimension i Dimension i+1 A1 Partially Adaptive Routing

  16. PAR Properties • Each plane is comprised of the following channels Ai = di,2 + di+1,0 + di+1,1 • Three virtual channels/link in meshes and six virtual channels/link in Tori Partially Adaptive Routing

  17. The Turn Model • What is a turn? • From one dimension to another : 90 degree turn • To another virtual channel in the same direction: 0 degree turn • To the reverse direction: 180 degree turn • Turns combine to form cycles • Goal: prohibit the least number of turns to break all possible cycles abstract cycles XY routing west-first routing Partially Adaptive Routing

  18. Turn Constraints • Choice of prohibited turns is not arbitrary • Alternative designs • Three combinations unique (within symmetry) • Three algorithms: west-first, north-last, negative-first equivalent Partially Adaptive Routing

  19. West First Routing deterministic region fully adaptive region • Fully adaptive to the east, deterministic to the west (for non-minimal routing) • Non-minimal is partially adaptive to the west Partially Adaptive Routing

  20. Generalization of the Turn Model • Identify channel classes and prohibit turns between them • Cycles are infeasible within a channel class • Transitions between channel classes are acyclic • Partially adaptive: number of shortest paths are reduced • Application to Binary hypercubes • Base is e-cube routing • Identify up channels and down channels • Adaptively route though one class and then the other • Turns prohibited from one class to the other Partially Adaptive Routing

  21. Fully Adaptive Routing • Using resources in the form of buffers, channels and networks • Migration from initial proposals to more efficient implementations Fully Adaptive Routing

  22. Structured Buffer Pools • Positive hop algorithm • D+1 buffers at each node (D = diameter) • Nodes request/use buffers in strictly increasing order • Minimal path algorithm, valid for any topology • Large buffer requirements: O(Diameter) buffer D-1 buffer 1 buffer 0 Fully Adaptive Routing

  23. Structured Buffer Pools: Extension set 0 set 1 subset 0 subset 1 subset S-1 • Negative hop algorithm • Partition nodes into non-adjacent subsets • Order subsets • Down transitions request higher numbered buffer, else same numbered buffer • Number of buffers required in each node is given by + 1 Fully Adaptive Routing

  24. Extensions to Wormhole Switching replace central buffers with equivalent number of virtual channels across each physical channel Acyclic central buffer dependencies are transformed into acyclic virtual channel dependencies • Basic version produces unbalanced used of virtual channels • distance rarely equal to diameter • Extension: bonus cards. • Number is equal to unused hops: diameter - #req • Use this number to increase the number of choices of virtual channels at any node • Not the same as adaptivity Fully Adaptive Routing

  25. Virtual Networks • Establish multiple virtual networks • Each network works for a specific destination set • Routing functions are acyclic, but typically not connected • Establish constraints between virtual networks Fully Adaptive Routing

  26. Virtual Networks in a Mesh 0 1 2 3 0 1 2 3 Y 4 5 6 7 4 5 6 7 X 8 9 10 11 8 9 10 11 12 13 14 15 12 13 14 15 X+Y+ X-Y+ • Each virtual network is constructed to have acyclic channel dependencies • Routing function in a virtual network is not connected • Packets are injected into the appropriate virtual network • Fully adaptive, no transitions between networks • 2n virtual networks with (n.2n) virtual channels/node Fully Adaptive Routing

  27. Optimize • Reduce the number of networks by 50% with one additional channel/network • Extensions to k-ary n-cubes by introducing levels in each virtual network • One level for each wrap-around channel • (n+1).(n+1).2(n-1) virtual channels/node for dimensions >0 • See Figure 4.20 0 1 2 3 0 1 2 3 4 5 6 7 4 5 6 7 8 9 10 11 8 9 10 11 12 13 14 15 12 13 14 15 Virtual network 0 Virtual network 1 Fully Adaptive Routing

  28. Extensions to Tori • Addition of layers (virtual networks) for each wrap-around connection • Number of layers increases by #dimensions Fully Adaptive Routing

  29. Deadlock Avoidance via Message Dependencies • Two virtual channel classes across each physical link • Adaptive channels & deterministic channels • Fully adaptive use of adaptive channels • Keep track of #dimension reversals for each message • Moving from a dimension p to a lower dimension q • Label each channel with the DR# of the message • Messages cannot block on a channel with lower DR# • If no channel available, permanent transition to the deterministic channel • Dependencies between messages are acyclic Fully Adaptive Routing

  30. Summary of Design Techniques • Ordered use of topological features • Dimensions • Packaged components • Paths • Ordered use of resources • Buffers • Channels • Order the message population • Each message is uniquely identified by some attribute, e.g., number of wrap-around channel crossings • Order blocking based on message population membership

  31. Design Methodology • Start with a network, set of channels C1, and routing function R1 • R1is connected and deadlock free and may be deterministic/adaptive, minimal/non-minimal • Split each physical channel into a set of additional virtual channels and define the new routing function • Set of channels includes escape channels and adaptive channels • Selection function can be defined in many ways • For wormhole switching, verify that the extended channel dependency graph is acyclic: likely if R is restricted to minimal paths

  32. Example Binary Hypercube • Start with dimension order e-cube algorithm • Add additional channels for adaptive routing 2 3 6 7 4 5 1 0

  33. Maximally Adaptive Routing • Establish a relationship between routing freedom and resources • Maximize adaptivity for fix resources • Minimize resources for target adaptivity • Relationship between adaptivity and performance • Not obvious • Unbalanced use of physical or virtual channel resources Maximally Adaptive Routing

  34. In 2D Meshes: Double Y 0 1 2 3 0 1 2 3 Y2 Y1 Y2 4 5 6 7 4 5 6 7 6 Y1 8 9 10 11 8 9 10 11 12 13 14 15 12 13 14 15 increasing network decreasing network X- Y1+ Y2+ X+ X- Y2+ Y1+ X+ Y1- X- Y2- X- Y1- X+ Y2- X+ Maximally Adaptive Routing

  35. In 2D Meshes: Mad-Y permitted Y2 X- Y1+ Y2+ X+ X- Y2+ Y1+ X+ 6 Y1- X- Y2- X- Y1- X+ Y2- X+ Y1 No coupling between Y2 and Y1 • Permit turns • From the Y1 channels to the X+ channels • From X- channels to Y2 channels • Remove unnecessary turn restrictions • Still overly restrictive! Maximally Adaptive Routing

  36. In 2D Meshes: Opt Y Y2+ X+ X- Y2+ Y2+ Y1+ Y1- Y2- Y1+ X+ X- Y1+ X- Y1- Y1- X- Y2- Y2- Y1- X+ Y2- X+ Y1+ Y2+ • Further reduce the number of restrictions • Only restrict turns from Y1 to X- • Turns from X- to Y1 and 0-degree turns in Y only when X offset is 0 or positive • Extensions to multidimensional meshes • Basic idea: fully adaptive routing in one set of channels, and dimension order in the other set until specified lower dimension traversals are complete Maximally Adaptive Routing

  37. Routing with Minimum Buffer Requirements • Key Idea: • Organize packet traffic into disjoint groups that use separate buffers in each node • Place acyclic routing restrictions in buffer usage • Based on node orderings Maximally Adaptive Routing

  38. 15 14 13 12 11 10 9 8 0 15 0 1 14 1 12 2 3 2 13 3 7 6 5 4 11 4 4 5 10 5 7 6 8 7 6 9 3 2 1 0 3 12 8 9 2 13 0 15 10 11 1 14 12 8 7 13 6 9 14 4 11 15 5 10 Node Labeling for 2D Torus left increasing node ordering right increasing node ordering inside increasing node ordering outside increasing node ordering Maximally Adaptive Routing

  39. Algorithm 1 • Algorithm • Packet moves from the injection queue to the A queue • Stay in the A queues as long as we can move to right along at least one dimension along a minimal path • Transition to the B queues under same rule for left traversals • Transition to the C queue and remain there until packet is delivered • Note the de-coupling of node labeling from buffer labeling Maximally Adaptive Routing

  40. Application • Orderings analogous to virtual planes • Note the orderings are acyclic • Extensions to edge buffers • Check Algorithm 2 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Maximally Adaptive Routing

  41. True Fully Adaptive Routing • Adaptivity extends across physical and virtual channels • Deadlock recovery vs. deadlock avoidance Maximally Adaptive Routing

  42. Non-minimal Routing • Non-minimal routing • Wormhole degrades performance while VCT has less secondary effects • Fault tolerance is the main motivator • Classes • Backtracking • Randomized routing and the Chaos router Non-Minimal Routing

  43. Backtracking Protocols • Backtracking search + resource reservation • Constrain the search • Minimal paths vs. #misroutes Non-Minimal Routing

  44. Optimization • Sensitive to choice of switching technique • Naturally suited to circuit switching and pipelined circuit switching • Overhead is large with SAF • Deadlock is avoided by not blocking on busy channels • Livelock is avoided by maintaining and using search history • In the header: large headers • In the routers: local state, headers comparable to e-cube • Protocol variations • Multi-links • k-family • exhaustive: profitable and misrouting • limited misrouting • multi-phase Non-Minimal Routing

  45. 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 Routing in MINs • “Square” vs. non-square MINs vs. dilated MINs • Permutation routing and centralized control • Message routing, distributed control, and contention • Basic elements of a logkN network and topological equivalence • Single source destination path • Logarithmic delay Routing in MINs

  46. The Blocking Condition sn-1,sn-2,…,s2,s1,s0,dn-1,dn-2,…,d2,d1,d0 rn-1,rn-2,…,r2,r1,r0,tn-1,tn-2,…,t2,t1,t0 • Addresses of ports at intermediate switches are computed from the source-destination addresses • Blocking condition: two paths collide iff they compete for the same link at any stage Routing in MINs

  47. Self Routed MINs Routing in MINs

  48. Self Routed MINs (cont.) • Self routing property • Routing decision a function of only the destination • Computation of destination routing tag tn-1,tn-2,…,t2,t1,t0 • ti = di+10 <= i <= n-2, and tn-2 = d0 for butterfly MINs • ti = dn-i-10 <= i <= n-1 for Omega and Cube networks Routing in MINs

  49. Self Routed MINs: example Routing in MINs

  50. Routing in Bidirectional MINs • Routing uses the function FirstDifference(S,D) • Identifies the nearest stage to “turnaround” • Multiple choices of switches at last stage • Can randomize forward path selection Routing in MINs

More Related