Computer Communication Networks II: Chapter 3: Stochastic Models For Network Traffic

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

The Poisson Process

Single-Server Queues
M/M/c queue

Computer Communication Networks II


Chapter 3: Stochastic Models for Network Traffic

Lam Sinh Cong


The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Outline I

1 The Poisson Process


Poisson Counting Process
Poisson Point Process

2 Single-Server Queues

3 M/M/c queue
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

System model
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

System parameters

A(t0 , t0 + t) counting function: number of events (often referred


to as “arrivals”) falling in the interval (t0 , t0 + t], for t > 0
Sk event epochs: the time of occurrence of the k th event, k = 1
Tk inter-arrival times: the time elapsing since the (k − 1)th event
and the k th event : Tk = Sk − Sk−1
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Definition I

Define the short notation A(t) = A(0, t)


Let λ is a positive constant, a Poisson process is defined by the
following three properties
1 P(A(t + ∆t) − A(t) = 1) = λ∆t + o(∆t) as ∆λ → 0
2 P [A(t + ∆t) − A(t) > 1] = o(∆t)
3 The number of arrivals in non-overlapping intervals are
independent random variables
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Definition

The probability distribution of the Poisson process


(λt)n
pn (t) = P(A(t) = n) = e −λt (1)
n!
where
n is the number of arrival frames over time duration
λ is the arrival frames/users rate
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Definition
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Definition
The probability that no arrival until time t

p0 (t) = P(A(t) = n) = e λt (2)

The average arrival frames over time duration T



X
E [n] = npn = (3)
n=1

Variance

σ 2 = E [n2 ] − E 2 [n] (4)


The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Example

Example 1
The packet that arrives a station follows a Poisson distribution with a
average rate of λ = 0.2 packet/s. Find the following probability
1 At least 2 frames that arrives in 15 s
2 Less than 2 frames that arrives in 15 s
3 At least 2 frames that arrives in 15 s
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Example

Example 2
Let a Poisson process with rate λ = 0.5.
Find the probability of no arrivals in (3,5].
Find the probability that there is exactly one arrival in each of the
following intervals: (0,1], (1,2], (2,3], and (3,4].
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Poisson Point Process

Sequence of interarrival times


The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

In the interval [0, t] there is


no arrival with probability
P(A(t)) = 0

Probability P(TE > t) that the first arrival occurs at time TE > t
P(TE > t) = P(A(t) = 0) = e −λt (5)
Distribution and density function of interarrival times
FTE (t) = P(TE < t) = 1 − e λt (6)
fTE (t) = λe −λt (7)
Expected value of interarrival times
Z ∞
1
E [TE ] = tfTE dt = (8)
0 λ
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Exercise

1
You are observing the arrivals of TCP connections at a web server. You
find that such arrivals can be modeled as a Poisson process of mean
rate λ. What is the probability of observing two arrivals in a time
interval of duration 1/λ.
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Memoryless Property

An event (e.g. an arrival) occurs at t0 . The random interval TE up


to the next event has a negative exponential distribution
Up to the time tC the next event (arrival) has not occurred
The distribution of the remaining time interval TR is independent
of the already elapsed time tC
P(TR ≤ t|TE > tc ) = P(TR ≤ t) (9)
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Memoryless Property

P(TR ≤ t|TE > tc ) = P(TE − tc ≤ t|TE > tc )


P(TE − tc ≤ t, TE > tc )
=
P(TE > tc )
P(tc < TE < tc + t)
=
P(TE > tc )
= 1 − e −λt = P(T ≤ t) (10)
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Theorem
Given that n arrivals of a Poisson process occur in the interval (0, t),
the PDF of their ordered epochs t1 < t2 < ... < tn is
n!
f (t1 , t2 , ..., tn ) = n (11)
t
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Example I
Let N(t) be a Poisson process with intensity λ = 2, and let X1 , X2 , ...
be the corresponding interarrival times.
1 Find the probability that the first arrival occurs after t=0.5, i.e.,
P(X1 > 0.5).
2 Given that we have had no arrivals before t=1, find P(X1 > 3).
3 Given that the third arrival occurred at time t=2, find the
probability that the fourth arrival occurs after t=4.
4 I start watching the process at time t=10. Let T be the time of the
first arrival that I see. In other words, T is the first arrival after
t=10. Find E[T] and Var[T].
The Poisson Process
Poisson Counting Process
Single-Server Queues
Poisson Point Process
M/M/c queue

