SlideShare une entreprise Scribd logo
1  sur  13
Queueing Theory Basics
Queueing Theory Basics
• We have seen that as a system gets
congested, the service delay in the system
increases.
• A good understanding of the relationship
between congestion and delay is essential for
designing effective congestion control
algorithms.
• Queuing Theory provides all the tools needed
for this analysis. This article will focus on
understanding the basics of this topic.
Communication Delays
• Before we proceed further, lets understand the
different components of delay in a messaging
system.
• The total delay experienced by messages can be
classified into the following categories:
• Processing Delay
– This is the delay between the time of receipt of a packet
for transmission to the point of putting it into the
transmission queue.
– On the receive end, it is the delay between the time of
reception of a packet in the receive queue to the point
of actual processing of the message.
– This delay depends on the CPU speed and CPU load in
the system.
Communication Delays
• Queuing Delay
– This is the delay between the point of entry of a packet in the transmit
queue to the actual point of transmission of the message.
– This delay depends on the load on the communication link.
• Transmission Delay
– This is the delay between the transmission of first bit of the packet to
the transmission of the last bit.
– This delay depends on the speed of the communication link.
• Propagation Delay
– This is the delay between the point of transmission of the last bit of the
packet to the point of reception of last bit of the packet at the other
end.
– This delay depends on the physical characteristics of the communication
link.
• Retransmission Delay
– This is the delay that results when a packet is lost and has to be
retransmitted.
– This delay depends on the error rate on the link and the protocol used
for retransmissions.
Little's Theorem
• We begin our analysis of queueing systems by understanding Little's
Theorem.
• Little's theorem states that:
• The average number of customers (N) can be determined from the
following equation:
N = λT
– Here lambda is the average customer arrival rate and
– T is the average service time for a customer.
• Proof of this theorem can be obtained from any standard textbook
on queueing theory. Here we will focus on an intuitive understanding
of the result.
• Consider the example of a restaurant where the customer arrival rate
(lambda) doubles but the customers still spend the same amount of
time in the restaurant (T). This will double the number of customers
in the restaurant (N).
• By the same logic if the customer arrival rate remains the same but
the customers service time doubles, this will also double the total
number of customers in the restaurant.
Queueing System Classification
• With Little's Theorem, we have developed some basic understanding
of a queueing system.
• To further our understanding we will have to dig deeper into
characteristics of a queueing system that impact its performance.
• For example, queueing requirements of a restaurant will depend
upon factors like:
– How do customers arrive in the restaurant? Are customer arrivals more
during lunch and dinner time (a regular restaurant)? Or is the customer
traffic more uniformly distributed (a cafe)?
– How much time do customers spend in the restaurant? Do customers
typically leave the restaurant in a fixed amount of time? Does the
customer service time vary with the type of customer?
– How many tables does the restaurant have for servicing customers?
• The above three points correspond to the most important
characteristics of a queueing system. They are explained below:
most important characteristics of a
queueing system
• Arrival Process
– The probability density distribution that determines the customer
arrivals in the system.
– In a messaging system, this refers to the message arrival probability
distribution.
• Service Process
– The probability density distribution that determines the customer
service times in the system.
– In a messaging system, this refers to the message transmission time
distribution. Since message transmission is directly proportional to the
length of the message, this parameter indirectly refers to the message
length distribution.
• Number of Servers
– Number of servers available to service the customers.
– In a messaging system, this refers to the number of links between the
source and destination nodes.
most important characteristics of a
queueing system
• Based on the above characteristics, queueing
systems can be classified by the following
convention: A/S/n, Where:
– A is the arrival process,
– S is the service process and
– n is the number of servers.
• A and S are can be any of the following:
– M (Markov): Exponential probability density
– D (Deterministic): All customers have the same value
– G (General): Any arbitrary probability distribution
A/S/n
• Examples of queueing systems that can be defined with this convention
are:
• M/M/1: This is the simplest queueing system to analyze.
– Here the arrival and service time are negative exponentially distributed
(poisson process).
– The system consists of only one server.
– This queueing system can be applied to a wide variety of problems as any
system with a very large number of independent customers can be
approximated as a Poisson process.
– Using a Poisson process for service time however is not applicable in many
applications and is only a crude approximation. Refer to M/M/1 Queueing
System for details.
• M/D/n: Here the arrival process is poisson and the service time
distribution is deterministic.
– The system has n servers. (e.g. a ticket booking counter with n cashiers. (Here
the service time can be assumed to be same for all customers)
• G/G/n: This is the most general queueing system where the arrival and
service time processes are both arbitrary. The system has n servers. No
analytical solution is known for this queueing system.
M/M/1 Queueing System
• Will focus on M/M/1 queueing system.
• As we have seen earlier, M/M/1 refers to negative
exponential arrivals and service times with a single
server.
• This is the most widely used queueing system in analysis
as pretty much everything is known about it.
• M/M/1 is a good approximation for a large number of
queueing systems.
• The following topics will be discussed in detail:
– Poisson Arrivals
– Poisson Service Times
– Single Server
– M/M/1 Results
Poisson Arrivals
• M/M/1 queueing systems assume a Poisson
arrival process. This assumption is a very good
approximation for arrival process in real
systems that meet the following rules:
– The number of customers in the system is very
large.
– Impact of a single customer on the performance
of the system is very small, i.e. a single customer
consumes a very small percentage of the system
resources.
– All customers are independent, i.e. their decision
to use the system are independent of other users
Cars on a Highway
• As you can see these assumptions are fairly general, so they
apply to a large variety of systems. Lets consider the
example of cars entering a highway. Lets see if the above
rules are met.
– Total number of cars driving on the highway is very large.
– A single car uses a very small percentage of the highway
resources.
– Decision to enter the highway is independently made by each car
driver.
• The above observations mean that assuming a Poisson
arrival process will be a good approximation of the car
arrivals on the highway.
• If any one of the three conditions is not met, we cannot
assume Poisson arrivals.
• For example, if a car rally is being conducted on a
highway, we cannot assume that each car driver is
independent of each other. In this case all cars had a
common reason to enter the highway (start of the race).
Telephony Arrivals
• Lets take another example. Consider arrival of
telephone calls to a telephone exchange. Putting our
rules to test we find:
– Total number of customers that are served by a telephone
exchange is very large.
– A single telephone call takes a very small fraction of the
systems resources.
– Decision to make a telephone call is independently made by
each customer.
• Again, if all the rules are not met, we cannot assume
telephone arrivals are Poisson. If the telephone
exchange is a PABX catering to a few subscribers, the
total number of customers is small, thus we cannot
assume that rule 1 and 2 apply. If rule 1 and 2 do apply
but telephone calls are being initiated due to some
disaster, calls cannot be considered independent of each
other. This violates rule 3.

Contenu connexe

Tendances

Tendances (20)

Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
Queue
QueueQueue
Queue
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing theory .
Queuing theory .Queuing theory .
Queuing theory .
 
Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)
 
