380 likes | 638 Views
Shanghai Jiao Tong University. Delay models in data networks. Data networks and Queueing. R. R. R. R. R. R. R. S. General Methodologies of Queueing Analysis. We are given: Packet arrival behavior Packet length distribution Packet routing / handling policies We want to deduce:
E N D
Shanghai Jiao Tong University Delay models in data networks
Data networks and Queueing R R R R R R R S
General Methodologies of Queueing Analysis • We are given: • Packet arrival behavior • Packet length distribution • Packet routing / handling policies • We want to deduce: • Packet delay • Queue length • Packet loss • Queueing theory can also be applied in other areas, such as in analyzing Circuit Switched Net.
In this chapter • Poisson process • The Little’s Theorem • M/M/x Queueing systems • Burke’s Theorem and Jackson’s Theorem • M/G/1 • Reservation systems and priority queue
Weiqiang Sun Shanghai Jiao Tong University Arrival model and the little’s theorem
The arrival process • The arrival process can normally be described • by the number of arrivals in a unit time • or can be described by inter-arrival time • Poisson process • the most commonly used arrival model in telecom network • Named after the French Mathematician Simeon-Denis Poisson (1781 – 1840)
Examples of Poisson process • The number of page request arriving at a web server (no attack, please) • The number of telephone calls arrives at an switch • The number of photons hitting a photon detector, when lit by a laser • The execution of trades on a stock exchange • …
Three ways to define a Poisson process (1) In an infinitesimal time interval dt, there may occur only one arrival, and this happens with probability λdt dt
Three ways to define a Poisson process (2)The number of arrivals N(t) in a finite interval of length t • Obeys Poisson distribution with parameter λt • The number of arrivals in non-overlapped intervals are independent T1 Poisson(λT1) T2 Poisson(λT2)
Three ways to define a Poisson process (3) The interval times are independent and obey exponential distribution with rate λ exp(λ) • Proof of 23
Properties of Poisson process • 1st of all: memory-less • The additional time to wait is independent on when it starts • P(X>40|X>30) = P(X=10) • Think about the coin-tossing process, though not Poisson, it is memory-less • X is the number of trials until the first “head” • Additional trials to get a “head” is independent of previous trials
Properties of Poisson process (cont.) • Merging property • Let A1, A2, …, Ak be independent Poisson process of rate λ1, λ2,…, λk, A= ∑Ai is also Poisson with rate λ= ∑ λi λ1 λ1 ∑ λi λ2 λ2 λ1+λ2 λk
Properties of Poisson process (cont.) • Selection property • Suppose a random selection is made from a Poisson process (λ), each arrival is selected with probability p, independent of the others, the resulting process is a Poisson process with rate pλ λ1 λ ∑ λi λ2 pλ λk • Splitting property • The above property also leads to random splitting property, why and how?
Properties of Poisson process (cont.) • PASTA: Poisson Arrival See Time Average • One of the central tools in queueing theory • An arrival customer always see the system in average state, in terms of number of customers in the system πi: the probability that an outside observer sees the system in state Si at a random instant πi*: the probability that an arriving customer sees the system in state Si just before arrival λ Si In general, πi ≠πi*. But for Poisson arrivals, they equal. To prove, show that:
Examples • Problem in Text, 3.6 • Problem in Text, 3.10(d)
Data networks and Queueing R R R R R R R S
Little’s Theorem • Named after John Little, an MIT Sloan prof. Little J. D. C. “A proof of the Queueing Formula L= λw,” Operation Research, 9, 383-387 (1961) λ A queueing system (N, T) • N= λT • λ: arrival rate of customers into the system • N: number of customers in the system • T: average amount of time a customer spends in the system
Some observations of Little’s Theorem • The result is very useful because of its generality • Nothing is assumed about the system • Can be applied to the whole system, or • Any part of the system • Treat system as a blackbox • The arrival process can be anything • Not necessarily Poisson process • But, it has to be stationanry • And it can naturally explain why • On a rainy day, traffic moves more slower and the streets are more crowded • A fast-food restaurant needs a smaller waiting room
A simple justification of Little’s Theorem • N(t) the number of customers in the system • N: average number of customers in the system, can be calculated by dividing the above shaded area by t • T: on average, each customer contributes T • the average number of arrivals during t is λt • Thus the area is λt×T, hence N = λT • N(t) N • 0 • t Graphical proof, see text 3.2.1
Application examples R 1. A transmission system R R R queue transmitter transmission line • 2. A complex system with multiple streams R λ3 R R λ2 λ1 λ1 λ2 λ3
Single server queues queue λ customers per second • M/M/1 • Poisson arrivals, exponential service times • M/G/1 • Poisson arrivals, general service times • M/D/1 • Poisson arrivals, deterministic service time (fixed) μcustomers served per second S
Discrete-time Markov chains • The memory-less property of both arrival process and service time • allow us to use the Markov chain theory to analyze M/M/1 queueing systems • Discrete-time Markov chains p0,1 p1,2 p2,3 pk-1,k pk,k+1 S0 S1 S2 Sk p1,0 p2,1 p3,2 pk,k-1 Pk+1,k pi,j : probability of state transition from i to j Si : states, i=0,1,…
M/M/1 systems and Markov chain • Define state k k customers in the system • p(i, j): the probability that number of customers in the systems changes from i to j, within a very small time interval δ • It can be shown that the probability of more than one arrival / departure is o(δ) • Hence as δ0, we have: p(0, 0) = 1 - λδ p(j, j) = 1 – λδ – μδ, for j > 0 p(j-1, j) = λδ p(j+1, j) = μδ p(i, j) = 0, for |i-j|>1
Markov chain for M/M/1 systems • In equilibrium, the transition from state n to n+1 is the same as the transition in the reverse direction • λp(n) = μp(n+1) for all n • Local balance equations between two states (n, n+1) • p(n+1) = (λ/μ)p(n) =ρp(n), ρ=λ/μ p(n) =ρnp(0) • By axiom of probability: λδ λδ λδ λδ λδ 0 1 2 K μδ μδ μδ μδ μδ
Some results of M/M/1 • Average number of customers in the system: N • The average amount of time a customer spends in the system can be derived from the Little Theorem • The average amount of time a customer waiting in queue • Average number of customers in the queue
The example of circuit switching vs. packet switching Packet switching (multiplexing) Circuit switching (dedicated) T = ? • T = ? queue λ/M λ/M λ/M λ/M μ … … λ/M λ/M
m server systems: M/M/m • Departure rate is proportional to the number of servers in use μ queue λ μ …. m servers μ customer per second, per server μ λδ λδ λδ λδ λδ 0 1 2 m 2μδ 3μδ mμδ mμδ μδ m+1
M/M/m systems • Local balance equations • Solve for p(0) and p(n) using ∑p(n)=1
The Erlang C formula and other results • And the average number of customers in queue • The probability of being queued the Erlang C formula • With the Little’s Theorem, average time in queue and in system • And of course, the average number of customers in system
M/M/m example • Text problem 3.7 M/M/2 systems with heterogeneous servers
M/M/∞ (M/M/inf) • Infinitive number of servers Customers will no longer experience queueing delays 2μδ 3μδ mμδ (m+1)μδ μδ • Local balance equations λδ λδ λδ λδ λδ 0 1 2 m m+1
M/M/m/m • Same as M/M/m, but there is no queue • M/M/m no queue version • Customers who arrive finding all server busy will leave (they are blocked) • Blocking probability • The probability that a customer will come and find all server in service
M/M/m/m systems • Up to m customers in the system 2μδ 3μδ mμδ μδ • Local balance equations λδ λδ λδ λδ 0 1 2 m • The probability that a customer finds the system busy, the Erlang B Formula
The Erlang B formula • Define • The systems load in Erlang • Formula sensitive to the ratio of λ and μ • Can be used to dimensioning network capacity • Given tolerable PBand the load, find the number of server needed