introduction to queueing theory
DESCRIPTION
Introduction to Queueing Theory. Motivation. First developed to analyze statistical behavior of phone switches. Queueing Systems. model processes in which customers arrive. wait their turn for service. are serviced and then leave. Examples. supermarket checkouts stands. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/1.jpg)
Introduction to Queueing Theory
![Page 2: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/2.jpg)
Motivation
First developed to analyze statistical behavior of phone switches.
![Page 3: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/3.jpg)
Queueing Systems
model processes in which customers arrive.
wait their turn for service.
are serviced and then leave.
![Page 4: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/4.jpg)
Examples
supermarket checkouts stands.
world series ticket booths.
doctors waiting rooms etc..
![Page 5: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/5.jpg)
Five components of a Queueing system:
1. Interarrival-time probability density function (pdf)
2. service-time pdf 3. Number of servers 4. queueing discipline 5. size of queue.
![Page 6: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/6.jpg)
ASSUME
an infinite number of customers (i.e. long queue does not reduce customer number).
![Page 7: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/7.jpg)
Assumption is bad in :
a time-sharing model.with finite number of customers.
if half wait for response, input rate will be reduced.
![Page 8: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/8.jpg)
Interarrival-time pdf
record elapsed time since previous arrival.
list the histogram of inter-arrival times (i.e. 10 0.1 sec, 20 0.2 sec ...).
This is a pdf character.
![Page 9: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/9.jpg)
Service time
how long in the server? i.e. one customer has a shopping cart full the other a box of cookies.
Need a PDF to analyze this.
![Page 10: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/10.jpg)
Number of servers
banks have multiserver queueing systems.
food stores have a collection of independent single-server queues.
![Page 11: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/11.jpg)
Queueing discipline
order of customer process-ing.
i.e. supermarkets are first-come-first served.
Hospital emergency rooms use sickest first.
![Page 12: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/12.jpg)
Finite Length QueuesSome queues have finite length: when full customers are rejected.
![Page 13: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/13.jpg)
ASSUME
infinite-buffer. single-server system with first-come.
first-served queues.
![Page 14: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/14.jpg)
A/B/m notation
A=interarrival-time pdfB=service-time pdfm=number of servers.
![Page 15: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/15.jpg)
A,B are chosen from the set:
M=exponential pdf (M stands for Markov)
D= all customers have the same value (D is for deterministic)
G=general (i.e. arbitrary pdf)
![Page 16: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/16.jpg)
Analysibility
M/M/1 is known. G/G/m is not.
![Page 17: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/17.jpg)
M/M/1 system
For M/M/1 the probability of exactly n customers arriving during an interval of length t is given by the Poisson law.
![Page 18: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/18.jpg)
Poisson’s Law
Pn (t )(t)n
n!e t (1)
![Page 19: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/19.jpg)
Poisson’s Law in Physicsradio active decay –P[k alpha particles in t seconds]– = avg # of prtcls per second
![Page 20: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/20.jpg)
Poisson’s Law in Operations Researchplanning switchboard sizes –P[k calls in t seconds]– =avg number of calls per sec
![Page 21: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/21.jpg)
Poisson’s Law in Biologywater pollution monitoring –P[k coliform bacteria in 1000 CCs]– =avg # of coliform bacteria per cc
![Page 22: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/22.jpg)
Poisson’s Law in Transportationplanning size of highway tolls –P[k autos in t minutes]– =avg# of autos per minute
![Page 23: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/23.jpg)
Poisson’s Law in Opticsin designing an optical recvr –P[k photons per sec over the surface of area A] – =avg# of photons per second per unit area
![Page 24: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/24.jpg)
Poisson’s Law in Communications in designing a fiber optic xmit-rcvr link –P[k photoelectrons generated at the rcvr in one second] – =avg # of photoelectrons per sec.
![Page 25: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/25.jpg)
- Rate parameter =event per unit interval (time distance volume...)
![Page 26: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/26.jpg)
Poisson’s Law and Binomial LawThe Poisson law results from asymptotic behavior of the binomial law in the limit as: –the prob[event]->0 –# of trials -> infinity–the number of events is small compared with the number of trials
![Page 27: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/27.jpg)
Example:
let
interarrival rate 10 cust. per minn the number of customers
100t interval of finite length
![Page 28: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/28.jpg)
We have:
P10(t),10P0(t)et
t 0P1(t)tet
a(t)tettet
![Page 29: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/29.jpg)
a(t)dtt 0
•
1
proof:
eax
dx ea
e tdt e t
e t
e • e 0 1
ax
![Page 30: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/30.jpg)
a(t)dt e t
dt
a(t)t
prob .V that an interarrival interval is between t and t + t:
![Page 31: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/31.jpg)
Analysis
Depend on the condition:
we should get 100 custs in 10 minutes (max prob).
= interarrival rate = 10 cust. per min
n = the number of customers = 100
![Page 32: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/32.jpg)
In maple:P10 (t ), 10
0 5 10 15 200
0.01
0.02
0.03
0.04
t
![Page 33: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/33.jpg)
To obtain numbers with a Poisson pdf, you can write a program:
![Page 34: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/34.jpg)
total=length of sequencelambda = avg arrival rateexit x() = array holding numbers with Poisson pdf
local num= Poisson valuer9 = uniform random numbert9= while loop limitk9 = loop index, pointer to x()
![Page 35: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/35.jpg)
for k9=1 to totalnum=0r9=rndt9=exp(-lambda)
while r9 > t9num = num + 1r9 = r9 * rndwend
x(k9)=numnext k9(returns a discrete Poisson pdf in x())
![Page 36: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/36.jpg)
Prove:
Poisson arrivals gene-rate an exponential interarrival pdf.
![Page 37: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/37.jpg)
Prove:
– prob. that an interarrival interval is between t and t +
–This is the prob. of 0 arrivals for time t times the prob. of 1 arrival in Dt:
a(t)t
ta(t)t=P0 (t)P1(t)
![Page 38: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/38.jpg)
Subst into :
Poisson’s Law:
Pn (t ) =(t)n
n!e−t (1)
![Page 39: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/39.jpg)
Now you get:
P0 (t) =e−t
P1(t)=te−t
![Page 40: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/40.jpg)
We already knew:
In the limit as the exponential factor in:
t → 0
P1(t)=te−t
approaches 1.
![Page 41: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/41.jpg)
So by subset:
a(t)t=P0 (t)P1(t)
a(t)t=e−tte−t=and
a(t)dt =e−tdt (2)
with a (t )dtt 0
• 1
![Page 42: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/42.jpg)
e axdx eax
a
e tdt e t
e t
e • e 0 1
a (t )dtt 0
• 1
![Page 43: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/43.jpg)
We have made several assumptions:exponential interarrival pdf.
exponential service times (i.e. long service times become less likely)
![Page 44: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/44.jpg)
The M/M/1 queue in equilibrium
queue
server
![Page 45: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/45.jpg)
State of the system:
There are 4 people in the system.
3 in the queue. 1 in the server.
![Page 46: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/46.jpg)
Memory of M/M/1:
The amount of time the person in the server has already spent being served is independent of the probability of the remaining service time.
![Page 47: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/47.jpg)
Memoryless
M/M/1 queues are memoryless (a popular item with queueing theorists, and a feature unique to exponential pdfs).P kequilibrium prob .
that there are k in system
![Page 48: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/48.jpg)
Birth-death system
In a birth-death system once serviced a customer moves to the next state.
This is like a nondeterminis-tic finite-state machine.
![Page 49: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/49.jpg)
State-transition Diagram
The following state-transition diagram is called a Markov chain model.
Directed branches represent transitions between the states.
Exponential pdf parameters appear on the branch label.
![Page 50: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/50.jpg)
Single-server queueing system
0 1 2 k-1 k k+1...
Po P1 Pk-1 Pk
μPk μPk+1μP1 μP2
![Page 51: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/51.jpg)
Symbles:
=mean arrival rate (cust. /sec)
μ =mean service rate (cust./ sec)
P0mean number of transitions/ secfrom state 0 to 1
μP1mean number of transitions/ sec
from state 1 to 0
![Page 52: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/52.jpg)
States
State 0 = system empty
State 1 = cust. in server
State 2 = cust in server, 1 cust in queue etc...
![Page 53: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/53.jpg)
Probalility of Given State
Prob. of a given state is invariant wrt time if system is in equilibrium.
The prob. of k cust’s in system is constant.
![Page 54: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/54.jpg)
Similar to AC
This is like AC current entering a node
is called detailed balancing
the number leaving a node must equal the number entering
![Page 55: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/55.jpg)
Derivation
P0 = μP1
P1 =P0
μ
P1 = μP2
P 2 =P1μ
3
3a
4
4a
![Page 56: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/56.jpg)
by 3a
P 2 = P0
μμ
P2 =2P0
μ 2
P k = μP k+1
=4
since
5
![Page 57: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/57.jpg)
then:
P k =kP0
μ k =ρkP06
where = traffic intensity < 1ρ =μ
![Page 58: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/58.jpg)
since all prob. sum to one
ρ kP0k = 0
∞
∑ =1=P0 ρ k
k =0
∞
∑ = 16a
Note: the sum of a geometric series is
ρ kk = 0
∞
∑ =1
1− ρ7
![Page 59: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/59.jpg)
Suppose that it is right, cross multiply and simplify:
ρ k
k 0
•
1
1 ρ
ρ kk=0
∞
∑ − ρ ρ k
k=0
∞
∑ = 1
ρ kk=0
∞
∑ − ρ k
k=1
∞
∑ = ρ 0 = 1SoQ.E.D.
![Page 60: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/60.jpg)
subst 7 into 6a
P0
1−ρ=1
P0 ρkk0
•
16a
7a and
P0 =1−ρ=prob server is empty
7b
![Page 61: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/61.jpg)
subst into
P k =kP0
μ k =ρkP06
yields:
P k =(1−ρ)ρk8
![Page 62: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/62.jpg)
Mean value:
let N=mean number of cust’s in the system
To compute the average (mean) value use:
E[k ]= kPkk=0
∞
∑8a
![Page 63: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/63.jpg)
Subst (8) into (8a)
P k =(1−ρ)ρk
E[k ]= kPkk=0
∞
∑
E[k ]= k(1−ρ)ρkk=0
∞
∑ =(1−ρ) kρkk=0
∞
∑
8
8a
8b
we obtain
![Page 64: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/64.jpg)
differentiate (7) wrt k
ρ kk = 0
∞
∑ =1
1− ρ
Dk ρkk=0
∞
∑ =Dk1
1−ρ= kρk−1k=0
∞
∑ =1
(1−ρ)2
7
we get
8c
![Page 65: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/65.jpg)
multiply both sides of (8c) by ρ
kρkk=0
∞
∑ =ρ
(1−ρ)2
E[k ]=N =(1−ρ)ρ
(1−ρ)2=
ρ(1−ρ)
8d
9
![Page 66: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/66.jpg)
Relationship of , N
ρ
0 0.2 0.4 0.6 0.8 10
20
40
60
80
rho
as r approaches 1, N grows quickly.
![Page 67: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/67.jpg)
T and
T=mean interval between cust. arrival and departure, including service.
=mean arrival rate (cust. /sec)
![Page 68: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/68.jpg)
Little’s result:
In 1961 D.C. Little gave us Little’s result:
T =N
=ρ / 1−ρ
=1 / μ1−ρ
=1
μ −10
![Page 69: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/69.jpg)
For example:
A public bird bath has a mean arrival rate of 3 birds/min in Poisson distribution.
Bath-time is exponentially distributed, the mean bath time being 10 sec/bird.
![Page 70: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/70.jpg)
Compute how long a bird waits in the Queue (on average):
=0.05 cust / sec = 3 birds / min * 1 min / 60 sec
= mean arrival rate
μ = 0.1 bird / sec = 1 bird
10 sec
= mean service rate
![Page 71: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/71.jpg)
Result:
So the mean service-time is 10 seconds/bird =(1/ service rate)T =
1μ −
=1
0.1−0.05=20sec
for wait + service
![Page 72: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/72.jpg)
Mean Queueing Time
The mean queueing time is the waiting time in the system minus the time being served, 20-10=10 seconds.
![Page 73: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/73.jpg)
M/G/1 Queueing System
Tannenbaum says that the mean number of customers in the system for an M/G/1 queueing system is:
N =ρ +ρ2 1+Cb2
2(1−ρ)11
This is known as the Pollaczek-Khinchine equation.
![Page 74: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/74.jpg)
What is Cb
Cb = standard deviation mean
of the service time.
![Page 75: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/75.jpg)
Note:
M/G/1 means that it is valid for any service-time distribution.
For identical service time means, the large standard deviation will give a longer service time.
![Page 76: Introduction to Queueing Theory](https://reader036.vdocuments.us/reader036/viewer/2022062423/56814498550346895db13c52/html5/thumbnails/76.jpg)
Introduction to Queueing Theory