Queuing Theory - Operation Research
Queuing Theory - Operation ResearchQueuing Theory - Operation Research
Queuing Theory - Operation Research
 
Queuing model
Queuing model Queuing model
Queuing model
 
OR Unit 5 queuing theory
OR Unit 5 queuing theoryOR Unit 5 queuing theory
OR Unit 5 queuing theory
 
Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
14 queuing
14 queuing14 queuing
14 queuing
 
Queuing theory network
Queuing theory networkQueuing theory network
Queuing theory network
 
Queing theory and delay analysis
Queing theory and delay analysisQueing theory and delay analysis
Queing theory and delay analysis
 
Operational research queuing theory
Operational research queuing theoryOperational research queuing theory
Operational research queuing theory
 
Waiting line model(or presentation)
Waiting line model(or presentation)Waiting line model(or presentation)
Waiting line model(or presentation)
 
Unit 1 introduction contd
Unit 1 introduction contdUnit 1 introduction contd
Unit 1 introduction contd
 
516 Queuing
516 Queuing516 Queuing
516 Queuing
 
QUEUEING THEORY
QUEUEING THEORYQUEUEING THEORY
QUEUEING THEORY
 
Waiting lines
Waiting linesWaiting lines
Waiting lines
 
Queueing Theory and its BusinessS Applications
Queueing Theory and its BusinessS ApplicationsQueueing Theory and its BusinessS Applications
Queueing Theory and its BusinessS Applications
 

Similaire à Queueing theory basics (20)

