0% found this document useful (0 votes)
4 views

Lecture 8

Lecture 8 covers queuing theory, which studies the behavior of queues in various systems where customers wait for service. It includes definitions, basic elements of queuing systems, Little's Law, and Kendall's notation, along with practical applications in fields such as telecommunications and healthcare. The lecture also provides examples and calculations for different queuing scenarios, illustrating key concepts such as arrival and service rates, average waiting times, and queue lengths.

Uploaded by

fakespam690
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lecture 8

Lecture 8 covers queuing theory, which studies the behavior of queues in various systems where customers wait for service. It includes definitions, basic elements of queuing systems, Little's Law, and Kendall's notation, along with practical applications in fields such as telecommunications and healthcare. The lecture also provides examples and calculations for different queuing scenarios, illustrating key concepts such as arrival and service rates, average waiting times, and queue lengths.

Uploaded by

fakespam690
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

LECTURE 8 – QUEUING THEORY

8.1 Definitions

 A queuing process consists in customers arriving at a service facility, then waiting in a line
(queue) if all servers are busy, eventually receiving service, and finally departing from the
facility. A queuing system is a set of customers, a set of servers, and an order whereby
customers arrive and are processed.
 (Bose) “the basic phenomenon of queuing arises whenever a shared facility needs to be
accessed for service by a large number of jobs or customers.”
 (Wolff) “The primary tool for studying these problems [of congestions] is known as queueing
