Queueing System
Queueing System
Queuing System
Entered Service
Arriving Served
Population of customers mechanism Customers
Customers
prospective
customers C C C Customer
queue in service
Basic Elements of a Queuing System
(i) Population of prospective customers
(ii) Arrival Pattern or probability distribution
of inter arrival times
(iii) Queue
(iv) Queue discipline or service discipline
(v) Service Mechanism
(vi)Probability distribution of customer
service times
(vii) State of the System
Population of prospective
customers
This is an input source from which
customers requiring service are generated
over time.
Size of population:
If arrival rate of customer to the queueing
system is affected by no. of customer in
the queueing system the population is
assumed as finite otherwise infinite.
Arrival pattern of customers We assume customers
arrive in a Poisson process. This is same as assuming
the interval times are exponential random variables
with the same parameter (i.e., the same parameter
which given in Poisson Process )
Queue: A queue is characterized by the maximum
permissible number m of customers that it can
contain. A queue is called infinite or finite if this
number is infinite of finite.
Queue Discipline The rule for selecting the next
the customer from the queue for sevice
FCFS First Come First Serve
LCFS Last Come First Serve
SIRO Service in Random Order
Sometimes on the certain priority basis
Service Mechanism A service station may have
one or several servers arranged in parallel.
Another service mechanism may consists of
several service facilities in a series.
Service Time Distribution Service times for
different customers will be assumed to be
independent and exponential random variables.
L W
Lq Wq
where n Pn , called effective arrival rate
n 0
In each queueing problem, the parameters Pn , L, Lq , W and Wq to
be determined.
P(A|N(T ) = n) = n T + o(T ).
P(B|N(T ) = n) = n T + o(T ).
P(C|N(T ) = n) = 1 (n + n )T + o(T ).
dPn (T )
= Pn (T ) + Pn1 (T ), for n 1 and
dT
dP0 (T )
= P0 (T ).
dT
(T )n eT
The solution in this case will be Pn (T ) = n! , n 0 and
T > 0.
dPn (T )
If limT Pn (T ) = Pn and limT dT = 0 for all n 0,we have
0 = 1 P1 0 P0 .
Pn+1 = n+1
n
Pn for n 0 and Pn = 0 1 1 2 n1
n
P0 for n 1.
As 0 0 1
P
n=1 P n = 1 which implies P0 1 + 1 + 1 2 + = 1.
n , n 0,1, 2,...
n , n 1, 2,...
n
Now Cn = = n , n 1,2,.......
1 1.
and S = 1 + C1 + C2 + ............. if
1
Thus for existence of steady state probabilities, we must
have 1.
P0 = 1 = 1 -
S
n
Also, Pn = Cn P0 = (1 - ), n = 0,1, 2, ...
which is geometric distribution with
probability of success 1 -
Hence, the steady state number of customers follows
geometric distribution.
Performance Measures:
L 1
L E(N ) , W
1
1 2
Wq W , Lq Wq
s ( ) ( )
Model 2. (M/M/1) : (FCFS/m/) with
, for n 0,1,..., m 1
n n for all n.
0, for n m
This gives 2 m
S 1 ...
1 2 ... m
1 m 1
if 1 or
1
and S m 1,
Therefore,
1
1 m 1 ,
P0
1 ,
m 1
and
(1 ) n
m 1
, , n 0,1,..., m
1
Pn
1 , , n 0,1,..., m
m 1
m m 1
n Pn Pn (1 Pm )
n0 n 0
Now, if , then
m
(1 ) n
m
L E ( N ) nPn n m 1
n 0 n 0 1
m m 1
(1 ) n ( m 1)
1 m 1
n0
n
1
1 m 1
m
1 m
If , then L n
n0 m 1 2
L L 1
W , Wq W
(1 Pm )
and Lq Wq
Model 3. ( M/M/s ) : (FCFS/ / ) with
n , ns
n , n 0,1, 2,... and n
s , ns
n
1 1 n
Therefore, Cn , for n 1, 2,..., ( s 1).
n! n!
1
and Cn n , for n s.
s ns s !
2 s 1 s s 1 s2
S 1 ... 2 ...
2! ( s 1) ! s! ss ! s s!
s 1
n
s
1 if s.
n0 n! s ! 1
s
For existence of steady state probabilities, we must
have s.
1
s 1 n s
1 1
Now P0
S
n 0 n ! s ! 1
s
n
P0 , n 0,1, ..., ( s 1).
n!
and Pn n
P0 , n s.
n
s s! s
sk
Lq ( n s ) P kP
ns
n
k 0
sk k k P0
k 0 s s!
s k s 1 2
P0 k k P0
s ! k 0 s
1
ss ! s
Lq
Wq
1
W Wq
L W
Model 4. (M/M/s) : (FCFS/m/) with
, for n 0,1,..., m 1 n , for n s
n and n
0, for n m s , for n s
2 2 s
Thus, C1 , C2 2
,..., Cs
2 2 s!
s m
and Cs 1 ,..., Cm m s
s! s s s!
Also, S 1 C1 C2 ... Cm
2 s 1 s ms
We get S 1 ... 1 ... m s
2 ( s 1)! s ! s s
m s 1
1
s 1
n
s
s
, 1
n 0 n ! s!
1
s s
s 1 n s
and S
n0 n!
s!
( m s 1), if
s
1
Therefore,
1
m s 1
1
s 1 n s s , if 1
n 0 n ! s !
P0
1
s
s
n s 1
s 1
n! s ! (m s 1) , if
s
1
n 0
n
P0 , for n 0,1,..., s 1
n!
n
Also , Pn n s P0 , for n s , s 1,..., m
s s!
0, for n m 1, m 2...
Now Lq (n s ) Pn kPk s
ns k 0
m s sk
k k P0
k 0 s s!
s 1 2 m s 1
P0 1 2 3 2 ... ( m s) m s 1
ss ! s s s
ms ms 1
s1 1 (m s 1) (m s)
s s
Lq P0 2
s s!
1
s
Also, (1 Pm )
Lq 1
Thus, Wq , W Wq
L W
Model 5. ( M /M /s ) : ( FCFS/K /K )
This Model, the limited source model in which there are
only K customers, is called the machine repair model,
the machine inference model or the cyclic queue model.
K- total number of machines working in parallel.
s- Number of mechanics (servers) and s K.
Assumptions:
1. The time until breakdown of a machine has
exponential distribution with parameter and the
machines function independently.
2. The service time of each machine is exponentially
distributed with parameter and service times are
independent.
Let there be n machines in the repair shop (system).
( K n ) machines are functioning.
Let T be the time until next machine arrives.
T min{T1 , T2 ,........., T( K n ) },
where Ti is the time until breakdown of the i th machine.
T has exponential distribution with parameter (K n).
The arrival occurs in poisson process with mean
( K n ), when there are n-customers in the system.
( K n) , n 0,1,..., K 1
n
0, nK
n , n 1, 2,..., s 1
Now n
s , ns
and
K K ( K 1) 2 K ( K 1) 2
C1 K , C2 2
1. 1.2 2
K! n
, n 1, 2,..., s 1
n !( K n)!
Cn
K! n
, n s, s 1,...K
s n s s !( K n)!
s 1 K
K! n K!
S ns n
n 0 n !( K n )! ns s s !( K n)!
P0 1
S
K! n
n !( K n)! P0 , n 1, 2,..., s 1
K!
Pn n s n P0 , n s, s 1,..., K
s s !( K n)!
0, nK
K
L nPn ,
n 0
K K
n Pn ( K n) Pn ( K n) Pn ( K L)
n 0 n 0 n 0
L 1
W , Wq W , L q W q .
Problem 1:
Ans: 5, t 0.5
t
e
2
P( X 2) (t)
2!
Problem 2: In a barbers shop with a single barber,
there are three chairs. Out of these, one chair is
for hair cutting and the other two for waiting inside
the shop. The customers arrive according to
Poisson distribution with average 2 customers per
hour. The service time is exponential with mean 20
minutes per customers. If all the chairs are
occupied, then any customer that comes goes
elsewhere for hair cutting. Find the probability that
(i) a customer will get a chair to sit.
(ii) a customer will get immediate service.
(iii) a customer will wait outside the shop or go
elsewhere for hair cutting.
Also find L and W.
Solution:
2
2, 3, m=3, .
3
(i) P0 P1 P2 1 P3
(ii) P0
(iii) P(n 3) P3
L
L P1 2P2 3P3, 2(1 P3 ), W .
Problem 3: Trains arrive at the yard exponentially
every 15 minutes and the service time is also
exponential with a mean of 30 minutes. If the line
capacity of the yard is limited to 4 trains, find
Ans:
1 98
(a) P0 (b) L
31
31
Problem 4: Problem VII.3 Page 7.70
A telephone exchange has two long distance
operators. During the peak hours, long distance
calls arrive in a Poisson process at the mean rate
of 15 per hour. The length of service on these
calls is approximately exponential with mean 5
minutes.
(a) Find the probability that a subscriber will wait
for his long distance call during the peak
hours?
(b) Find the mean waiting time in the queue?
Solution: (M/M/2) : (FCFS//) model
with = 15, = 12, = 5/4<2
1 1 3
P0 s1 n s
2
13
n! s!(1 / s) 1 2
n0
P1 = P0 =15/52
Thus the probability that a new subscriber will wait for
the long distance call = Probability that the number of
customers in the system 2=1 - P0 - P1= 0.48
s1
25 5 64 3 125
Lq P
2 0
ss!(1 / s) 32 8 9 13 156
Lq 125 25
Wq hr 3.2min.
15615 468
Problem 5: Problem VII.5 Page 7.70
At a service station, customers arrive in a Poisson process at
the rate of 15 per hr. The service time of a customer is
exponential with mean 6 minutes. A server has to be paid Rs.
4/- per hour and the cost incurred and borne by the service
station due to the presence of a customer in the system is
Rs. 10/- per hr per customer.
(a) What is the minimum number of servers needed for
steady state to exist?
(b) What is the optimum number of servers needed to
minimize the expected cost per hr?
(c) If the service station charges Rs. 20/- from each served
customer (irrespective of the time devoted to serving
him), what is the optimum number of servers needed to
maximize the per hr net revenue of the service station?
Solution: Solution We have a (M/M/s) : (FCFS//) model
with = 15, = 10, =1.5
Thus for steady state to exist we must have < s
or s 2.
Case (i) s = 2.
1 9 48
P0 , Lq , L .
7 38 14
Expected Total cost per hour = 10 L + 4s =42.28.
Case (ii) s=3.
Expected Total cost per hour=10*66/38+4*3=29.36
Case (ii) s 4.
Expected Total cost per hour 31.
Thus optimum number of servers =3.
Problem 6: Arrival rate of telephone calls at a telephone booth
is according to Poisson distribution, with an average time of 9
minutes between two consecutive arrivals. The length of a
telephone call is assumed to be exponentially distributed with
mean 3 minutes.
(b) Find the average queue length that forms from time to time.
(c) Find the fraction of a day that the phone will be in use.
(i) P0 .
(iii) P ( n 1 4 ) 1 P1 5 .
Problem 8. In a car repairing shop, there are two
mechanics for repairing the cars. The cars come in
a Poisson pattern on an average 3 cars per day.
The service time for any mechanic is exponentially
distributed with mean 4 hours. Assuming 8 hours
working day, find
(a) the hours of the day for which all the mechanics
are busy.
(b) the probabilities that both the mechanics are idle,
one mechanic is idle.
(c) the expected number of cars in the queue.
(d) the expected waiting time of a car in queue.
Solution 8.
We have (M/M/2) : (FCFS/ /) with
= 3, = 2 per day and =1.5 .
(a) P ( n 2 ) 1 P 0 P1 .
(b) P(both the mechanics are idle)= P 0 .
P1
P(one mechanic is idle)= P 0 .
2
(c) the expected number of cars in the queue= L q .
1 1 8
P0 2 3 4
1 1 1 23
1 11
2! 2! 2 2! 4 2 4 8
1 1 16
P0 2 3 4 5
1 1 1 1 47
1 11
2! 2! 2 2! 4 2!8 2 4 8 16
P1= P0 = P0 =16/47, P2= 2P0/2 =8/47,
P3= 3P0/4 =4/47, P4 = 4P0/8 = 2/47, P5 =1/47.
460
L=57/47, (1 P5 ) 9.79.
47
2 4 6 6 3
P0 , P1 , P2 , P3 , P4 .
21 21 21 21 21
L= P1+2P2+3P3+4P4 = 46/21 and
the expected cost for the firm = 30 L+15=80.71
Solution
Withdrawals Deposits W/D & DEP W/D&DEP
14 16 30 30
20 20 20 120/7
7/10 4/5 3/2 7/4
P0 3/10 1/5 1/7 1/15
Lq 49/30 16/5 27/14 343/60
L 7/3 4 24/7 112/15
W 1/6 1/4 4/35 112/450
=10 mts = 15 mts = 6.86 mts =14.93 mts