Example II

5 I start watching the process at time t=10. Let T be the time of the
first arrival that I see. Find the conditional expectation and the
conditional variance of T given that I am informed that the last
arrival occurred at time t=9.
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Outline I

1 The Poisson Process

2 Single-Server Queues
System model
Performance metrics
Priorities

3 M/M/c queue
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

System model

The mean arrival (Poisson) rate is λ


The mean service rate is µ (Poisson) (packet/s)
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

System model

The probability that a packet is transmitted during t is


Pµ (τ ) = µe −µτ (12)
Service average time per packet
1
E [τ ] = (13)
µ
Variance
1
σµ2 = (14)
µ2
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Birth-death process
The state transitions are of only two types: "births", which increase the
state variable by one and "deaths", which decrease the state by one

A birth-and-death process is ergodic if and only if


∞ Y
i ∞ Y
i
X λn X λn−1
= ∞ && <∞ (15)
i=1
µ
n=1 n i=1 n=1
µn
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Birth-death process

At equilibrium

(µi + λi )pi = λi−1 pi−1 + µi+1 pi+1


 
µi + λi λi−1
pi+1 = pi − pi−1 (16)
µi+1 µi+1
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Birth-death process

At equilibrium
λ0
p1 = p0
µ1
λ0 ...λn−1
pn = p0 (17)
µ1 ....µn
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Birth-death process

State definition
Limiting state probability pn
λ0 ...λn−1
pn = p0 (18)
µ1 ....µn
Condition

X
pn = 1 (19)
n=1
Initial state p0
1
p0 = P∞ λ0 ...λn−1
(20)
1+ n=1 µ1 ...µn
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Single-Serve Queues

λn = λ
µn = µ

Theorem

p0 = 1 − ρ (21)
pn = ρn (1 − ρ) (22)
where ρ = λ/µ represents the load intensity
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Single-Serve Queues

Theorem (Average queue length)


∞ ∞
X X ρ
E [N] = npn = (1 − ρ) nρn = (23)
n=0 n=0
1−ρ

Theorem (Average system time)


E [N] 1
E [S] = = (24)
E [X ] µ−λ
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Single-Serve Queues - Direct Computation

Compute E [S] from E [N]

1 1
E [S] = E [N] + (25)
µ µ

Compute E [N] from E [S] - Little’s theorem

E [N] = λE [S] (26)


The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Single-Serve Queues

Theorem (Average waitting time in Queue)


1 1 1
E [W ] = E [S] − = − (27)
µ µ−λ µ

Theorem (Number of frames in system)


λ λ
NQ = λE [W ] = − (28)
µ−λ µ
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Example
A Television repairman finds that the time spent on his jobs has an
exponential distribution with mean 30 minuets.
If he repairs the sets in the order in which they come in, and if the
arrivals of sets are approximately Poisson with an average rate of 10 per
8 hours day which is the repairs man idle time each day ?
Find the expected number of units in the system and in the queue
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

System model

We consider an M/M/1 system serving different types of customers


Type 1 and type 2 customers arrive according to independent
Poisson processes with rates λ1 and λ2
The service times of all customers are exponentially distributed
1
with the same mean µ

ρ1 + ρ2 < 1 where ρk = λk /µ (29)


Type 1 customers are treated with priority over Type 2 jobs
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Preemptive-resume priority

Type 1 customers have absolute priority over Type 2 jobs


1 When a type 2 customer is in service and a type 1 customer
arrives,
1 The type 2 service is interrupted and the server proceeds with the
type 1 customer
2 Once there are no more type 1 customers in the system, the server
resumes the service of the type 2 customer
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Performance Metrics

Type 1 customers the type 2 customers do not exist