Queuing Theory by Dr. B. J. Mohite
Queuing Theory by Dr. B. J. MohiteQueuing Theory by Dr. B. J. Mohite
Queuing Theory by Dr. B. J. Mohite
 
Unit V - Queuing Theory
Unit V - Queuing TheoryUnit V - Queuing Theory
Unit V - Queuing Theory
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing Theory
Queuing TheoryQueuing Theory
Queuing Theory
 
QUEUING THEORY
QUEUING THEORY QUEUING THEORY
QUEUING THEORY
 
Queuing analysis
Queuing analysisQueuing analysis
Queuing analysis
 
Operations Research_18ME735_module 4 - queuing systems.pdf
Operations Research_18ME735_module 4 - queuing systems.pdfOperations Research_18ME735_module 4 - queuing systems.pdf
Operations Research_18ME735_module 4 - queuing systems.pdf
 
Unit iv-1-qt
Unit iv-1-qtUnit iv-1-qt
Unit iv-1-qt
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing theory and its applications
Queuing theory and its applicationsQueuing theory and its applications
Queuing theory and its applications
 
Module 2 - Queuing Models and notations.pdf
Module 2 - Queuing Models and notations.pdfModule 2 - Queuing Models and notations.pdf
Module 2 - Queuing Models and notations.pdf
 
Chapter 14R
Chapter 14RChapter 14R
Chapter 14R
 
queuing theory/ waiting line theory
queuing theory/ waiting line theoryqueuing theory/ waiting line theory
queuing theory/ waiting line theory
 
Traffic analysis
Traffic analysisTraffic analysis
Traffic analysis
 
Queueing Theory.pptx
Queueing Theory.pptxQueueing Theory.pptx
Queueing Theory.pptx
 
System modeling and simulations
System modeling and simulationsSystem modeling and simulations
System modeling and simulations
 
Operation Research
Operation ResearchOperation Research
Operation Research
 
4Queuing_Theory.ppt
4Queuing_Theory.ppt4Queuing_Theory.ppt
4Queuing_Theory.ppt
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
H03405059069
H03405059069H03405059069
H03405059069
 

