Sie sind auf Seite 1von 50

Telecommunications Queuing Telecommunications Queuing

Theory
1/2/2009 1
Introduction Introduction
Using queuing theory the engineer attempts to
predict the effect of changes in a
t l i ti t k bl telecommunication network measurable
performance statistics such as response time,
throughput, good throughput and time delay g p , g g p y
when some part of the system changes.
The ability to model and predict the effect of
changes to a telecommunication network must changes to a telecommunication network must
start with first modelling the effect of change on a
single queue.
Once the properties of single queues are
modelled then it becomes possible to model
telecommunication networks which are
1/2/2009 2
telecommunication networks which are
composed of many queues.
Introduction Introduction
There are lots of applications in current networks
(e.g. internet TCP/IP, ISDN, frame relay, micro
cellular networks (GSM), PABX and PSTN
dimensioning) and emerging multimedia networks
h b db d bil ti ATM f t such as broadband mobile computing, ATM fast
packet switching, light-wave networks.
In this chapter we are interested in queuing systems p q g y
associated with telecommunication applications but
we will start by looking at where we encounter
queuing systems in general.
1/2/2009 3
Where do queues occur? Where do queues occur?
At the bank waiting for a teller or outside
A t ti T ll M hi Automatic Teller Machine
Waiting to go through a supermarket
checkout checkout
Waiting to get into a sporting fixture
Waiting on re-enrolment day until you get to Waiting on re enrolment day until you get to
the front desk to be redirected to another
queue!
Waiting in a line ready to get on a bus or train
Waiting in line at the library to borrow books
1/2/2009 4
Elements of a queuing system Elements of a queuing system
CUSTOMER
SERVICE
FACILITY
SERVER 1
SERVER 2
WAITING TIME
.
.
QUEUE
.
.
.
SERVER M
INPUT TRAFFIC
1/2/2009 5
POPULATION
The Basic Element is a Queue The Basic Element is a Queue
A queue is a characterised by:
Arrival process (input traffic)
Service process (service facility) p ( y)
Service discipline (e.g. FIFO,LIFO,
priority) p y)
Number of servers
Storage or waiting space Storage or waiting space
Items in the queue (customers, people,
packets calls cars etc )
1/2/2009 6
packets, calls, cars etc)
What is Teletraffic Engineering
for?
Dimensioning of telephone network, e.g. Dimensioning of telephone network, e.g.
- sizing of telephone exchanges
d t i i it i d f t k - determining capacity required for trunks
interconnecting exchanges
Di i i f k t t k Dimensioning of packet networks, e.g.
- sizing of buffers in packet switches
- determining networks delays
1/2/2009 7
What is Teletraffic Engineering
for?
Analytical tools are often required to answer
these questions. These tools are based on
queuing theory.
Telecommunication queuing theory is
concerned with the application of queuing
their to telecommunication networks their to telecommunication networks.
This same theory can be applied to other
queues with appropriate modifications for queues with appropriate modifications for
different arrival and service processes.
1/2/2009 8
Arrival and service processes Arrival and service processes
Arrival process and service process can be of
t t two types:
- random (governed by a probabilistic
law) law)
- deterministic
Examples of service disciplines include: Examples of service disciplines include:
- First in first out (FIFO)
- Last in first out (LIFO) Last in first out (LIFO)
- priority (e.g. casualty in a hospital, speech
over data packets in a network)
1/2/2009 9
Examples of a simple queue: Examples of a simple queue:

Arrivals
d t
Waiting space server
Arrivals

