Chapter 3
Delay models in Data Networks
Section 3.2
Little`s Theorem
3.2 Little`s Theorem
N : average number of customers in
system
: mean arrival rate
T:mean time a customer spends in
system
T
N
Little`s Theorem
Proof
N(t) = number of customers in system at
time t
(t) = number of customers who arrived in
interval [0,t]
Ti = time spent in system by the i-th
customer
Little`s Theorem
Little`s Theorem
(t )
(t )
T
(t )
1
1
N
(
)
d
T
i
t 0
t i 1
t
take
t
lim N T
t
i 1
i
(t )
3.2.3 Application of Little`s
Theorem
Ex3.1
: arrival rate in a transmission line
NQ : average number of packets waiting in
queue
W : average waiting time spent by a packet
in queue
NQ = W
Application of Little`s
Theorem
If X = average Tx time
= X
: Average number of packets under Tx
I.e. fraction of time that s busy utilization factor
Application of Little`s
Theorem
Ex3.2
N : average number packets in network
T : average delay per packet
N
n
T
i 1
i
also
Ti : average delay of packets arriving at
node i
N i iTi
3.3 M/M/1 Queuing System
M/M/1
First M : arrival , Poisson
Second M : service , Exponential
1 : server number
M/M/1 Queuing System
Arrival Poisson process
A(t) : number of arrivals from 0 to time t
Number of arrivals that occur in disjoint
intervals are independent
Number of arrivals in any interval of length
is Poisson distributed with parameter ,
( )e
PA(t ) A(t ) n
n!
, n 0,1,
M/M/1 Queuing System
Properties of Poisson process
1. Inter arrival times are independent and
exponentially distributed with parameter
tn : time of the n-th arrival
n tn 1 tn
Pn S 1 e S , S 0
pdf : P(n ) e
n
1
1
2
mean , var iance
M/M/1 Queuing System
2. For every t0, 0
PA(t ) A(t ) 0 1 o( )
PA(t ) A(t ) 1 o( )
PA(t ) A(t ) 2 o( )
where lim
0
Note : e
o( )
0
( ) 2
1
2!
M/M/1 Queuing System
3. A = A1+A2++AK is also Poisson with
rate = 1+ 2++ K
A1
merge
………..
A2
Poisson
AK
M/M/1 Queuing System
4.
Poisson split
P
1-P
Also Poisson with
Poisson with
P
(1-P)
M/M/1 Queuing System
Service time : Exponential distribution
with parameter
Sn : service time of n-th customer
PSn S 1 e
S
pdf : P( Sn ) e
,S 0
Sn
M/M/1 Queuing System
Properties of Exponential : memoryless
Pn r t | n t P(n r ), for r, t 0
PSn r t | Sn t P( Sn r ), for r, t 0
Markov chain formulation
Let's focus at the times,0,,2,…,k,…
Nk = number of customers in system at
time k = N(k)
Where N(t) is continuous-time Markov Chain
Nk is discrete-time
Let Pij : transition probabilities =
P{Nk+1=j|Nk=i}
Markov chain formulation
P00 1 o( )
Pii 1 o( ), i 1
Pi ,i 1 o( ), i 0
Pi ,i 1 o( ), i 0
Pi , j o( ), i and j i, i 1, i 1
Markov chain formulation
steady state probabilit ies
Pn lim PN k n lim PN (t ) n
Note
k
t
During any time interval, the total number
of transitions from state n to n+1 must
differ from the total number of transitions
from n+1 to n by at most 1
I.e. frequency of transitions from n+1 to n
= frequency of transitions from n to n+1
Markov chain formulation
Markov chain formulation
Take ->0 Pn=Pn+1
Pn+1=Pn, n=0, 1, …等比數列
where = / utilization
Pn+1= n+1P0, n=0,1,…
Since <1, and
P
n 0
n
1 P0 1
Pn n (1 ) n 0,1,...(3.23)
Markov chain formulation
n 0
n 0
N lim E N (t ) nPn n n (1 )
t
1
(1 )
(3.24)
2
(1 )
1
N
1
T
(3.25)
(1 )
1
1
W
, N Q W
1
2
M/G/1 System
Let Ci : customer I
Wi = waiting time of Ci
Xi = service time of Ci
Ni = # of customers found waiting in
queue when Ci arrives
Ri = residual service time of the
customer in service when Ci
arrives
M/G/1 System
Ri
Xi- Ni
Ci arrives
Ni
Wi Ri
Xi-1
Ci start service
i 1
X
j i N i
j
In steady-state,
1
lim W R N Q
R W
i
u
E (Wi ) E ( Ri ) E ( N i ) E ( X j )
R
W
1
( 3.48)
M/G/1 System
To calculate R, by graphical approach:
Residual service time r()
M(t)=# of service completion in [0, t]
X1
X2
X1 X2
Ci starts service
XM(t)
Time
XM(t)
t
M/G/1 System
Time avg of r() in [0, t]
1
1
r ( )d
t 0
t
t
M (t )
X
2
i
1 M ( t ) i 1
2
t
M (t )
M (t )
i 1
1 2
Xi
2
M/G/1 System
Tak e
t
1
R lim
t t
t
0
r ( )d
M (t )
1
M (t )
lim
lim i 1
t
2 t
t
M (t )
1
E ( X 2 )
2
P-K
2
R
E ( X ) Formula
W
1
2(1 ) (3.53)
X i2
Ex3.15
Consider a go back n ARQ:
1
sender
receiver
2
3 … n-1 n
1
2
3
Prop. delay
1
time
Timeout (n-1) frames
time
Assume that error in the forward channel is p,
return channel is error-free
Packet arrives as a Poisson process with rate
packets/frame
Ex3.15
Service time X : from when a packet
transmitted until it is
successfully received
1 , if 1st tx is successful (1-p)
X={ 1+n, if 1st tx is un- successful; 2nd is
successful p(1-p)
1+kn, if 1st k is un- successful;(k+1)th
successful Pk(1-p)
Ex3.15
E ( X ) (1 kn) p (1 p )
k
k 0
k
k
(1 p ) p n kp
k 0
k 0
E[ X ] (1 kn) p (1 p )
2
2
k 0
k
Ex3.15
np
E( X ) 1
1 p
2np n ( p p )
E[ X ] 1
2
1 p
(1 p )
2
2
2
E ( X )
W
, T E( X ) W
2(1 E ( X ))
2
3.5.1 M/G/1 Queue with
vacations
1.
2.
3.
When the server has served all customers, it
goes on vacation
If the system is still idle after a vacation
interval, go on another vacation interval
If a customer arrives during a vacation,
customer waits until the end of vacation.
Chapter 1 section 1.3.1 page 34in Network
or Transport Layer
M/G/1 Queue with vacations
M/G/1 Queue with vacations
Assume vacation intervals v1, v2… are
iid and are independent of customers
arrival & service times.
→A customer must wait for the completion
of the current service or vacation interval,
and then the service of all customers
waiting before it.
M/G/1 Queue with vacations
R
W
1
Where R is the mean residual time for
completion of service or vacation when
the customer arrives.
M/G/1 Queue with vacations
Let L(t) = # of vacations completed by t
M(t) = # of services completed by t
1 t
1 M (t ) 1
1 L(t ) 1 2
2
r ( )d
X i Vi
t 0
t i 1 2
t i 1 2
L(t )
1 M (t ) 1
1 L( t )
2
X
i
t i 1 2
2 t
Vi
2
i 1
L( t )
E (V 2 )
R
E ( X )
2
2
2
1
E (V )
(1 )
2
E (V )
Because Fraction of time occupied with vacation = 1-
t (1 )
L( t ) 1
lim
E (V ),
t
L( t )
t
E (V )
R
E ( X ) E (V )
W
1 2(1 ) 2 E (V )
2
2
Ex3.16 : FDM, SFDM, TDM
m streams of traffic with rate
/m(Poisson)
FDM system – Divide available
bandwidth into m subchannels.
Transmission time for a packet on each
of these subchannels is m.
FDM
E ( X )
m
m
E ( X ) VarX E ( X ) 0 m m
2
2
WFDM
2
m
m
(3.56)
2(1 ) 2(1 )
2
Slotted FDM System
Packet trans starts only at time m,
2m,…When the queue is idle, server
takes a vacation of m. (if idle again
after vacation, take another)
WSFDM
m
m
WFDM (3.57)
2(1 )
2
TDM System
Look at SFDM queue, ->same queue
WTDM=WSFDM
Summary
TTDM
m
m
1 TFDM ( 1), better if m 2
2(1 )
2
m
TSFDM
m
2(1 )
m
TFDM
m
2(1 )
Service time
Reservations & Polling
Satellite
Collision -> solution:polling or reservation
S1 D1 D1 S2 D2 …
Cycle
S1 D1 D1 S2 D2
Reservation & Polling
1.
2.
3.
M Poisson traffic streams with rate /m
Gated System – only those packets which
arrive prior to the user’s preceding
reservation period are transmitted.
Exhaustive system – all packets are
transmitted including those that arrive
during this data period
Partially gated – all packets that arrive up
to the beginning of the data interval.
Single-User
Gated system:
m=1
Di arrives
S
D
D
S
Wi
D D … D
Di starts
time
Di ends tx
Ri
Vl(I)
l(i)-th reservation interval
Ni : # of packets arrive in front of Di
Single-User
A reservation(vacation)starts when the
system has served all packets which arrive
prior to the preceding reservation interval.
A vacation(M/G/1 queue with vacation) starts
when the system has served all packets
which have arrived.(corresponds to
exhaustive system)
Single-User
E ( Ri ) 與以前一樣
take i
E ( X )
2
2
E (V )
R
(1 )
2
2 E (V )
N E ( N i ) W
E ( N i ) E ( X ) WE ( X ) W
Single-User
Single-user
gated
E ( X ) E (V ) E (V )
W
(3.61)
2(1 ) 2 E (V ) 1
2
2
E ( X ) E (V )
W
exhaustive
2(1 ) 2 E (V )
2
2
Multi-User
Packet i starts
Packet i arrives
S
D
D
Wi
D … S D
D … S
Ri
D
D
time
Pakcet i ends
Ni
Sum=Yi
Ni is redefined as # of packets which
must be transmitted before packet i
Multi-user
E (Wi ) E ( Ri ) E ( N i ) E ( X ) E (Yi ) (3.63)
Where Yi : includes all reservation
intervals packet I must want for.
Multi-User
If number the users 0, 1, 2,…,m-1, the
l-th reservation interval is used to make
reservation for user l mod m
m 1
R
E ( X )
2
2
(1 ) E (Vl )
l 0
m 1
2 E (Vl )
l 0
2
Multi-user
W R W Y
R Y
W
(3.65), Y ?
1
Multi-user
For an exhaustive system
Let lj=E ( Yj | packet i arrives in user l’s
reservation or data intervals and
belongs to user (l+j) mod m)
0
,
j
0
V ( l 1) mod m V ( l 2 ) mod m ... V ( l j ) mod m , j 0
Packet i belongs to each user with same prob. = 1/m
Multi-user
m 1
lj
j 1
1
m
m 1
j 1
lj
V ( l 1) mod m
1 V ( l 1) mod m V ( l 2 ) mod m
m
V ( l 1) mod m V ( l 2 ) mod m ... V ( l m 1) mod m
m j
V ( l j ) mod m
m
j 1
m 1
( 3.66)
Multi-user
All users have equal average data length
in steady state.
P(packet i arrives during user l’s data
interval)
m
P(packet i arrives during user l’s
V
reservation interval) (1 ) m1 l
V
k 0
k
Multi-user
m 1
E
j 1
(Yi|pkt i arrives in user l’s data or reser. int.)
X P(pkt i arrives in user l’s reser. Or data int. )
m j
(1 )V l
V( l j ) mod m (
m 1
)
m
m
l 0 j 1
V k
m 1 m 1
k 0
m 1
( m )V
2
1
where V
m
(1 ) Vl 2
l 0
2mV
m 1
V
l 0
l
(3.68)
Multi-user
If Vl’s have same dist.
X2
( m )V V2
W
2(1 ) 2(1 ) 2V
m 1
where
2
V
2 V )
(
V
l
2
l
l 0
m
Exhaustive system
(3.69)
Multi-user
- The partially gated system is the same
as the exhaustive system except that if
a packet arrives in its own user’s data
interval (with prob. /m), it is delayed
an extra cycle of reservation periods(mV)
Y is increased by
m
mV (1
m
) 0 V
Multi-user
-
The fully gated system is the same as
partially gated system except if a pkt
arrives during a user’s own reservation
interval (prob. (1-)/m)
-
It is delayed by an additional mV
-
1
Y is increased by (
)mV
m
Priority Queuing
N classes of customers class i arrives a
Poisson process with rate I
2
1
service time X i , X i
ui
Each class joins a separate queue
1
Server
2
Priority Queuing
Single server will server customers from the
highest priority queue first
1.
2.
Non-preemptive
- a lower priority customer, once started, is
allowed to finish, when a high priority customer
arrives.
Preemptive resume
- Service for a low priority customer is
interrupted when a high priority customer
arrives and is resumed from the point of
interruption when all higher priority customers
have been served
Non-preemptive
Let NQk=avg. # in queue for priority k
Wk= avg. queueing time for priority k
k = k/k = system utilization for
priority k
R = mean residual service time.
Non-preemptive
W1 R N
1
Q
1
1
R 1W1
R
W1
1 1
W2 R N
1
Q
1
1
N
2
Q
1
2
1
1
1W2
Where 1W2 is the avg. # of higher priority customers
that arrives while you are waiting
Non-preemptive
R
W2
(1 1 )(1 1 2 )
Similarly,
R
Wk
(1 1 2 ... k 1 )(1 1 2 ... k )
Non-preemptive
R=the residual time
n
1
2
( i ) X
2 i 1
Where
X
2
=2nd moment of the service
time avg. over all priority
1 2
n 2
X 1 ...
Xn
Non-preemptive
n
代入
1
2
R ( i ) X (3.81)
2 i 1
n
Wk
X
i 1
i
2
i
2(1 1 2 ... k 1 )(1 1 2 ... k )
1
and Tk Wk
(3.83)
k
(3.82)
Preemptive
Note that Tk will not be affected by customers
from class k+1 to n
1
Tk
k
Unfinished work
of Class 1 to k
(A)
Rk
( A)
1 1 ... k
Work due to class 1
to k-1 who arrives when
this customer is waiting
(B)
R
(Re call W
)
1
k
where Rk
2
X
i i
i 1
2
(3.84)
Preemptive
k
( B)
i 1
1
i
k
iTk iTk
i 1
k 1
Rk
Tk
iTk
k 1 1 ... k i 1
1
1
(1 1 ... k 1 ) Rk
k
Tk
(3.87)
(1 1 ... k 1 )(1 1 ... k )
1
for k 1, T1
1
(1 1 ) R1
(1 1 )
(3.86)
© Copyright 2026 Paperzz