Queueing theory basics

  • 2. Queueing Theory Basics • We have seen that as a system gets congested, the service delay in the system increases. • A good understanding of the relationship between congestion and delay is essential for designing effective congestion control algorithms. • Queuing Theory provides all the tools needed for this analysis. This article will focus on understanding the basics of this topic.
  • 3. Communication Delays • Before we proceed further, lets understand the different components of delay in a messaging system. • The total delay experienced by messages can be classified into the following categories: • Processing Delay – This is the delay between the time of receipt of a packet for transmission to the point of putting it into the transmission queue. – On the receive end, it is the delay between the time of reception of a packet in the receive queue to the point of actual processing of the message. – This delay depends on the CPU speed and CPU load in the system.
  • 4. Communication Delays • Queuing Delay – This is the delay between the point of entry of a packet in the transmit queue to the actual point of transmission of the message. – This delay depends on the load on the communication link. • Transmission Delay – This is the delay between the transmission of first bit of the packet to the transmission of the last bit. – This delay depends on the speed of the communication link. • Propagation Delay – This is the delay between the point of transmission of the last bit of the packet to the point of reception of last bit of the packet at the other end. – This delay depends on the physical characteristics of the communication link. • Retransmission Delay – This is the delay that results when a packet is lost and has to be retransmitted. – This delay depends on the error rate on the link and the protocol used for retransmissions.
  • 5. Little's Theorem • We begin our analysis of queueing systems by understanding Little's Theorem. • Little's theorem states that: • The average number of customers (N) can be determined from the following equation: N = λT – Here lambda is the average customer arrival rate and – T is the average service time for a customer. • Proof of this theorem can be obtained from any standard textbook on queueing theory. Here we will focus on an intuitive understanding of the result. • Consider the example of a restaurant where the customer arrival rate (lambda) doubles but the customers still spend the same amount of time in the restaurant (T). This will double the number of customers in the restaurant (N). • By the same logic if the customer arrival rate remains the same but the customers service time doubles, this will also double the total number of customers in the restaurant.
  • 6. Queueing System Classification • With Little's Theorem, we have developed some basic understanding of a queueing system. • To further our understanding we will have to dig deeper into characteristics of a queueing system that impact its performance. • For example, queueing requirements of a restaurant will depend upon factors like: – How do customers arrive in the restaurant? Are customer arrivals more during lunch and dinner time (a regular restaurant)? Or is the customer traffic more uniformly distributed (a cafe)? – How much time do customers spend in the restaurant? Do customers typically leave the restaurant in a fixed amount of time? Does the customer service time vary with the type of customer? – How many tables does the restaurant have for servicing customers? • The above three points correspond to the most important characteristics of a queueing system. They are explained below:
  • 7. most important characteristics of a queueing system • Arrival Process – The probability density distribution that determines the customer arrivals in the system. – In a messaging system, this refers to the message arrival probability distribution. • Service Process – The probability density distribution that determines the customer service times in the system. – In a messaging system, this refers to the message transmission time distribution. Since message transmission is directly proportional to the length of the message, this parameter indirectly refers to the message length distribution. • Number of Servers – Number of servers available to service the customers. – In a messaging system, this refers to the number of links between the source and destination nodes.
  • 8. most important characteristics of a queueing system • Based on the above characteristics, queueing systems can be classified by the following convention: A/S/n, Where: – A is the arrival process, – S is the service process and – n is the number of servers. • A and S are can be any of the following: – M (Markov): Exponential probability density – D (Deterministic): All customers have the same value – G (General): Any arbitrary probability distribution
  • 9. A/S/n • Examples of queueing systems that can be defined with this convention are: • M/M/1: This is the simplest queueing system to analyze. – Here the arrival and service time are negative exponentially distributed (poisson process). – The system consists of only one server. – This queueing system can be applied to a wide variety of problems as any system with a very large number of independent customers can be approximated as a Poisson process. – Using a Poisson process for service time however is not applicable in many applications and is only a crude approximation. Refer to M/M/1 Queueing System for details. • M/D/n: Here the arrival process is poisson and the service time distribution is deterministic. – The system has n servers. (e.g. a ticket booking counter with n cashiers. (Here the service time can be assumed to be same for all customers) • G/G/n: This is the most general queueing system where the arrival and service time processes are both arbitrary. The system has n servers. No analytical solution is known for this queueing system.
  • 10. M/M/1 Queueing System • Will focus on M/M/1 queueing system. • As we have seen earlier, M/M/1 refers to negative exponential arrivals and service times with a single server. • This is the most widely used queueing system in analysis as pretty much everything is known about it. • M/M/1 is a good approximation for a large number of queueing systems. • The following topics will be discussed in detail: – Poisson Arrivals – Poisson Service Times – Single Server – M/M/1 Results
  • 11. Poisson Arrivals • M/M/1 queueing systems assume a Poisson arrival process. This assumption is a very good approximation for arrival process in real systems that meet the following rules: – The number of customers in the system is very large. – Impact of a single customer on the performance of the system is very small, i.e. a single customer consumes a very small percentage of the system resources. – All customers are independent, i.e. their decision to use the system are independent of other users
  • 12. Cars on a Highway • As you can see these assumptions are fairly general, so they apply to a large variety of systems. Lets consider the example of cars entering a highway. Lets see if the above rules are met. – Total number of cars driving on the highway is very large. – A single car uses a very small percentage of the highway resources. – Decision to enter the highway is independently made by each car driver. • The above observations mean that assuming a Poisson arrival process will be a good approximation of the car arrivals on the highway. • If any one of the three conditions is not met, we cannot assume Poisson arrivals. • For example, if a car rally is being conducted on a highway, we cannot assume that each car driver is independent of each other. In this case all cars had a common reason to enter the highway (start of the race).
  • 13. Telephony Arrivals • Lets take another example. Consider arrival of telephone calls to a telephone exchange. Putting our rules to test we find: – Total number of customers that are served by a telephone exchange is very large. – A single telephone call takes a very small fraction of the systems resources. – Decision to make a telephone call is independently made by each customer. • Again, if all the rules are not met, we cannot assume telephone arrivals are Poisson. If the telephone exchange is a PABX catering to a few subscribers, the total number of customers is small, thus we cannot assume that rule 1 and 2 apply. If rule 1 and 2 do apply but telephone calls are being initiated due to some disaster, calls cannot be considered independent of each other. This violates rule 3.