You are on page 1of 25

COMSATS

UNIVERSITY ISLAMABAD

EEE-354: Telecommunication
Systems Engineering

Queueing Systems
Queuing Systems in Telecommunications
In telecommunication networks, queuing theory is used
every time a network resource is shared by competing
“service requests”.

• Used for analyzing network performance


• Queues can be applied at different OSI levels:
– OSI Layer 1: Blocking phenomena of a traffic flow (i.e., a call) due to
unavailable resources in at least one link in the path from source to
destination.

– OSI Layer 2: Queuing is generated by different packets sharing the


transmission resources of a link connecting two adjacent nodes
(MAC);

– OSI Layer 3: There are layer 3 buffers for IP-level QoS support (e.g.,
DiffServ).
Why Analyze Queue?
• How long does a customer expect to wait in the queue before they are
served, and how long will they have to wait before the service is
complete?
• What is the probability of a customer having to wait longer than a
given time interval before they are served?
• What is the average length of the queue?
• What is the probability that the queue will exceed a certain length?
• What is the expected utilization of the server and the expected time
period during which he will be fully occupied (remember servers cost
us money so we need to keep them busy).

In fact if we can assign costs to factors such as customer waiting time and
server idle time then we can investigate how to design a system at
minimum total cost.
Queueing Systems: Basics
• Queueing systems are of interest to
– The users of the systems (customers)
• Minimize their delays, loss (or blocking) probabilities, etc.
– The service providers.
• The cost of providing the service to customers while ensuring that the
customers are “reasonably” satisfied.
– For example, the service providers do not want to assign too many or they do not
want to provide an extremely large buffer size etc

• Quantities obtained in terms of


– Arrival rate of customers (average number of customers per unit time)
– Service rate (average number of customers that the server can serve per
unit time)
Queueing Systems: Basics
• Analytical modeling (using formulas) can be used for many queues.
For more complex situations, computer simulation is needed.
• In the study of queuing systems, there are also different terms that
have the same meaning. Some interesting examples are:
– Client/customer/service request/job/packet/message/call/etc.

– Service/transmission/etc.

– Server/transmitter/etc.

– Queue/buffer/memory/etc.
Basics: Key elements of queueing systems
Customer: refers to anything that arrives at a facility and requires
service, e.g., people, machines, trucks, emails, calls ,packets.
Server: refers to any resource that provides the requested service,
e.g., repairpersons, retrieval machines, trunks,.
Queues are where the units of work wait if the server is busy and
can’t do the work as it arrives.
Some more basics …
Calling population:
• Finite population model: If arrival rate depends on the number of
customers being served and waiting.
• Infinite population model: If arrival rate is not affected by the
number of customers being served and waiting.
System Capacity:
• A limit on the number of customers that may be in the waiting line or
system.
– Limited capacity: e.g., an automatic car wash only has room for 10 cars
to wait in line to enter the mechanism.
– Unlimited capacity: e.g., concert ticket sales with no limit on the
number of people allowed to wait to purchase tickets.
Some more basics…
• Queue discipline: the logical ordering of
customers in a queue that determines which
customer is chosen for service when a server
becomes free, for example:
– First-in-first-out (FIFO)
– Last-in-first-out (LIFO)
– Service in random order (SIRO)
– Shortest processing time first (SPT)
– Service according to priority (PR).
Important Metrics

• Queue Length: The average number of customers waiting in the


queue. (Customers)

• Wait Time: How long customers have to wait in the queue, on


average. (Time )

• Service Time: How long it takes to service customers after they


leave the queue, on average. (Time/service)

• Service Rate : This is the inverse of service time. (Services per


time )
• Residence Time: How long customers are in the system overall,
on average. In computer systems we usually call this latency or
response time. It’s the sum of wait time and service time. (Time)
Important Metrics

• Utilization: How much of the time the system is busy serving


requests. If the system has multiple servers, it’s an average over
all of them. This ranges from 0 to 1, inclusive. (Fraction)
• Number of Servers : The number of servers the system has
(e.g. cashiers, CPUs). (Servers)
• Arrival Rate: How often new customers arrive at the front of
the queue. (Customers per time)
• Loss Probability:
Some Notations
• 𝑃! : steady-state probability of having n customers in system,
• 𝑃! (t):probability of n customers in system at time t,
• λ: arrival rate,
• μ: service rate of one server,
• ρ: server utilization,
• 𝐴! : interarrival time between customers n − 1 and n,
• 𝑆! : service time of the nth arriving customer,
• 𝑊! : total time spent in system by the nth arriving customer,
"
• 𝑊! : total time spent in the waiting line by customer n,
• L(t): the number of customers in system at time t
• L# (t): the number of customers in queue at time t,
• 𝑊: Average time spent in system per customer,
• 𝑊 " : Average time spent in queue per customer.
• L: Average number of customers in system,
• L# : Average number of customers in queue,
Queueing notation
The different kinds of systems have very different queueing
behavior, which sometimes results in drastically different wait
times and queue lengths. If you’re going to analyze them, you’ll
need to be sure you know what kind of system you’re working
with, so you can pick the right analytical tools.

