Switching Lecture 1. Switch Architecture Inter connection between N input links and N output links Switch fabric I/p lines O/p lines I/p adapters O/p.

Slides:



Advertisements
Similar presentations
1 IK1500 Communication Systems IK1330 Lecture 3: Networking Anders Västberg
Advertisements

Network Utility Maximization over Partially Observable Markov Channels 1 1 Channel State 1 = ? Channel State 2 = ? Channel State 3 = ? Restless.
Lecture 12. Emulating the Output Queue So far we have shown that it is possible to obtain the same throughput with input queueing as with output queueing.
Tradeoffs between performance guarantee and complexity for distributed scheduling in wireless networks Saswati Sarkar University of Pennsylvania Communication.
EE 685 presentation Optimal Control of Wireless Networks with Finite Buffers By Long Bao Le, Eytan Modiano and Ness B. Shroff.
DYNAMIC POWER ALLOCATION AND ROUTING FOR TIME-VARYING WIRELESS NETWORKS Michael J. Neely, Eytan Modiano and Charles E.Rohrs Presented by Ruogu Li Department.
Discrete Time Markov Chains
Entropy Rates of a Stochastic Process
Lecture 13 – Continuous-Time Markov Chains
Kuang-Hao Liu et al Presented by Xin Che 11/18/09.
Nick McKeown CS244 Lecture 6 Packet Switches. What you said The very premise of the paper was a bit of an eye- opener for me, for previously I had never.
What's inside a router? We have yet to consider the switching function of a router - the actual transfer of datagrams from a router's incoming links to.
Worst-case Fair Weighted Fair Queueing (WF²Q) by Jon C.R. Bennett & Hui Zhang Presented by Vitali Greenberg.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Review.
Lecture 9. Unconstrained Optimization Need to maximize a function f(x), where x is a scalar or a vector x = (x 1, x 2 ) f(x) = -x x 2 2 f(x) = -(x-a)
Algorithm Orals Algorithm Qualifying Examination Orals Achieving 100% Throughput in IQ/CIOQ Switches using Maximum Size and Maximal Matching Algorithms.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Performance analysis for high speed switches Lecture 6.
*Sponsored in part by the DARPA IT-MANET Program, NSF OCE Opportunistic Scheduling with Reliability Guarantees in Cognitive Radio Networks Rahul.
Lecture 3. Preview of Markov Process A sequence of random variables X 1, X 2,….,X n,….. such that –X i+1 is independent of X 1,….X i-1 given X i –Pr(X.
April 10, HOL Blocking analysis based on: Broadband Integrated Networks by Mischa Schwartz.
TCOM 501: Networking Theory & Fundamentals
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Input-Queued.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion The.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
A Fair Scheduling Policy for Wireless Channels with Intermittent Connectivity Saswati Sarkar Department of Electrical and Systems Engineering University.
1 40 th Annual CISS 2006 Conference on Information Sciences and Systems Some Optimization Trade-offs in Wireless Network Coding Yalin E. Sagduyu Anthony.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer Performance.
1 Achieving 100% throughput Where we are in the course… 1. Switch model 2. Uniform traffic  Technique: Uniform schedule (easy) 3. Non-uniform traffic,
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Lecture 8. Why do we need residual networks? Residual networks allow one to reverse flows if necessary. If we have taken a bad path then residual networks.
Analysis of Input Queueing More complex system to analyze than output queueing case. In order to analyze it, we make a simplifying assumption of "heavy.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Scheduling.
Pipelined Two Step Iterative Matching Algorithms for CIOQ Crossbar Switches Deng Pan and Yuanyuan Yang State University of New York, Stony Brook.
Localized Asynchronous Packet Scheduling for Buffered Crossbar Switches Deng Pan and Yuanyuan Yang State University of New York Stony Brook.
Buffer Management for Shared- Memory ATM Switches Written By: Mutlu Apraci John A.Copelan Georgia Institute of Technology Presented By: Yan Huang.
Lesson 11: Solved M/G/1 Exercises
Flow Models and Optimal Routing. How can we evaluate the performance of a routing algorithm –quantify how well they do –use arrival rates at nodes and.
Load Balanced Birkhoff-von Neumann Switches
Belgrade University Aleksandra Smiljanić: High-Capacity Switching Switches with Input Buffers (Cisco)
ATM SWITCHING. SWITCHING A Switch is a network element that transfer packet from Input port to output port. A Switch is a network element that transfer.
Delay Analysis for Maximal Scheduling in Wireless Networks with Bursty Traffic Michael J. Neely University of Southern California INFOCOM 2008, Phoenix,
MIT Fun queues for MIT The importance of queues When do queues appear? –Systems in which some serving entities provide some service in a shared.
Message-Passing for Wireless Scheduling: an Experimental Study Paolo Giaccone (Politecnico di Torino) Devavrat Shah (MIT) ICCCN 2010 – Zurich August 2.
CS774. Markov Random Field : Theory and Application Lecture 21 Kyomin Jung KAIST Nov
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Markov Decision Processes1 Definitions; Stationary policies; Value improvement algorithm, Policy improvement algorithm, and linear programming for discounted.
Solution to HW1. Problem 1 Need to find shortest path from a single source s to a single destination d. Have a condition in the Dijkstra algo loop which.
1 IK1500 Communication Systems IK1500 Anders Västberg
ISLIP Switch Scheduler Ali Mohammad Zareh Bidoki April 2002.
Markov Chains and Random Walks. Def: A stochastic process X={X(t),t ∈ T} is a collection of random variables. If T is a countable set, say T={0,1,2, …
Information Theory for Mobile Ad-Hoc Networks (ITMANET): The FLoWS Project Competitive Scheduling in Wireless Networks with Correlated Channel State Ozan.
Belgrade University Aleksandra Smiljanić: High-Capacity Switching Switches with Input Buffers (Cisco)
Constructions of Optical Priority Queues Jay Cheng Department of Electrical Engineering & Institute of Communications Engineering National Tsing Hua University.
Order Optimal Delay for Opportunistic Scheduling In Multi-User Wireless Uplinks and Downlinks Michael J. Neely University of Southern California
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
Buffered Crossbars With Performance Guarantees Shang-Tse (Da) Chuang Cisco Systems EE384Y Thursday, April 27, 2006.
Stochastic Optimization for Markov Modulated Networks with Application to Delay Constrained Wireless Scheduling Michael J. Neely University of Southern.
2/14/2016  A. Orda, A. Segall, 1 Queueing Networks M nodes external arrival rate (Poisson) service rate in each node (exponential) upon service completion.
1 Buffering Strategies in ATM Switches Carey Williamson Department of Computer Science University of Calgary.
Energy Optimal Control for Time Varying Wireless Networks Michael J. Neely University of Southern California
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
scheduling for local-area networks”
New Characterizations in Turnstile Streams with Applications
Packet Forwarding.
Lecture on Markov Chain
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Buffer Management for Shared-Memory ATM Switches
Javad Ghaderi, Tianxiong Ji and R. Srikant
Switch Performance Analysis and Design Improvements
Presentation transcript:

Switching Lecture 1

Switch Architecture Inter connection between N input links and N output links Switch fabric I/p lines O/p lines I/p adapters O/p adapters Switch Arbiter

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

Switch Types Single staged Multi Staged

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

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

Switch Performance Metric Throughput Rate vector comprising of rate of transmission of packets across each output (r 1,….r N ) Delay Vector Delay between packet transmission from input to output

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

Output Queued switch  j r ij  1 for each i (input contention)  i r ij  N for each j (output contention)? Redundant constraint

Combined Input Output Queued Switch  j r ij  1 for each i (input contention)  i r ij  k for each j (output contention) speedup k

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

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

Only one packet can be transferred across the switch HOL Contention

Two packets can be transferred across the switch

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

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

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

Lookahead performance (  j  j r ij  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

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 r ij  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 , 1992

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

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

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

Lecture 2

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)

Notations B im Number of packets at the heads of the input queue destined for the ith output in the mth slot, but not selected for it. A im Number of packets moving to the heads of the input queue destined for the ith output in the mth slot F m 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)

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

F m-1 = N -  i B im-1 Dividing both sides by N, and taking expectations we have  = 1 – expected value of B i  = 1 -  2 /2(1-  ) Solving for ,  = 2 -  2

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

Preview of Markov Process A sequence of random variables X 1, X 2,….,X n,….. such that –X i+1 is independent of X 1,….X i-1 given X i –Pr(X i+1 = a i+1 / X i = a i, …., X 1 = a 1 ) = Pr(X i+1 = a i+1 / X i = a i ) Discrete time discrete state markov chain So a markov chain evolution can be specified by –Initial states –Transition probabilities Pr(X i+1 = a i+1 / X i = a i ) = p i,i+1

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} A state a is open if it communicates to some other state which does not communicate to a, e.g., {2} 2 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, d i is the g.c.d. of {k: p i i k > 0}, Where p i i k is Pr( X k = i/ X 0 = i) d 0 = d 0 = 2

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)

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 q ij

