queing theory and delay analysis
TRANSCRIPT
QUEING THEORY AND DELAY ANALYSIS
PRIYANKA NEGI155105
Queuing System
A queuing system can be described as customers arriving for service, waiting for service if it is not immediate, and if having waited for service, leaving the system after being served.
Queuing System Cont.
The basic phenomenon of queuing arises whenever a shared facility needs to be accessed for service by a large number of jobs or customers.
We study the phenomena of standing, waiting, and serving, and we call this study queuing theory. Any system in which arrivals place demands upon a finite capacity resource may be termed a queuing system
Why Is Queuing Analysis Important?
Capacity problems are very common in industry and one of the main drivers of process redesign Need to balance the cost of increased capacity against the gains
of increased productivity and service Queuing and waiting time analysis is particularly important in
service systems Large costs of waiting and of lost sales due to waiting
Queuing System Concepts
Queuing system Data network where packets arrive, wait in various queues,
receive service at various points, and exit after some time Arrival rate
Long-term number of arrivals per unit time Occupancy
Number of packets in the system (averaged over a long time) Time in the system (delay)
Time from packet entry to exit (averaged over many packets)
Examples of Real World Queuing Systems?
Commercial Queuing Systems Commercial organizations serving external customers Ex. Dentist, bank, ATM, gas stations, plumber, garage …
Transportation service systems Vehicles are customers or servers Ex. Vehicles waiting at toll stations and traffic lights, trucks or
ships waiting to be loaded, taxi cabs, fire engines, elevators, buses .
Examples Cont.
Business-internal service systems Customers receiving service are internal to the organization
providing the service Ex. Inspection stations, conveyor belts, computer support .
Social service systems Ex. Judicial process, the ER at a hospital, waiting lists for organ
transplants or student dorm rooms .
Components of a Basic Queuing Process
Calling Population Queue
Service Mechanism
Input Source The Queuing System
Jobs
Arrival Process
Queue Configuration
Queue Discipline
Served Jobs
Service Process
leave the system
Components Cont. The Calling Population
The population from which customers/jobs originate The size can be finite or infinite (the latter is most common) Can be homogeneous (only one type of customers/ jobs) or
heterogeneous (several different kinds of customers/jobs) The Arrival Process
Determines how, when and where customer/jobs arrive to the system Important characteristic is the customers’/jobs’ inter-arrival times
Components Cont.
The queue configuration Specifies the number of queues
Single or multiple lines to a number of service stations Their location Their effect on customer behavior
Balking and reneging Their maximum size (# of jobs the queue can hold)
Distinction between infinite and finite capacity
Example – Two Queue Configurations
Components Cont.
The Service Mechanism Can involve one or several service facilities with one or several parallel
service channels (servers) - Specification is required The service provided by a server is characterized by its service time
Specification is required and typically involves data gathering and statistical analysis.
Most analytical queuing models are based on the assumption of exponentially distributed service times, with some generalizations.
Components Cont.
The queue discipline Specifies the order by which customers in the queue are being
served. Most commonly used principle is FIFO. Other rules are, for example, LIFO, SPT, EDD. Can entail prioritization based on customer type.
Mitigating Effects of Long Queues
Concealing the queue from arriving customers Ex. Restaurants divert people to the bar or use pagers,
amusement parks require people to buy tickets outside the park, banks broadcast news on TV at various stations along the queue, casinos snake night club queues through slot machine areas.
Use the customer as a resource Ex. Patient filling out medical history form while waiting for
physician
Mitigating Effects of Long Queues
Making the customer’s wait comfortable and distracting their attention Ex. Complementary drinks at restaurants, computer games,
internet stations, food courts, shops, etc. at airports Explain reason for the wait Provide pessimistic estimates of the remaining wait time
Wait seems shorter if a time estimate is given. Be fair and open about the queuing disciplines used
A Commonly Seen Queuing Model (I)
C C C … CCustomers (C)
C S = Server
C S
• •
•
C SCustomer =C
The Queuing System
The Queue
The Service Facility
Queuing Model(cont.)
Commonly used distributions M = Markovian (exponential) - Memory less D = Deterministic distribution G = General distribution
There are two major parameter in waiting line(queue) Arrival rate Service rate
The Exponential Distribution and Queuing
The most commonly used queuing models are based on the assumption of exponentially distributed service times and interarrival times.
Definition: A stochastic (or random) variable Texp( ), i.e., is exponentially distributed with parameter , if its frequency function is:
0twhen00twhene)t(f
t
T
The Exponential Distribution and Queuing
The Cumulative Distribution Function is:
The mean = E[T] = 1/ The Variance = Var[T] = 1/ 2
tT e1)t(F
The Exponential Distribution
Time between arrivalsMean= E[T]=1/
Prob
abilit
y de
nsity
t
fT(t)
The Poisson Arrival Model
A Poisson process is a sequence of events “randomly spaced in time”
The Poisson Process(Cont.)
The standard assumption in many queuing models is that the arrival process is Poisson
Two equivalent definitions of the Poisson Process The times between arrivals are independent, identically distributed
and exponential X(t) is a Poisson process with arrival rate .
The Poisson Arrival Model
Examples Customers arriving to a bank Packets arriving to a buffer
The rate λ of a Poisson process is the average number of events per unit time (over a long time).
Properties of a Poisson Process
For a length of time t the probability of n arrivals in t units of time is
( )( )!
nt
ntP t en
Properties of the Poisson Process
Poisson processes can be aggregated and the resulting processes are also Poisson processes
Aggregation of N Poisson processes with intensities {1, 2, …, n} renders a new Poisson process with intensity = 1+ 2+…+ n.
Terminology and Notation
The state of the system = the number of customers in the system Queue length = (The state of the system) – (number of customers being
served)
N(t) =Number of customers/jobs in the system at time t Pn(t)=The probability that at time t, there are n customers/jobs in the
system.
Terminology and Notation
n = Average arrival intensity (= # arrivals per time unit) at n customers/jobs in the system
n = Average service intensity for the system when there are n customers/jobs in it. (Note, the total
service intensity for all occupied servers)
= The utilization factor for the service facility. (= The expected fraction of the time that the service facility is being used)
M/M/1 Model Single server, single queue, infinite population:
Interarrival time distribution:
k
k
( ) tp t e
M/M/1 Model(Cont.) Service time distribution
Stability condition
λ < μ System utilization
00
0 0( ) 1
t ttp t t e dt e
= P[system is busy], 1- P[system is idel]
Solving queuing systems
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
M/M/1 Queue Model
1
Wq
W
L
Lq
Multiserver Model
Similarly if there are c servers in parallel, i.e., an M/M/c system but the expected capacity per time unit is then c*
*cCapacityAvailable
DemandCapacity
Queuing in the Network Layer at a Router
Queuing Delay The queuing delay is the time a job waits in a queue until it can be executed This term is most often used in reference to routers . When packets arrive at a router, they have to be processed and transmitted. A router can only process one packet at a time. Delay can also vary from packet to packet so averages and statistics are
usually generated when measuring and evaluating queuing delay
Queuing Delay(Cont.)
The average delay any given packet is likely to experience is given by the formula
1/(μ-λ) where μ is the number of packets per second the facility can sustain
and λ is the average rate at which packets are arriving to be serviced. This formula can be used when no packets are dropped from the
queue.
Little’s Theorem
Little’s theorem provides a relation between the average number of packets in the system, the arrival rate, and the average delay, given by
N= λT This theorem expresses the idea that crowded system(large N) are associated
with long customer delays(large T) and vice versa.
Conclusion
In this presentation I have presented a detail analysis of queuing theory . Queuing system components, their functions are also discussed in details. Littil’s theorem and queuing delay are also discussed.
References J.N. Daigle, Queuing theory with applications to packet telecommunication, Boston, MA: Springer
Science and Business Media, Inc., 2005. www.cs.Toronto.edu www.its.bldrdoc.gov Slides from S. Kalyanaraman & B.Sikdar
QUERY?
THANK YOU