34
Weiqiang Sun DELAY MODELS IN DATA NETWORKS Shanghai Jiao Tong University

Delay models in data networks

  • Upload
    lorene

  • View
    49

  • Download
    3

Embed Size (px)

DESCRIPTION

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: - PowerPoint PPT Presentation

Citation preview

Page 1: Delay models in data networks

Weiqiang Sun

DELAY MODELS IN DATA NETWORKSShanghai Jiao Tong University

Page 2: Delay models in data networks

Weiqiang SunWeiqiang Sun

Data networks and Queueing

R

R

R R

R

R

R

S

Page 3: Delay models in data networks

Weiqiang SunWeiqiang Sun

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.

Page 4: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Page 5: Delay models in data networks

Weiqiang Sun

ARRIVAL MODEL AND THE LITTLE’S THEOREM

Weiqiang SunShanghai Jiao Tong University

Page 6: Delay models in data networks

Weiqiang SunWeiqiang Sun

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)

Page 7: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

• …

Page 8: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Page 9: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

!)())((

ntetNP

nt

T1Poisson(λT1)

T2Poisson(λT2)

Page 10: Delay models in data networks

Weiqiang SunWeiqiang Sun

Three ways to define a Poisson process

(3) The interval times are independent and obey exponential distribution with rate λ

tetP 1)(

exp(λ)

• Proof of 23) within arrival 0(1)(1)( tPtPtP

Page 11: Delay models in data networks

Weiqiang SunWeiqiang Sun

Properties of Poisson process

• 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

• 1st of all: memory-less• The additional time to wait is independent

on when it starts– P(X>40|X>30) = P(X=10)

Page 12: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

λ2

λk

∑ λiλ1

λ2

λ1+λ2

Page 13: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

λ2

λk

∑ λiλ

Splitting property The above property also leads to random splitting

property, why and how?

Page 14: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Siλ

π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 arrivalIn general, πi ≠πi

*. But for Poisson arrivals, they equal.

To prove, show that:

( lim [ ( ) | an arrival occured just after ])n ta P N t n t

n na p

Page 15: Delay models in data networks

Weiqiang SunWeiqiang Sun

Examples

• Problem in Text, 3.6

• Problem in Text, 3.10(d)

Page 16: Delay models in data networks

Weiqiang SunWeiqiang Sun

Data networks and Queueing

R

R

R R

R

R

R

S

Page 17: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Page 18: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Page 19: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

t

N(t)

N

0

Graphical proof, see text 3.2.1

Page 20: Delay models in data networks

Weiqiang SunWeiqiang Sun

Application examples

1. A transmission system

2. A complex system with multiple streams

queue transmitter transmission line

R

R

R R

R

R

R

λ1

λ2

λ3

λ3

λ2

λ1

Page 21: Delay models in data networks

Weiqiang SunWeiqiang Sun

Single server queues

• 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)

Sλ customers per second

μ customers served per second

queue

Page 22: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Si : states, i=0,1,… pi,j : probability of state transition from i to j

Page 23: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Page 24: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

μδ μδ μδ μδ μδ

)1()(,1)0(

11

)0()0(1)(00

n

i

n

i

npp

ppip

Page 25: Delay models in data networks

Weiqiang SunWeiqiang Sun

Some results of M/M/1

)/()1/()(0

n

nnpN

• 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

)/(1/ NT

• The average amount of time a customer waiting in queue

11/1

TW

• Average number of customers in the queue

NWNQ

Page 26: Delay models in data networks

Weiqiang Sun

The example of circuit switching vs. packet switching

Packet switching (multiplexing) Circuit switching (dedicated)

• T = ?

μ

λ/Mqueue

λ/M

λ/M…

λ/M

λ/M

λ/M… M

M

• T = ?

M

Page 27: Delay models in data networks

Weiqiang SunWeiqiang Sun

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 m+1

μδ 2μδ 3μδ mμδ mμδ

Page 28: Delay models in data networks

Weiqiang SunWeiqiang Sun

M/M/m systems

• Local balance equations( 1) ( ),( 1) ( ),

p n n p n n mp n m p n n m

• Solve for p(0) and p(n) using ∑p(n)=1

(0)( ) / !, ( )

(0) / !,

n

m n

p m n n mp n

p m m n m

1

0

( ) ( )(0)! !(1 )

n mm

n

m mpn m

Page 29: Delay models in data networks

Weiqiang SunWeiqiang Sun

The Erlang C formula and other results

• And the average number of customers in queue

• The probability of being queued(0)( )( )

!(1 )

m

Qn m

p mP p nm

0

( )1Q Q

n

N np n m P

the Erlang C formula

• With the Little’s Theorem, average time in queue and in systemQN

W

1 QN

T

• And of course, the average number of customers in system

Page 30: Delay models in data networks

Weiqiang SunWeiqiang Sun

M/M/m example

• Text problem 3.7 M/M/2 systems with heterogeneous servers

Page 31: Delay models in data networks

Weiqiang SunWeiqiang Sun

M/M/∞ (M/M/inf)• Infinitive number of servers Customers will no longer

experience queueing delaysλδ λδ λδ λδ λδ

0 1 2 m m+1

μδ 2μδ 3μδ mμδ (m+1)μδ

• Local balance equations( 1) ( )p n n p n

/(0)( ) ( / )( )! !

nnp ep n

n n

1/

1(0) 1 ( / ) / !n

np n e

/N / 1/T N

Page 32: Delay models in data networks

Weiqiang SunWeiqiang Sun

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

Page 33: Delay models in data networks

Weiqiang SunWeiqiang Sun

M/M/m/m systems• Up to m customers in the system

λδ λδ λδ λδ

0 1 2 m

μδ 2μδ 3μδ mμδ

• Local balance equations( 1) ( ), 1p n n p n n m

1

0(0) ( / ) / !m n

np n

(0)( / )( )

!

npp nn

0

( / ) / !( )( / ) / !

m

B m nn

mP p mn

The probability that a customer finds the

system busy, the Erlang B Formula

Page 34: Delay models in data networks

Weiqiang SunWeiqiang Sun

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 PB and the load, find the

number of server needed

0

/ !/ !

m

B m nn

A mPA n

/A