Module 17: "Interconnection Networks"
  Lecture 38: "Routing Algorithms"
 

Deadlock avoidance

  • Multiple virtual channels per port
    • Break the dependence cycle
    • Allocate virtual channels according to source and destination of packets
  • Up*-Down* routing
    • Applies to indirect networks only
    • Logically treat the topology as a spanning tree with processors at leaves
    • Route up to common ancestor and then down
    • No cycles involved
    • Comes for free in trees, fat trees, Butterflies
  • Turn model
    • Attacks the fundamental problem: the turns
    • In a 2D mesh there are eight possible turns and that form two different types of cycles (4 turns each)
    • Restrict the use of turns
    • Avoid one turn each from these two cycles: 16 possibilities
    • Out of these 16, 12 are deadlock free
    • West-first: avoids +y to –x and –y to –x turns i.e. cannot turn west
    • North-last: avoids +y to –x and +y to +x turns i.e. cannot turn from north
    • Negative-first: offers a set of choices
    • Dimension order routing is inherently deadlock-free because it disallows all y to x turns (too restrictive)

Adaptive routing

  • For fault tolerance and better network utilization
    • Tremendous contention in 2D mesh with DOR for transpose traffic or for accessing locks allocated on a corner node
    • Adaptive routing can make use of other available paths and introduce more concurrency
    • Main idea: decide the next output port dynamically based on switch state (locally or globally gathered)
    • Fully vs. partially adaptive: allow all or some paths
    • Minimal vs. non-minimal adaptive: allow only shortest paths (i.e. hop count goes down monotonically) or allow arbitrary paths
    • Hot-potato routing: example of non-minimal adaptive; misroute one of the contending packets
  • Multipath routing
    • A special case of adaptive routing where the decision is static
    • Source-based multipath: source chooses the entire path from the legal set of paths
    • Table-based multipath: routing table provides multiple possible output ports programmed at boot time
  • Deadlock avoidance
    • Non-minimal adaptive routing is prone to deadlocks
    • Normal trick is to have a deadlock-free virtual network called the escape route
    • Livelock is a bigger problem: with hot-potato routing a packet may keep on moving around the same path never getting to the destination