1 / 86

Switching

Switching. Lecture 1. Switch Architecture. Inter connection between N input links and N output links. Switch Arbiter. O/p lines. I/p lines. 1. 2. 1. 3. 2. 3. 4. 4. 5. 5. O/p adapters. I/p adapters. Switch fabric. Switch Fabric. I/p lines. O/p lines. Cross bar. Switch Types.

ally
Download Presentation

Switching

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. Switching Lecture 1

  2. Switch Architecture Inter connection between N input links and N output links Switch Arbiter O/p lines I/p lines 1 2 1 3 2 3 4 4 5 5 O/p adapters I/p adapters Switch fabric

  3. Switch Fabric I/p lines O/p lines Cross bar

  4. Switch Types Single staged Multi Staged

  5. Input Queued • Packets stored at the input • Switch speed = line speed • Any combination of packets can be transferred across a switch as long as the input and output terminals do not overlap (Matching) • 1-3, 2-1 allowed, 1-2, 3-2 not allowed, 1-4, 1-5 not allowed • Output Queued • Packets stored at the output • Switch speed = N * line speed (speedup = N) • Any N packets intended for an output can be transferred to the output simultaneously, 1-2, 3-2 allowed

  6. Combined Input Output Queued • Packets stored at both input and output • Speedup between 1 and N • Shared Memory Switch • Packets stored in the switch fabric; every output line reads the paper as and when they are transmitted

  7. Switch Performance Metric • Throughput • Rate vector comprising of rate of transmission of packets across each output (r1,….rN) • Delay Vector • Delay between packet transmission from input to output

  8. Input Queued Switch rij is the average number of packets arriving at input line i for output line j Let an output line serve one packet each slot i rij 1 for each j (output contention) j rij 1 for each i (input contention)

  9. Output Queued switch j rij 1 for each i (input contention) i rij N for each j (output contention)? Redundant constraint

  10. Combined Input Output Queued Switch j rij 1 for each i (input contention) i rij  k for each j (output contention) speedup k

  11. Shared memory switch Constraints just like output queued switch • Less packet loss due to statistical multiplexing of buffer memory • Output queued switch loses packet if any single output buffer overflows, even if there is additional space in other output buffers • Shared memory switches share all buffers and will overflow only if the combined buffers overflow

  12. Scheduling for Input Queued Switch Choice of matchings determine whether any throughput can be attained as long as the constraints are satisfied • FIFO scheduling • Every input maintains a queue of packets • Transfer the first packet of each queue subject to matching constraints

  13. HOL Contention 2 4 1 4 2 3 4 1 2 3 4 Only one packet can be transferred across the switch

  14. 4 2 1 4 2 3 4 1 2 3 4 Two packets can be transferred across the switch

  15. Input constraints allow (jj rij 1 )/N close to 1 (rate of transfer of packets across the switch per line) • Under FIFO scheduling this number is upper bounded by 0.586 • Penalty of HoL blocking • Proof

  16. Lookahead scheduling First, schedule among the head of line packets in each input queue If an input does not transfer packet but has a packet, see whether the second packet can be scheduled This can be generalized to considering the first w packets in each queue

  17. 2 4 1 4 2 3 4 1 2 3 4 At the first cut 2-4 is scheduled, then look at the second packet in queue 1 and schedule 1-2

  18. Lookahead performance (jj rij 1 )/N increases with increase in w, but the limiting value for w is strictly less than 1 • Queueing in High-Performance Packet Switching • Hluchyj and Karol, IEEE JSAC December 88, Vol 6, No. 9

  19. Achieving 100 % Throughput in Input Queued Switch • 100 % throughput is said to be attained if the switch is able to sustain any arrival process as long as the rate constraints are satisfied, • This will allow (jj rij 1 )/N close to 1 ``Achieving 100 % Throughput in Input Queued Switch,’’ Mckeown et al, INFOCOM 95 ``Stability properties of constrained queueing systems and scheduling for maximum throughput in multihop radio networks,’’ Tassiulas and Ephremides, IEEE Trans of Automatic Control, Vol. 37, No. 12, pp. 1936-1949, 1992

  20. Maximum weighted matching based scheduling Every input maintains separate logical queues for each output Weight of each queue is the queue length Serve the packets from the queues which form a maximum weighted matching Weight of a matching is the sum of weights of the queues in the matching

  21. 4 4 4 2 1 2 Schedules 1-4 4 3 4 1 2 3 4 Possible matchings are 1-2, 2-4, weight = 2 1-4, weight = 3 1-2, weight = 1 2-4, weight = 1

  22. Maximum weighted matching based scheduling gives priority to long queues, and also tries to schedule a large number of queues, but may not always schedule the largest possible number of queues Proof for optimality

  23. Lecture 2

  24. Proof for FIFO throughput • Queueing in High-Performance Packet Switching • Hluchyj and Karol, IEEE JSAC December 88, Vol 6, No. 9 • Assumptions: • Input queues saturated, that is packets are always waiting at the input queues • Inputs can be selected with equal probability for each output • Suppose a new packet reaches the HOL position of an input queue, then its destination is a specific output queue with equal probability as any other output queue (1/N)

  25. Notations Bim Number of packets at the heads of the input queue destined for the ith output in the mth slot, but not selected for it. Aim Number of packets moving to the heads of the input queue destined for the ith output in the mth slot Fm Number of packets transmitted through the switch in the mth slot (expected value: F)  Expected number of packets passing through the switch per slot per output line (F/N)

  26. Bim = max(0, Bim-1 + Aim –1) Eqn 1 Aim is binomial (Fm-1, 1/N) For large N, binomial (Fm-1, 1/N) is Poisson(F/N) Thus the dynamics of Eqn 1 resembles a queueing system (M/D/1) where Aim is the arrival process, Poisson(), Bim is the number of packets in the queue. From standard M/D/1 result, expected value of Bim is 2/2(1- )

  27. Fm-1 = N - i Bim-1 Dividing both sides by N, and taking expectations we have  = 1 – expected value of Bi  = 1 - 2/2(1- ) Solving for ,  = 2 - 2

  28. Proof of optimality of the maximum weighted matching algorithm for input queues

  29. Preview of Markov Process • A sequence of random variables X1 , X2,….,Xn ,….. such that • Xi+1 is independent of X1,….Xi-1 given Xi • Pr(Xi+1 = ai+1/ Xi = ai, …., X1 = a1) = Pr(Xi+1 = ai+1/ Xi = ai ) • Discrete time discrete state markov chain • So a markov chain evolution can be specified by • Initial states • Transition probabilities Pr(Xi+1 = ai+1/ Xi = ai ) = pi,i+1

  30. 2 1.0 A state a is open if it communicates to some other state which does not communicate to a, e.g., {2} 0.5 1 0 0.5 0.5 0.5 State A communicates with state B if there is a positive probability path from A to B A set of states is closed if all states in the set communicate with each other, and no state in the set communicates to any state outside the set, e.g., {0, 1}

  31. 0.5 1 0 0.5 0.5 0.5 1.0 1 0 1.0 A state has a period d if the process can only return to this state in intervals which are multiples of d More precisely, di is the g.c.d. of {k: pi ik> 0}, Where pi ikis Pr(Xk = i/ X0 = i) d0= 1 d0= 2

  32. Period of any two communicating states are equal A state is aperiodic if its period is 1 • Consider a function of the states f(x) • Ef(x) = x p(x)f(x)

  33. Consider the input queueing system Let the system have random arrivals, i.e., the number of arrivals for the different sessions is random • Arrival process for each input-output pair is i.i.d (independent and identically distributed) • Number of arrivals of i-j in slot t is independent of the number of arrivals of any other pair in past or future slots, and also independent of the number of arrivals of any other pair in the same slot Probability that a packet arrives for i-j in any slot t is qij

  34. Under this assumption the queue length process at the nodes (values of the Bij(t) s for all pairs i-j) constitute a markov process Under maximum weighted matching, this markov chain consists of one closed set with periodicity 1 (check it!) • Let f(x) be the total number of packets in the input queues in state x • Ef(x) = x p(x)f(x) A scheduling strategy is said to be optimum if it attains finite expected queue length as long as any other strategy attains it.

  35. If the system is markov with an aperiodic closed set, and other open states, and Suppose we can find a scalar function V(x) of vector x such that E(V(B(t + 1))- V(B(t)) / B(t) = x)  0 for all states x, except a finite number of states and V(x) 0 for all states x, (negative drift condition) Meyn and Tweedie, Book Then the probability distribution of the markov chain converges to a probability distribution with finite expectation • Assume that the expected arrival rates satisfy the rate constraints for the input queued switch, • we will show that the negative drift condition is satisfied

  36. The function V(x) we choose is ixi2 Notations: B(t) Vector of queue lengths in slot t (column vector) A(t) Vector of arrivals in slot t B(t) Vector of departures in slot t B(t+1) = B(t) + A(t+1) – D(t+1) V(B(t + 1))- V(B(t)) = (B(t + 1) - B(t))T (B(t + 1) + B(t)) = (A(t+1) - D(t+1))T (A(t+1) + D(t+1) + B(t)) = (A(t+1) - D(t+1))T (A(t+1) + D(t+1)) + (A(t+1) - D(t+1))T B(t)

  37. E[V(B(t + 1))- V(B(t))/ B(t) = x] =E[(A(t+1) - D(t+1))T (A(t+1) + D(t+1))/ B(t) = x] + E[(A(t+1) - D(t+1))T B(t)/B(t) = x] The first term in the summation can be upper bounded by a positive constant since the expected arrivals in slot t + 1 are finite and independent of the queue lengths in slot t, the expected departure from each pair is at most 1 and at least 0

  38. E[(A(t+1))T B(t)/B(t) = x] = aTx a = i i Mi (using rate constraints) where M is a matching vector and i i  1, i 0 aTx = i i weight of matching i under x  (i i ) weight of maximum weight matching under x E[(D(t+1))T B(t)/B(t) = x] = weight of maximum weight matching under x E[(A(t+1) - D(t+1))T B(t)/B(t) = x]  ((i i ) - 1) weight of maximum weight matching under x

  39. Depending on state x, this can become as highly negative as desired Thus the negative drift condition holds except for a finite number of states.

  40. Performance Difference Between Input and Output Queues Note that input queued switch has additional rate constraints at the output (as compared to output queued switches) For output line stability these constraints will eventually arise in output queued switches as well. Thus throughput wise under maximum weighted matching input and output queued switches perform similarly.

  41. Delay performances can be different because of the nature of constraints. Can an input queued switch emulate an output queued switch? Lecture 12, TCOM 799, Fall 01

  42. Lecture 13 Computationally Simple Algorithms for Maximum possible throughput in input queued switches

  43. Implementational complexity Maximum weighted matching will require the arbiter to know the instantaneous queue lengths and then computing the maximum weighted matching. Will there be a loss in throughput if the scheduling is as per the maximum weighted matching in a previous slot? Not, as long as the delay is finite and the maximum number of arrivals are upper bounded in a slot

  44. The proof for throughput optimality uses properties of maximum weight matching in computing the following value E[(D(t+1))T B(t)/B(t) = x] = weight of maximum weight matching under x If D(t+1) is not a maximum weight matching, then (D(t+1))T B(t) differs from the weight matching by at most a constant provided the maximum number of arrivals in any slot is finite. The result follows.

  45. Computational complexity A maximum weighted matching can now be computed once in a certain interval, and used throughout the interval without any loss in throughput. O notation Maximum weighted matchings can be computed in bipartite graphs in O(N3 log N)

  46. Other low complexity matchings • Maximum size matchings • Low throughput for nonuniform arrival rates Computation can become simpler for maximum weight matchings with weight no longer the queue lengths • "A Practical Scheduling Algorithm to Achieve 100% Throughput in Input-Queued Switches." Adisak Mekkittikul, and Nick McKeown IEEE Infocom 98, Vol 2, pp. 792-799, April 1998, San Francisco.

  47. Choose a maximum weight matching where the Weight of a pair is now the sum of the queue lengths at the input and the output ports for the pair. This is also a maximum size matching. Simpler algorithms for computing maximum size matchings can be used to compute this maximum weight matching in O(N2.5 )

  48. Proof for optimality Consider a symmetric matrix T (N2 X N2) such that maxmatching M MTB(t) is not upper bounded by a constant . Then the scheduling policy which schedules the matching M which maximizes the above every slot is also throughput optimal T can be chosen suitably to reduce the complexity of computing such a optimal matching

  49. Examples of T • Identity matrix • Maximum weight matching with weight = queue length Tij = 2 if i = j 1 if i/N = j/N 1 if i mod N = j mod N 0 otherwise Maximum weight matching with weight of a pair is now the sum of the queue lengths at the input and the output ports for the pair Can there be a T to represent maximum size matching?

  50. Proof for optimality The function V(x) we choose is XTX V(B(t + 1))- V(B(t)) = (B(t + 1) - B(t))T T(B(t + 1) + B(t)) = (A(t+1) - D(t+1))T T(A(t+1) + D(t+1) + 2B(t)) = (A(t+1) - D(t+1))T T(A(t+1) + D(t+1)) +2 (A(t+1) - D(t+1))T TB(t)

More Related