Six parameters in shorthand (1/2/3/4/5/6)


– First three typically used, unless specified
Distribution
1. Arrival Distribution Ø M=Memoryless/Markovian
2. Service Distribution Exponential
3. Number of servers Ø E = Erlang
Ø H = Hyper-exponential
4. Total Capacity (infinite if not specified) Ø D = Deterministic =
5. Population Size (infinite) constant
6. Service Discipline (FCFS/FIFO) Ø G = General Results valid
for all distributions
Examples…
M/M/3/20/1500/FCFS
• Time between successive arrivals is exponentially distributed.
• Service times are exponentially distributed.
• Three servers
• 20 system capacity = 3 service + 17 waiting After 20, all arriving jobs are lost
• Total of 1500 jobs that can be serviced.
• Service discipline is first-come-first-served.
Some more examples:
• M/M/1/∞/∞ same as M/M/1: Single-server with unlimited capacity and
call- population. Interarrival and service times are exponentially distributed
• G/G/1/5/5: Single-server with capacity 5 and call-population 5.
Typical Performance Measures
• 𝑊: Average time spent in system per customer.
• 𝑊 ! : Average time spent in queue per customer.
• L: Average number of customers in system.
• L" : Average number of customers in queue.
• 𝑃! : steady-state probability of having n customers in system.
• ρ: server utilization.
Little’s Law

𝜆=customer arrival rate (in customer/time)


W= (average time spent in system by an arbitrary customer)( time)
L=average number of customers in system (customers)

Then [Little] 𝜆W=L

Example:
• If the average waiting time is 2 hours and customers arrive at a rate
of 3 per hour then, on average, there are 6 customers in the system.
M/M/1 Queues
• M/M/1 means that we have
• Poisson arrival process.
• Exponential distributed service times
• 1 server
• 1 queue
• Infinite waiting process. The steady-state parameters
M/M/1 Queue Analysis
P! (t+∆) = (P!"# (t) ∗ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 0 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑎𝑛𝑑 1 𝑑𝑒𝑝𝑎𝑟𝑡𝑢𝑟𝑒) +
(P! (t) ∗ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 0 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑎𝑛𝑑 0 𝑑𝑒𝑝𝑎𝑟𝑡𝑢𝑟𝑒) +
(P!$# (t) ∗ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 1 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑎𝑛𝑑 0 𝑑𝑒𝑝𝑎𝑟𝑡𝑢𝑟𝑒)

• Probability of one arrival=

• Probability of one departure=


M/M/1 Queue Analysis
P! (t+ ∆) = (P!"# (t) ∗ 1 − ∆𝜆 ∆𝜇 )+
(P! (t) ∗ 1 − ∆𝜆 (1− ∆𝜇 ) + (P!$# (t) ∗ 1 − ∆𝜇 ∆𝜆

P! (t+ ∆) = (P!"# (t) ∗ ∆𝜇 − ∆𝜆∆𝜇 )-


(P! (t) ∗ ∆𝜆 + ∆𝜇 − ∆𝜆∆𝜇 − 1 + (P!$# (t) ∗ ∆𝜆 − ∆𝜆 ∆𝜇

P! 𝜇 + 𝜆 = P!"# 𝜇 + P!$# 𝜆
M/M/1 Queue Analysis

P"(t+∆) = (P#(t) ∗ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 0 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑎𝑛𝑑 1 𝑑𝑒𝑝𝑎𝑟𝑡𝑢𝑟𝑒) +


(P"(t) ∗ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 0 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑎𝑛𝑑 0 𝑑𝑒𝑝𝑎𝑟𝑡𝑢𝑟𝑒)

P= (t+∆) = (P> (t) ∗ 1 − ∆𝜆 ∆𝜇 )+ (P= (t) ∗ 1 − ∆𝜆 (1)

P= 𝜇 = P> 𝜆
M/M/1 Queue Analysis
P9 𝜇 + 𝜆 = P9<= 𝜇 + P9>= 𝜆

P? 𝜆 = P= 𝜇

For n=1
P= 𝜇 + 𝜆 = P@ 𝜇 + P? 𝜆

P= 𝜆 = P@ 𝜇
M/M/1 Queue Analysis
𝜆
P= = P?
𝜇

A
P@ = P=
B

P9 = P? 𝜌9
M/M/1 Queue Analysis
• How to find P?
P9 = P? 𝜌9
M/M/1 Queue Analysis
¥ ¥
L = E[n] = å nPn = å nr n (1 - r )
n =0 n =0
¥ ¥
= (1 - r )å r (nr n -1
) = (1 - r )å r ( r n )'
n =0 n =0
¥
= r (1 - r )å ( r n )'
n =0

1 r
= r (1 - r )( )' =
1- r 1- r
l
ÞL=
µ -l
M/M/1 Queue Analysis
For L𝒒
Average people in line= Average people in system-those being served
L% = 𝐿 − 𝜌
&
= -𝜌
#$&
&#
=
#$&

For W
$
W=%
& #
=( )*( )
#$& '
=
M/M/1 Queue Analysis
For W𝒒
=
WF =W- B
=
-
B

You might also like