departures
Arrival process with mean rate (e.g. packets/sec or
cells/sec)
Service process with mean rate (e g packets/sec or Service process with mean rate (e.g. packets/sec or
cells/sec)
Utilisation (= mean arrival rate/mean service rate) =
/ /
If <1 then on average customers are served more quickly
than they arrive (usual case)
If >1 then the queue grows indefinitely
1/2/2009 10
If >1 then the queue grows indefinitely
Arrival and service processes Arrival and service processes
Most useful (and interesting) queues Most useful (and interesting) queues
are those in which arrival and service
processes are governed by probabilistic processes are governed by probabilistic
rules
Before proceeding to analyse such Before proceeding to analyse such
queues we need a short revision of
relevant probability results relevant probability results
1/2/2009 11
Probability (Revision) Probability (Revision)
Random variable X is a variable whose
value depends on the outcome of a
random experiment p
Can be discrete (e.g. heads or tails
when tossing a coin) or continuous when tossing a coin) or continuous
(e.g. angle between north and a straight
rod which is dropped down at random) rod which is dropped down at random)
1/2/2009 12
Probability (Revision) Probability (Revision)
Random variable X can be described by Random variable X can be described by
its probability distribution function
(PDF) (also known as cumulative (PDF) (also known as cumulative
distribution function CDF)
Note that we use capitals when referring Note that we use capitals when referring
to Probability Distribution Function
abbreviation i e PDF abbreviation i.e. PDF
1/2/2009 13
Probability (Revision) Probability (Revision)
The Probability Distribution Function y
(PDF) is defined as:
F (_) = P(X _)
1/2/2009 14
Probability (Revision) Probability (Revision)
Example of a discrete PDF: Example of a discrete PDF:
F(x)
x
1/2/2009 15
Probability (Revision) Probability (Revision)
For a discrete random variable X we can also
t lk b t th b bilit ith hi h it t k talk about the probability with which it takes a
particular value
P (X=x) = p (x) P (X=x) = p (x)
Note that the PDF for a discrete random
variable Discrete distributions are variable Discrete distributions are
characterized by a probability mass
function, p such that
F(_) = P(X _)
= P(X = _
i
)
1/2/2009 16
_
i
_
Probability (Revision) Probability (Revision)
Example of discrete PDF p
P(X=x)
0.5
2 3 4 5 6 7 1
0
X
0.25
2 3 4 5 6 7 1
0
1.0
P(X x)
PDF
0.25
0.5
X
1/2/2009 17
2 3 4 5 6 7 1
0
X
Probability (Revision) Probability (Revision)
Example of continuous Example of continuous
F (x)
x
1
X
1/2/2009 18
Probability (Revision) Probability (Revision)
For a continuous random variable it is For a continuous random variable it is
sometime more convenient to work with
probability density function (pdf) which probability density function (pdf) which
defined as:
F(_) = dF
X
(_) / d_
1/2/2009 19
Probability (Revision) Probability (Revision)
Example of probability density function Example of probability density function
(pdf)
f (x)
x
Area = P(x X )
2
1
Total area = 1
X
1/2/2009 20
X
x1
x2
Poisson Distribution Poisson Distribution
An example of a discrete distribution is the p
Poisson distribution defined as:
( )
T
T

Random variable K is discrete k = 0 1 2


( )
T
e
k
T
k p k K P

= = =

!
) ( ) (
Random variable K is discrete k = 0,1,2,
Parameter T will be used to describe the
number of arrivals during time interval T in the number of arrivals during time interval T in the
Poisson arrival process in our queuing theory
later
1/2/2009 21
Poisson Distribution Poisson Distribution
PDF of Poisson Distribution:
) ( ) ( k K P k F
k
s =

s
= =
k k
i
i
k k P ) (
sk k
i

=
T k
i
e T) (

(thats as far as we can go, noting k is on integer

sk k
i
i
k !
1/2/2009 22
( g , g g
that starts at 0 and goes to infinity)
0.08
P(k)
Poisson 0 04
0.06
Poisson
distribution
When
0.04
0.02
0
T=25
and its PDF
0 5 10 15 20 25 30 35 40 45 50
P b bilit di t ib ti f ti
0
1
k index P(k<=k)
Probability distribution function
0.6
0.8
0
0.2
0.4
1/2/2009 23
0 15 5 10 20 25 30 35 40
45
50
k index
0.08
P(k)
Poisson
0 04
0.06
distribution
When
T 50
0.04
0.02
0
T=50
and its PDF
0 10 20 30 40 50 60 70 80 90 100
P b bilit di t ib ti f ti
0
1
k index P(k<=k)
Probability distribution function
0.6
0.8
0
0.2
0.4
1/2/2009 24
0 30 10 20 40 50 60 70 80
90
100
k index
Exponential Distribution Exponential Distribution
Example of continuous distribution: The Example of continuous distribution: The
exponential distribution
f
t
(_) = e
-_
_ 0
t
(_) _
The random variable t is continuous the parameter
(will be used to describe inter-arrival times in (
the Poisson arrival process)
What is the Probability Distribution Function for the
exponential?
1/2/2009 25
Exponential Distribution Exponential Distribution
From the definition of the probability density
function function
H PDF
_
_
t
d
dF
f
) (
) ( =
Hence PDF
_ d
}
x
d f f ) ( ) (
}
=
=
x
dx x f f
0
) ( ) (
t t
_
}
x

}
=