Under this assumption the queue length process at the nodes (values of the B ij (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.

Then the probability distribution of the markov chain converges to a probability distribution with finite expectation 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 If the system is markov with an aperiodic closed set, and other open states, and 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

The function V(x) we choose is  i x i 2 B(t+1) = B(t) + A(t+1) – D(t+1) 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 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)

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

E[(A(t+1)) T B(t)/ B(t) = x] = a T x a =  i  i M i (using rate constraints) where M is a matching vector and  i  i  1,  i  0 a T x =  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

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.

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.

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

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

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

E[(D(t+1)) T B(t)/ B(t) = x] = weight of maximum weight matching under x The proof for throughput optimality uses properties of maximum weight matching in computing the following value 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.

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

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 , April 1998, San Francisco.

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(N 2.5 )

Proof for optimality Consider a symmetric matrix T (N 2 X N 2 ) such that max matching 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

Examples of T Identity matrix Maximum weight matching with weight = queue length T ij = 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?

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)

E[V(B(t + 1))- V(B(t))/ B(t) = x] =E[(A(t+1) - D(t+1)) T T(A(t+1) + D(t+1))/ B(t) = x] + 2E[(A(t+1) - D(t+1)) T TB(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

E[(A(t+1)) T TB(t)/ B(t) = x] = a T Tx a =  i  i M i (using rate constraints) where M is a matching vector and  i  i  1,  i  0 a T Tx =  i  i M i Tx  (  i  i ) max matching M MTx E[(D(t+1)) T TB(t)/ B(t) = x] = max matching M MTx E[(A(t+1) - D(t+1)) T T B(t)/ B(t) = x]  ((  i  i ) - 1) max matching M MTx This can be as negative as desired for suitable x, result holds

Linear complexity algorithms “Linear complexity algorithms for maximum throughput in radio networks and input queued switches" Leandros Tassiulas IEEE Infocom 98, Vol 2,April 1998, San Francisco. Randomized algorithms Choose the schedule randomly with a probability distribution which depends on the queue lengths

Maximum weighted matching chooses the matching M which attains max matching M Mx when the queue length vector is x The randomized algorithm chooses schedules with a certain probability, the distribution is such that the probability of choosing the maximum weighted matching is at least , where  can be pre-selected as any number between 0 and 1. Example choice: include each pair independently with probability 0.5 if the choice is not a matching dont include any edge probability of choosing any matching is 2 -(N*N)

Let this schedule be I Let I(t) = I if B(t)I  B(t)I(t-1) = I(t-1) otherwise The policy will be to schedule I(t) in each slot Markov process representation is Y(t) = (B(t), I(t)) B(t+1) = B(t) + A(t+1) – I(t)

Proof of optimality Let I B(t) be the maximum weighted matching vector for queue lengths B(t) V(Y) = V 1 (Y) + V 2 (Y) V 1 (Y) =  i b i 2 V 2 (Y) = ((I B -I) T B) 2

V 1 (Y(t + 1))- V 1 (Y(t)) = (B(t + 1) - B(t)) T (B(t + 1) + B(t)) = (A(t+1) - I(t)) T (A(t+1) + I(t) + 2B(t)) = (A(t+1) - I(t)) T (A(t+1) + I(t)) +2 (A(t+1) - I(t)) T B(t) (A(t+1) - I(t)) T B(t) = (A(t+1) – I B(t) ) T B(t) + (I B(t) – I(t)) T B(t) E[(A(t+1) - I B(t) ) T B(t)/ Y(t) = Y ]  ((  i  i ) - 1) wt of maximum Matching under B(t)  (1/N)(  i  i ) - 1)  V 1 (Y)

E[(A(t+1) - I(t)) T (A(t+1) + I(t))/ Y(t) ] = constant E[(I B(t) - I(t+1)) T B(t)/ Y(t) = Y] =  V 2 (Y) E[V 1 (Y(t + 1))- V 1 (Y(t))/ Y(t) ]  2(1/N)((  i  i ) - 1)  V 1 (Y) + 2  V 2 (Y) + constant

E[V 2 (Y(t + 1))/ Y(t) = Y] = 0. P[I(t+1) = I B(t+1) ] + E[V 2 (Y(t + 1))/ Y(t)=Y, I B(t+1)  I(t+1) ] P[I(t+1)  I B(t+1) ]  (1-  ) E[((I B(t+1) – I(t+1)) T B(t+1)) 2 / Y(t), I B(t+1)  I(t) ] E[((I B(t+1) – I(t+1)) T B(t+1)) 2 / Y(t), I B(t+1)  I(t+1) ] = E[((I B(t+1) – I(t+1)) T (B(t) + A(t+1) – I(t)) 2 / Y(t), I B(t+1)  I(t+1) ] = E[((I B(t+1) ) T B(t) - (I(t+1)) T B(t) + (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) 2 / Y(t), I B(t+1)  I(t+1) ]

(I B(t+1) ) T B(t)  (I B(t) ) T B(t) (I(t+1)) T B(t)  I(t) T B(t) E[((I B(t+1) ) T B(t) - (I(t+1)) T B(t) + (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) 2 / Y(t), I B(t+1)  I(t+1) ]  E[((I B(t) ) T B(t) - (I(t)) T B(t) + (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) 2 / Y(t), I B(t+1)  I(t+1) ] = E [((I B(t) – I(t)) T B(t)) 2 / Y(t), I B(t+1)  I(t+1) ] +E [ (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) 2 / Y(t), I B(t+1)  I(t+1) ] + 2E[((I B(t) – I(t)) T B(t)) (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) / Y(t), I B(t+1)  I(t+1) ]

E [((I B(t) – I(t)) T B(t)) 2 / Y(t), I B(t+1)  I(t+1) ] = ((I B(t) – I(t)) T B(t)) 2 = V 2 (Y) E [ (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) 2 / Y(t), I B(t+1)  I(t+1) ]  constant E[((I B(t) – I(t)) T B(t)) (I B(t+1) – I(t+1)) T (A(t+1) – I(t))) / Y(t), I B(t+1)  I(t+1) ]  constant ((I B(t) – I(t)) T B(t)) = constant  V 2 (Y)

E[((I B(t+1) – I(t+1)) T B(t+1)) 2 / Y(t), I B(t+1)  I(t+1) ]  V 2 (Y) + constant + constant  V 2 (Y) E[V 2 (Y(t + 1))/ Y(t), I B(t+1)  I(t+1) ] P[I(t+1)  I B(t+1) ]  (1-  ) (V 2 (Y) + constant + constant  V 2 (Y)) E[V 2 (Y(t + 1))/ Y(t) = Y]  (1-  ) (V 2 (Y) + constant + constant  V 2 (Y)) E[V 2 (Y(t + 1)) - V 2 (Y(t )) / Y(t) = Y]  -  V 2 (Y) + (1-  ) (constant + constant  V 2 (Y))

E[V(Y(t + 1))- V(Y(t))/ Y(t) ]  2(1/N)((  i  i ) - 1)  V 1 (Y) -  V 2 (Y) + (2-const.  )  V 2 (Y) + constant

Shared Memory Switches

Resource management constraints Packets are stored in the switch fabric As soon as packets arrive at the input, they are read in the switch memory and stored there. Each output line serves packets intended for it as and when it is available. There are N logical queues

Output lines serve packets independent of each other. Scheduling among the outputs is not an issue Different queues share the same physical memory. So memory management rather than scheduling is the issue

How does memory management affect performance? Performance metric: Throughput or packet drop Let N = 2 Suppose the entire switch memory consists of packets for output 1 Packets cleared from the memory at rate 1 per slot. If the memory had packets for both outputs, packets would be cleared at rate 2 Load balancing reduces packet drop! Memory can be managed to balance the load

Memory management options When a packet arrives: (a)It can be accepted (b)It can be rejected (c)It can be accepted while dropping some other packet (pushout) The objective is to choose the optimal course of action so as to minimize packet drops Some architectures do not allow pushout!

Optimal memory management in presence of pushout Optimal Buffer Sharing I. Cidon, L. Georgiadis, R. Guerin, A. Khamisy IEEE JSAC, Vol. 13, No. 7, September 1995

Optimal Strategy for N = 2 Optimal memory management strategy accepts packets whenever the buffer has space without any push outs If the buffer is full, then the arrival for output port j is accepted pushing out one for the other port, if the number of packets for port j is below a certain threshold, j = 1,2 The thresholds for different ports can be different, but their sum equals the total memory B Can the queue lengths for both ports be above their respective thresholds? If the service rates are equal, then the threshold is lower than B/2 for the one with the higher arrival rate

Optimal strategy for arbitrary N Known for identical arrival and transmission rates for all ports. Accept a packet if the buffer is not full. If the buffer is full, reject any arrival for the largest queue, accept arrivals for any other packet while dropping packets from the largest queue Proofs involve markov decision process

Lecture 4

Optimal policy when push out is not allowed Sharing memory optimally G. Foschini, B. Gopinath, IEEE transactions on Communications, Vol 31, No. 3, March 1983 Load balancing still reduces the packet drop. Since push out is not allowed, load can be balanced by rejecting new arrivals of overloaded queues even when the buffer has space

Optimal Strategy for N = 2 Accept a packet for port j if (a)Buffer has space (b)Number of packets waiting for port j is less than a threshold m j The policy reserves B – m 1 memory units for output 2 and B – m 2 memory units for output 1

Optimal Strategy for N = 3 Accept a packet for port j if (a)Buffer has space (b)Number of packets waiting for port j is less than a threshold m j (c)  i  j x ij  m ij even after accepting the packet The policy reserves memory units for individual outputs as also the combinations

Proof for optimality In general, every policy will have a set of states  and will admit packets only if it does not move out of the set. The objective will be to find the set which reduces the blocking. The system can be modeled by a continuous time markov chain if arrivals are Poisson and departures exponential, with the state vector consisting of queue lengths of individual queues

System Model Queue j has Poisson arrivals at the rate j exponential service at rate  j Utilization  j = j /  j Steady state distribution  (a,…. ) =  1 a ….  N.. /  a..  1 a ….  N …. Reversibility

Lecture 8

Optimal memory management in presence of pushout Queue j has Poisson arrivals at the rate j exponential service at rate  j Loss minimization is equivalent to throughput maximization Whenever a packet is served, system gets a reward of 1 unit. The objective is to maximize the total reward

J(x 1 x 2 ….. x N ) =  j I(x j  0) +  i max(J(x), J(x + e i ), J(x + e i - e j )) if  i x i  B =  j I(x j  0) +  i max(J(x), J(x + e i - e j )) if  i x i = B System state: queue length vector (x 1 x 2 ….. x N ) Control action: memory management e j A vector with 1 in the ith position and 0 in the rest I(x) = 0 if x = 0 = 1 otherwise

Optimal Strategy for N = 2 Properties for the cost function J(x, y) Monotonicity and Boundedness in x: 0  J(x+1, y) – J(x, y)  1, 0  x  B - 1 Monotonicity and Boundedness in y: 0  J(x, y+1) – J(x, y)  1, 0  y  B - 1 Concavity along x: J(x+1, y) – J(x, y)  J(x, y) - J(x-1, y), 1  x  B - 1

Concavity along y: J(x, y+1) – J(x, y)  J(x, y) - J(x-1, y), 1  x  B - 1 Concavity along the line x + y = b, 2  b  B : J(x+1, y-1) – J(x, y)  J(x, y) - J(x-1, y+1), 1  x  B – 1, 1  y  B – 1

Derivation of Optimal strategy from the properties Monotonicity and boundedness implies that the optimal decision is to accept a packet for a port if the buffer has space The concavity property on the straight line x + y = B implies that the function J(x, y) has either a unique maxima on the line or two consecutive maximas. These correspond to the replacement thresholds.

Nature of Thresholds If 1  2  1 =  2 J(x, y)  J(y, x), y  x

Approximate computation of thresholds J(x, y)  f(x,y) = d – c 1  1 x – c 2  2 y d = (  1 +  2 )/(1-  ) c j =  j /(1 -  (1 - j (1-  j )))  j roots of quadratic equation The maximum of f(x, B-x) gives the thresholds.

Optimal Strategy for N for symmetric arrival rates Properties for the cost function J(x, y) Monotonicity and Boundedness : 0  J(x+ e j ) – J(x)  1, Symmetry J(x) = J(y), where y is a permutation of x Balancing: J(x)  J(x + e i - e j ) if ith component of x is less than the jth component Drop from the longest queue