1 / 30

Introduction to Queuing Theory

Introduction to Queuing Theory. Queuing theory definitions. (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this study Queueing Theory." (Mathworld) “The study of the waiting times, lengths, and other properties of queues.”.

yves
Download Presentation

Introduction to Queuing Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Queuing Theory

  2. Queuing theory definitions • (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this study Queueing Theory." • (Mathworld) “The study of the waiting times, lengths, and other properties of queues.” http://www2.uwindsor.ca/~hlynka/queue.html

  3. Queuing theory for studying networks • View network as collections of queues • FIFO data-structures • Queuing theory provides probabilistic analysis of these queues • Examples: • Average length • Average waiting time • Probability queue is at a certain length • Probability a packet will be lost

  4. Queuing System Server Queue Queuing System Server System Model Queuing System • Use Queuing models to • Describe the behavior of queuing systems • Evaluate system performance

  5. Characteristics of queuing systems • Arrival Process • The distribution that determines how the tasks arrives in the system. • Service Process • The distribution that determines the task processing time • Number of Servers • Total number of servers available to process the tasks

  6. Kendall Notation 1/2/3(/4/5/6) • Six parameters in shorthand • First three typically used, unless specified • Arrival Distribution • Service Distribution • Number of servers • Total Capacity (infinite if not specified) • Population Size (infinite) • Service Discipline (FCFS/FIFO)

  7. Arrival time distributions • M: stands for "Markovian“, Poisson arrivials • D: Deterministic (e.g. fixed constant) • G: General (anything)

  8. Kendall Notation Examples • M/M/1: • Poisson arrivals and exponential service, 1 server, infinite capacity and population, FCFS (FIFO) • the simplest ‘realistic’ queue • 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

  9. Analysis of M/M/1 queue • Given: • l: Arrival rate of jobs (packets on input link) • m: 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

  10. M/M/1 queue model L Lq l m Wq W

  11. Little’s Law • Little’s Law: Average number of jobs in system = average arrival rate of jobs × average service 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 jobs System Arrivals Departures

  12. Formally, Little’s Law is L = lW Average number of jobs in system = average arrival rate ×average service time for each job • l: Average arrival rate • W: Average time job is in the system (average service time) • L: Average number of jobs in the system

  13. = = J ( )( ) N J l ( ) W T T N = ( ) W N T Proof of Little’s Law: Let J be the sum of all service time, that is, the sum of time spent on each job. E.g., J = j1+j2+j3…., where j1 is the service time of job 1, and so on. Let N be the number of jobs (packets). Let T be the total service time of the system on the jobs. Note that T ≤ J. We know l is the average arrival rate, W is the average service time of jobs, and L is the average number of jobs in the system. On the right-hand side, by definitions, in a stable system we have By definition, J is the sum of service time for all jobs, T is the total service time of the system. Thus, J/T is the average number of jobs in the system, which is L. Therefore, the Little’s Law holds.

  14. 3 3 3 # in System 2 2 2 1 1 1 1 2 3 4 5 6 7 8 Time Time in System 1 2 3 Packet # An example of J Arrivals Packet # Departures 1 2 3 4 5 6 7 8 Time J = Shaded area = 9 Same in all cases!

  15. M/M/1 queue model • l: Arrival rate of jobs (packets on input link) • m: Service rate of the server (output link) • 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 L Lq l m Wq W • L=λW • Lq=λWq

  16. Poisson process • Used to model random events in time that are largely independent of one another • E.g., a event may be that a customer arrives at the ice cream shop • E.g., or you see a roadkill when driving • E.g., or a packet arrives at the router

  17. Poisson Process • For a poisson process with average arrival rate , the probability of seeing n arrivals in time interval Δt

  18. Poisson process & exponential distribution • Inter-arrival time t (time between arrivals) in a Poisson process follows exponential distribution with parameter

  19. L Lq l m Wq W M/M/1 queue model • l: Arrival rate of jobs (packets on input link) • m: Service rate of the server (output link) • 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 • L=λW • Lq=λWq • W = Wq + (1/μ)

  20. Solving queuing systems • 4 unknowns: L, Lq W, Wq • Relationships: • L=lW • Lq=lWq • W = Wq + (1/m) • If we know any 1, can find the others

  21. Analysis of M/M/1 queue • Goal: A closed form expression of the probability of the number of jobs in the queue (Pi) given only l and m • Online M/M/1 animation • http://www.dcs.ed.ac.uk/home/jeh/Simjava/queueing/mm1_q/mm1_q.html

  22. l l l l n-1 n n+1 m m m m Equilibrium conditions Pn is the probability that in equilibrium the system has n number of jobs l l 0 1 m m

  23. Solving for P0 and Pn at equilibrium • Step 1 • Step 2 Verify this after class

  24. Solving for P0 and Pn at equilibrium • Step 3 • Step 4 Pn: probability of n jobs in the system

  25. Solving for L

  26. Solving W, Wq and Lq

  27. Response time vs. utilization (ρ)

  28. Stable Region linear region

  29. An example • On a network gateway, measurements show that the packets arrive at a mean rate of 125 packets per second (pps) and the gateway takes about 2 millisecs to forward them. Assuming an M/M/1 model. • Measurement of a network gateway: • mean arrival rate (l): 125 Packets/s • mean response time (m): 2 ms • Assuming exponential arrivals: • What is the gateway’s utilization? • What is the probability of n packets in the gateway? • mean number of packets in the gateway?

  30. Example cont’d • Arrival rate λ = 125 pps • Service rate μ = 1/0.002 = 500 pps • Gateway utilization ρ = λ/μ = 0.25 • Prob. of n packets in gateway = Pn = • Mean number of packets in gateway = L =

More Related