=
x
x
dx e f
0
) ( ) (

t
_

1/2/2009 26
x
e

=1
10

6
8
Exponential distribution probability density function lambda = 10
Exponential
distribution 2
4
When
=10
0
1.4
Time in seconds
and its PDF
0.8
1
1.2
0
0.2
0.4
0.6
1/2/2009 27
0
0
0.1 0.2 0.3 0.4 0.6 0.7 0.8 0.9
1
Probability Distribution Function for lambda=10
Next Next
Poisson Arrival Process
1/2/2009 28
Poisson Arrival Process Poisson Arrival Process
Recall our simple queue:

departures
Arrivals
Waiting space server

We will begin by studying the Poisson arrival


process
1/2/2009 29
Poisson Process Poisson Process
Central to queuing theory Central to queuing theory
Enjoys many simplifying properties
making it the simplest nontrivial process to study making it the simplest nontrivial process to study
remember its mean equals its variance!
Can model many physical phenomena e.g. Can model many physical phenomena e.g.
- sequence of gamma rays emitting from a
radioactive particle
- sequence of calls arriving at a telephone
exchange
1/2/2009 30
Poisson Arrival Process Poisson Arrival Process
Consider a sequence of arrival instants (or
epochs) t epochs) t
i
t
1
t
2
t
3
t
4
t
5
0 t
1
t
2
t
3
t
4
t
5
time
TT
We can describe this process by looking at:
1. Inter-arrivals times t
I
or
2. Number of arrivals in some arbitrary time
i l T
1/2/2009 31
interval T
Poisson Arrival Process
Its turns out for a Poisson arrival process:
The number of arrivals in a time interval
is given by a Poisson distribution and,
Inter-arrival times are exponentially p y
distributed
Note also, the variable is given by , g y
p(k)/T, where p(k) is the probability of k
arrivals in the interval T i.e.
i th b f i l is the average number of arrivals
per unit time
1/2/2009 32
Poisson Arrival Process Poisson Arrival Process
Returning to our picture of Poisson Arrival process:
t
1
t
2
t
3
t
4
t
5
0 t t t t t ti 0 t
1
t
2
t
3
t
4
t
5
time
T
N b f i l i i i l T i i b Number of arrivals in a time interval T is given by a
Poisson distribution: ( )
T
e
k
T
k p k K P

= = =

!
) ( ) (
Inter-arrival times t
i
are exponentially distributed:
f (t) = .e
-t
k!
1/2/2009 33
f (t) .e
Poisson Arrival Process Poisson Arrival Process
Formal definition
Consider a small time interval At (At 0) ( )
1. P(1 arrival in time At) = At + o(At)
2. P(0 arrivals in time At) = 1 - At + o(At) 2. P(0 arrivals in time At) 1 At o(At)
3. An arrival in one time interval At is
independent of arrivals in previous p p
intervals (as tossing a coin is independent
of the pervious toss a memory less
property)
Where o(At) implies higher order terms:
1/2/2009 34
p(2 or more arrivals in time At) =o(At)
Poisson Arrival Process Poisson Arrival Process
As the time interval At goes to zero (At 0) the As the time interval At goes to zero (At 0) the
terms o(At) which are involving (At)
n
, n=2,3,
goes to zero faster, thus we can ignore and
reform the first two probabilities to be:
1. P(1 arrival in time At) = At
2. P(0 arrivals in time At) = 1-At
Above definition leads to Poisson distribution of
number of arrivals in time interval T.
1/2/2009 35
Poisson Arrival Process Poisson Arrival Process
Question:
How do Poisson
arrivals lead to
exponential
inter-arrival
distribution?
1/2/2009 36
Poisson Arrival Process Poisson Arrival Process
t
ti
Let =random variable representing the time to first
0 x
First
arrival
time
Let t=random variable representing the time to first
arrival after some arbitrary time origin. Consider
interval (0,x) where x is any positive time less than t.
No arrivals occur in this interval (0 x) if and only if No arrivals occur in this interval (0,x) if and only if
t>x!
The probability that this is true is simply the probability
that no arrivals occur in the interval (0.x) given by: that no arrivals occur in the interval (0.x) given by:
P(t>_) = P (number of arrivals in (0,_) = 0) = p(0)
= (_)
0
e
-_
/ 0!
1/2/2009 37
= e
-_
Poisson Arrival Process Poisson Arrival Process
t
ti
So the probability that x the probability that an arrival
0 x
First
arrival
time
So the probability that tx, the probability that an arrival
occurs in the interval (0,x), the inter-arrival time, is
simply given by the probability that t>x subtracted
from 1 (total sum of all probability events is 1): from 1 (total sum of all probability events is 1 ):
P(t_) = 1 - P(t>_)
= 1 e
-_
But this is the Probability Distribution Function of F
t
(x)
for the exponential distribution:
P(t_) = F (_) = 1 e
-_
1/2/2009 38
P(t_) F
t
(_) 1 e
Poisson Arrival Process Poisson Arrival Process
Example
A th t th i t i l ti f Assume that the inter-arrival times of
buses between UTM and KLCC are
exponentially distribution with parameter exponentially distribution with parameter
=10 buses/hour. You just missed a
bus bus.
Q Whats the probability that the next Q. What s the probability that the next
bus arrives within t=5 minutes from
now?
1/2/2009 39
now?
Poisson Arrival Process Poisson Arrival Process
Example
Answer. Distribution of time to the next bus is s e s bu o o e o e e bus s
given by exponential PDF.
t
P (xt) = 1 e
-t
0
bus arrives in this
interval
time
P (xt) = 1 e
t
= 1 e
-(10buses/hour)(5 min/60min/hour)
= 0.565
So the chances are just over 50% that another bus
1/2/2009 40
will arrive in 5 minutes
Poisson Arrival Process Poisson Arrival Process
Amazing Property of Exponential Distribution! g p y p
- Past history of an exponentially distributed
random variable plays no role in predicting its p y p g
future!
- This is called the memory less or Markov y
property.
- Exponential distribution is the only continuous
distribution with this property!
1/2/2009 41
Poisson Process as a Markov
Chain
Poisson process can be described by Poisson process can be described by
means of a Markov chain (or state
diagram): diagram):
Process begins in state 0 at time 0
Transition from a state k is only possible Transition from a state k is only possible
to a state k+1
P (transition from k to k+1 in time At)=At+o(At)
1/2/2009 42
Poisson Process as a Markov
Chain