Theorem (For Type 1: Average queue length)


ρ λ
E [N1 ] = = (30)
1−ρ µ−λ

Theorem (For Type 1: Average system time)


E [N] 1
E [S1 ] = = (31)
E [X ] µ−λ
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Performance Metrics
Theorem (Total number of customers: Average queue length)
λ1 + λ2
E [N1 ] = (32)
µ − λ1 + λ2

Theorem (For Type 2: Average system time)


λ1 + λ2 ρ2
E [N2 ] = − E [N1 ] = (33)
µ − λ1 + λ2 (1 − ρ1 )(1 − ρ1 − ρ2 )
E [L2 ] 1/µ
E [S2 ] = = (34)
λ2 (1 − ρ1 )(1 − ρ1 − ρ2 )
(35)
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Example

Consider a network system work with a single queue server. There two
types of customers Type 1 and Type 2 that arrive with rates of
λ1 = 0.2 ∗ 106 packet/s and λ2 = 0.6 ∗ 106 packet/s. The service rate
of the queue is µ = 106 packet/s. Find the average number of packets
and average waiting time in the system in case
1 All customers are treated independently
2 Type 1 customers have absolute priority over Type 2
3 Type 2 customers have absolute priority over Type 1
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Non-preemptive priority

Type 1 users are not allowed to interrupt the service of Type 2 users
For the mean waiting time of type 1 customers
1 1 1
E [S1 ] = E [L1 ] + + ρ2 (36)
µ µ µ
where Type 1 user finds a type 2 user in service is ρ2

The Little’s Law

E [L1 ] = λ1 E [S1 ] (37)


The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Non-preemptive priority

For Type 1 user

(1 + ρ2 )/µ
E [S1 ] = (38)
1 − ρ2

(1 + ρ2 )/ρ1
E [L1 ] = (39)
1 − ρ1
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Non-preemptive priority

For Type 2 user

E [S2 ] = (40)

E [L2 ] = (41)
The Poisson Process System model
Single-Server Queues Performance metrics
M/M/c queue Priorities

Example

Consider a network system work with a single queue server. There two
types of customers Type 1 and Type 2 that arrive with rates of
λ1 = 0.2 ∗ 106 packet/s and λ2 = 0.6 ∗ 106 packet/s. The service rate
of the queue is µ = 106 packet/s. Find the average number of packets
and average waiting time in the system in case
1 All customers are treated independently
2 Non-preemptive priority
3 Preemptive-resume priority where Type 1 users have absolute
priority over type 2
The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

Outline I

1 The Poisson Process

2 Single-Server Queues

3 M/M/c queue
Birth-Death Process
Performance Metrics
The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

Birth-Death Process

exponential interarrival times with mean 1/λ,


exponential service times with mean 1/µ
c parallel identical servers
λ
The occupation rate per server ρ = cµ
The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

At the equilibrium

λpn−1 = min(n, c)µpn (42)


The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

At the equilibrium

λpn−1 = min(n, c)µpn (43)


Iterating gives

(cρ)n
pn = p0 if n = 0, 1, 2, ..., c (44)
n!
and
(cρ)c
pc+n = ρn pc = ρn p0 if n = 0, 1, 2, ... (45)
c!

Pn
where k=1 pk = 1
The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

The probability p0 is given by

c−1
!−1
X (cρ)n (cρ)c 1
p0 = + (46)
n=0
n! c! 1 − ρ

The probability that a job has to wait (delay probability)


Πw =pc + pc+1 + ....
pc
=
1−ρ

c−1
!−1
(cρ)c X (cρ)n (cρ)c
= (1 − ρ) + (47)
c! n=0
n! c!
The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

Mean queue length and mean waiting time


Mean queue length

X
E [L] = npc+n
n=0

pc X
= n(1 − ρ)ρn
1 − ρ n=0
ρ
=Πw (48)
1−ρ

Mean waiting time


1 1
E [W ] = Πw (49)
1 − ρ cµ
The Poisson Process
Birth-Death Process
Single-Server Queues
Performance Metrics
M/M/c queue

Thanks for your attention!

You might also like