theory.”
 (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this study
Queueing Theory." "Any system in which arrivals place demands upon a finite capacity
resource may be termed a queuing system.”
 (Mathworld) “The study of the waiting times, lengths, and other properties of queues.”
 Applications of Queuing Theory:
 Telecommunications
 Traffic control
 Determining the sequence of computer operations
 Predicting computer performance
 Health services (eg. control of hospital bed assignments)
 Airport traffic, airline ticket sales
 Layout of manufacturing systems.
 In many retail stores and banks
o multiple line/multiple checkout system → a queuing system where customers
wait for the next available cashier
o We can prove using queuing theory that: throughput improves increases when
queues are used instead of separate lines

AHA – Lecture 8 1
8.2 Basic Elements

 Arrival distribution
 Single or bulk arrival

 Service time distribution


 Single or bulk service

 Design of service facility


 Series, parallel, or network stations

 Queue discipline or service discipline (priority)


 FCFS – first come, first serve
 LCFS – last come, first serve
 SIRO – service random order
 PRI – priority ordering
 Any other specialized ordering

 Queue size
 Finite or infinite

 Calling source
 Finite or infinite

 Human behaviour
 Balking: occurs when an arriving customer refuses to enter the service facility because
the queue is too long.
 Reneging: occurs when a customer already in a queue leaves the queue and the facility
because the wait is too long.
 Jockeying: occurs when a customer moves to another waiting line to reduce his waiting
time.

8.3 Little’s Law

System

Arrivals Departures

Mean number tasks in system = arrival rate x mean response time


 Observed before, Little was first to prove
Applies to any system in equilibrium, as long as nothing in black box is creating or destroying
tasks
 L = W or Lq = Wq
 Where
o L: is the average number of customers in the system
Arrivals
o Lq: is average number of customers in the queue
Packet 3 in 3 (or waits) in the system.
o W:# is the
2
average time a customer #spends
System 2
o Wq: is the
1 average time a customer spends 1 (or waits) in the queue.
Departures
o : is the average customer arrival rate
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Time Time

Time in 3
J = Shaded area = 9
System 2
AHA – Lecture 8 2Same in all cases!
1
1 2 3
Packet #
Example
Observe 120 cars in front of the Nyali bridge
Observe 32 cars/minute depart over a period where no cars in the bridge at the start or end
What is average waiting time before and in the bridge?

W  L 120
32 3.75min

8.4 Kendall’s Notation

 v \ w \ x \ y 
\z

First three typically used, unless specified


 v: Arrival Distribution e.g. probability of a new packet arrives in time t
 w: Service Distribution e.g. probability distribution packet is serviced in time t
 x: Number of servers
 y: Total Capacity (infinite if not specified)
 z : Service Discipline (e.g. FCFS/FIFO)

If y or z is not specified ; it is taken to be ∞ or FIFO, respectively.

Common inter-arrival or service time used include:


• M: Exponential
• D: Deterministic (e.g. fixed constant)
• Ek: Erlang with parameter k
• Hk: Hyperexponential with param. k
• G: General (anything)

Examples
• M/M/1: Exponential arrivals and service, 1 server, infinite capacity and population, FCFS
(FIFO)
• M/M/m: Same, but M servers
• G/G/3/20/1500/SPF: General arrival and service distributions, 3 servers, 17 queue slots
(20-3), 1500 total jobs, Shortest Packet First

8.5 M/M/1 Queue Model

AHA – Lecture 8 3
L
Lq

 

1
Wq 

Goal: A closed form expression of the probability of the number of jobs in the queue (P i) given
only  and 

• Given:
• : Arrival rate of jobs (packets on input link)
• : Service rate of the server (output link)
• Solve:
• L: average number in queuing system
• Lq average number in the queue
• W: average waiting time in whole system
• Wq average waiting time in the queue
• 4 unknown’s: need 4 equations

• 4 unknowns: L, Lq W, Wq
• Relationships using Little’s law:
– L=W
– Lq=Wq (steady-state argument)
– W = Wq + (1/)
• If we know any 1, can find the others
• Finding L is hard or easy depending on the type of system. In general:

Equilibrium Condition

Inflow = outflow
1. (-)Pn = Pn-1 + Pn+1

2. Pn = Pn+1 2
P1  P0 , P2   P0 ,
Stability:
1:   Pn   P0
n

3. ≤,  = / for  ≤ 1


Solvingfor P0 and Pn  ,
2:
P n 1 , P0   1 n
, P0   1
n 0 n 0  n
n 0

1
3:   1   ,   1
n
AHA – Lecture 8
n 0
(geometric series)
4
P0    1 1     (1   )
1 1 n
4: 5: Pn
  n (1  )
n0
Solving for L

  
L  nPn  n n (1   ) (1   )   n n 1
n 0 n 0 n 1

 1 n
(1   )  d
d     (1   )  dd  
1
1 
 n0 
(1   )     (1 )   
1
(1  ) 2

Solving for W, Wq and Lq

W  L   1    1 
Wq W  1
     
1


 (  )

Lq Wq   (   )   (    )
2

Re-expression

Since the utilization factor (traffic intensity),  = ( / )

 L =  / (1-)

 Lq = 2 / (1-)

 W = 1 / (-)

 Wq =  / (-)

 W(t) = e-t/W (t≥0)

 Wq(t) = e-t/W (t≥0)


8.6 Examples

AHA – Lecture 8 5
1. Consider the queuing situation with one server in which arrivals occur at the rate  = 3 per
hour and service is performed at the rate  = 8 per hour. The probabilities Pn of n customers
in the system are computed for the situation as given below:

n 0 1 2 3 4 5 6 7 8
Pn 0.625 0.234 0.088 0.033 0.012 0.005 0.002 0.001 0

Compute L, W, Wq and Lq

Solution
 L = nPn = (0 * 0.625) + (1 * 0.234) + ………….+ (8 * 0) = 0.6 customers.

 W = L /  = 0.6 / 3 = 0.2 hour

 Wq = W – (1/) = 0.2 – (1/8) = 0.075 hour

 Lq = Wq = 3 * 0.075 = 0.225 customers

2. The men’s department of a large store employs one tailor for customer fittings. The number of
customers requiring fittings appears to follow a Poisson distribution with mean arrival rate 24
per hour. Customers are fitted on a first-come, first-served basis, and they are always willing
to wait for the tailor’s service, because alterations are free. The time it takes to fit a customer
appears to be exponentially distributed, with a mean of 2 min. (a) What is the average
number of customers in the fitting room? (b) How much time should a customer expect to
spend in the fitting room? (c) What percentage of the time is the tailor idle? (d) What is the
probability that a customer will wait more than 10 min for the tailor’s service?

Solution

 = 24 h-1 and  = 30 h-1. Therefore  = 0.8

a. L = 0.8 / (1-0.8) = 4 customers


b. W = 1 / (30-24) = 1/6 hours

c. The tailor is idle if and only if there is no customer in the fitting room. The probability of this
event is given by
p0 = 0 (1-) = 1(1-0.8) = 0.2

d. With t = 1/6 hr = W
Wq (1/6) = 0.8e-1 = 0.2943

3. A gourmet delicatessen is operated by one person, the owner. The arrival pattern of
customers on Saturdays appears to follow a Poisson distribution, with a mean arrival rate of
10 people per hour. Customers are served on a FIFO basis, and because of the reputation of
the store they are willing to wait for service once they arrive. The time it takes to serve a
customer is estimated to be exponentially distributed, with an average service time of 4
minute. Determine (a) the probability that there is a queue, (b) the average size of the queue,
(c) the expected time that a customer must wait in the queue, and (d) the probability that a
customer will spend less than 12 minutes in the store.

Solution

 = 10 h-1 = 1/6 min-1 and  = 1/4 h-1. Therefore  = 2/3

AHA – Lecture 8 6
a. The probability of having a queue is the probability of having two or more customers in the
system.

p0 = 0 (1-) = 1(1-2/3) = 1/3

p1 =  (1-) = 2/3(1-2/3) = 2/9

Therefore, the probability of having a queue is


1 - p0 - p1 = 1 – 1/3 – 2/9 = 4/9

b. Lq = (2/3)2 / (1 - 2/3) = 4/3 customers

c. Wq = (2/3) / (1/4 – 1/6) = 8 minute

d. W = 8 + 4 = 12 minute

1 - W(12) = 1 - e-12/12 = 1 – 0.3679 = 0.6321

4. A certain petrol pump, customers arrive in a Poisson process with an average time of 5
minutes between arrivals. The time-intervals between services at the petrol pump follow
exponentially distribution and as such the mean time taken to service a unit is 2 minutes. On
the basis of this information you are required to answer the following questions:
i. What would be the expected average queue length?
ii. What would be the average number of customers in the queuing system?
iii. How long on an average a customer does spend in this system?
iv. How much should the flow of customers be increased to justify the opening of a
second service point if the management is willing to open the same provided the
customer has to wait for 5 minutes for the service?

Solution

 = 0.2 and  = 0.5


i. Lq = 2 / ( - ) = 0.22 / 0.5 (0.5 – 0.2) = 0.267 customers

ii. L =  / ( - ) = 0.2 / (0.5 – 0.2) = 0.667 customers

iii. W = 1 / (-) = 1 / (0.5 – 0.2) = 3.33 minutes

iv. 5 =  / ( - ) →  / (0.5 – ) = 5 customers


 = 0.357
Incremental = 0.357 – 0.2 = 0.157

8.7 Poisson Distribution

A discrete random variable N has a Poisson distribution with parameters  if, for n = 0, 1, 2,…..

P(N=n) = e-n / n! (n = 0, 1, 2,…..)

If N is a Poisson random variable, it can be shown that E(N) = var N = . If we define Nt to be the
number of arrivals to occur during any time interval of length t, Theorem 1 states that

P(Nt=n) = e-t(t)n / n! (n = 0, 1, 2,…..)

AHA – Lecture 8 7
Since Nt is Poisson with parameter t, E(Nt) = var Nt = t. An average of t arrivals occur during a
time interval of length t, so  may be thought of as the average number of arrivals per unit time, or
the arrival rate.

Example

The number of glasses of drink ordered at the restaurant follows a Poisson distribution, with an
average of 30 drinks per hour being ordered.
i. Find the probability that exactly 60 drinks are ordered between 10 pm and 12
midnight.
ii. Find the mean and standard deviation of the number of drinks ordered between 9 pm
and 1 am.
iii. Find the probability that the time between two consecutive orders is between 1 and 3
minutes.

Solution
i. The number of drinks ordered between 10 pm and 12 midnight will follow a Poisson
distribution with parameter 2(30) = 60.

P(N=n) = e-n / (n!) where n = 1.,2,3…..

= e-606060 / (60!)

ii. We have  = 30 drinks per hour; t=4 hours. Thus, the mean number of beers ordered
between 9pm and 1pm is 4(30) = 120 drinks. The standard deviation of the number
of drinks ordered between 10pm and 1am is (120)0.5 = 10.95

iii. Let X be the time (in minutes) between successive drink orders. The mean number of
orders per minute is exponential with parameters or rate (30/60) = 0.5 drinks per
minute. Thus, the probability density function of the time between drink orders is
(0.5)-0.5t. Then
P(1  X  3) =  ((0.5)-0.5t) dt = e-0.5 - e-1.5 = 0.38

AHA – Lecture 8 8

You might also like