0 1 2 3 K-1 k K+1
States represent the number of arrivals since time 0.
Rate is called the transition rate of Rate is called the transition rate of
the process. This is also called a pure
birth process (pure since is constant birth process (pure since is constant
and birth since the number of arrivals
always increases)
1/2/2009 43
always increases).
Aggregating Poisson Arrival
Processes
1
2

=1+2+3+n
;
;
Same for the variance
When merging (aggregating) n in dependent
Poisson processes with rates
n
Poisson processes with rates
1
,
2
,
3
,.
n
the merged stream is also Poisson with rate
=
1
+
2
+
3
+
n
. This property will be very
1 2 3 n
p p y y
useful when we deal with queuing systems
where input consists of a number of
1/2/2009 44
independent Poisson arrival streams
Simple Queue Simple Queue
Recall our simple queue:

server
departures
Arrivals

Waiting space
So far we have studied the Poisson arrival
server Waiting space
So far we have studied the Poisson arrival
process. Now consider the service process.
1/2/2009 45
Service Process Service Process
Similarly to the arrival process, service
time distribution can be exponential time distribution can be exponential
f
R
(r) = e
- r
Where R is the random variable for
t i ti i th customer service times, is the
average service rate and hence the
average service time is given as 1/
1/2/2009 46
average service time is given as 1/
The M/M/1 Queue The M/M/1 Queue
The queue in which
- arrival process is Poisson (i.e. inter-
arrival times are exponentially distributed)
service time distribution is exponential - service time distribution is exponential
there is only 1 server
- there is no limit on waiting space size is there is no limit on waiting space size is
called the M/M/1 queue
M stands for Markov or memory less y
This is the most fundamental, most studied and
most applied queue in queuing theory.
1/2/2009 47
General Queue Notation General Queue Notation
Kendalls notation:
A/B/n
1
/n
2
/n
3
A/B/n
1
/n
2
/n
3
Where
A i t i l di t ib ti G l (G) M k A = inter-arrival distribution; General (G), Markov
(M), Deterministic (D) etc..
B = service time distribution, General (G), B service time distribution, General (G),
Markov (M), Deterministic (D) etc..
n
1
= number of servers
iti i l di th t i ( ) n
2
= waiting space including that in server(s)
n
3
= number in population
Note: if a descriptor is omitted then it is assumed
1/2/2009 48
Note: if a descriptor is omitted then it is assumed
to be
Example of another Queue
D/D/1
Both inter-arrival time and service time Both inter arrival time and service time
distributions are deterministic
There is only one server There is only one server
Waiting space and population are infinite
(h itt d f th t ti ) (hence omitted form the notation)
D/D/1 is a trivial queue to analyse (ever
thing is deterministic)
1/2/2009 49
Guess What these Queues are? Guess What these Queues are?
M/M/K?
M/M/1/K? waiting space = K-1, 1
server, Markov inter-arrival and
i i di ib i service time distributions
M/M/K/K?
M/M/N/K? M/M/N/K?
M/D/1?
M/G/1? M/G/1?
M/G/1/K?
G/G/1?
1/2/2009 50
G/G/1?