900 likes | 917 Views
Lecture 2.7. Queuing Theory. Basic teletraffic concepts. 1 user making phone calls. How to characterize this process? statistical distribution of the “BUSY” period statistical distribution of the “IDLE” period statistical characterization of the process “memory”
E N D
1 user making phone calls • How to characterize this process? • statistical distribution of the “BUSY” period • statistical distribution of the “IDLE” period • statistical characterization of the process “memory” • E.g. at a given time, does the probability that a user starts a call result different depending on what happened in the past? TRAFFIC is a “stochastic process” BUSY 1 IDLE 0 time
Traffic characterizationsuitable for traffic engineering All equivalent (if stationary process)
Traffic Intensity: example • User makes in average 1 call every hour • Each call lasts in average 120 s • Traffic intensity = • 120 sec / 3600 sec = 2 min / 60 min = 1/30 • Probability that a user is busy • User busy 2 min out of 60 = 1/30 Dimensionless
Traffic generated by more than one users U1 Traffic intensity (dimensionless, measured in Erlangs): U2 U3 U4 TOT
LOADING AND ITS CHARACTERISTICSErlang (unit)The erlang (symbol E) as a dimensionless unitis used as a statistical measure of offered load.It is named after the Danish telephone engineer A.K.Erlang, the originator of traffic engineering and queueing theory. Traffic of one erlang refers to a single resource being in continuous use, or two channels being at fifty percent use each, and so on. For example, if an office had two telephone operators who are both busy all the time, that would represent two erlangs (2 E) of traffic, or a radio channel that is occupied for thirty minutes during an hour is said to carry 0.5 E of traffic.
Alternatively, an erlang may be regarded as a "use multiplier" per unit time, so 100% use is 1 E, 200% use is 2 E, and so on. For example, if total cell phone use in a given area per hour is 180 minutes, this represents 180/60 = 3 E. In general, if the mean arrival rate of new calls is λ per unit time and the mean call holding time is h, then the traffic in erlangs E is:E = λh
Example 1 • 5 users • Each user makes an average of 3 calls per hour • Each call, in average, lasts for 4 minutes Meaning: in average, there is 1 active call; but the actual number of active calls varies from 0 (no active user) to 5 (all users active),with given probability
Example 2 • 30 users • Each user makes an average of 1 calls per hour • Each call, in average, lasts for 4 minutes • SOME NOTES: • In average, 2 active calls (intensity A); • Frequently, we find up to 4 or 5 calls; • Prob(n.calls>8) = 0.01% • More than 11 calls only once over 1M • TRAFFIC ENGINEERING: how many channels to reserve for these users!
Infinite Users Assume M users, generating an overall traffic intensity A (i.e. each user generates traffic at intensity Ai =A/M). We have just found that Let Minfinity, while maintaining the same overall traffic intensity A
Poisson Distribution Very good matching with Binomial(when M large with respect to A) Much simpler to use than Binomial (no annoying queueing theory complications)
Limited number of channels THE most important problem in circuit switching U1 • The number of channels C is less than the number of users M (eventually infinite) • Some offered calls will be “blocked” • What is the blocking probability? • We have an expression for P[k offered calls] • We must find an expression for P[k accepted calls] • As: U2 X U3 X U4 TOT No. carried calls versus t No. offered calls versus t
Channel utilization probability • C channels available • Assumptions: • Poisson distribution (infin. users) • Blocked calls cleared • It can be proven (from Queueing theory) that: (very simple result!) • Hence:
Fundamental formula for telephone networks planning Ao=offered traffic in Erlangs Blocking probability: Erlang-B • Efficient recursive computation available
NOTE: finite users • Erlang-B can be re-obtained as limit case • Minfinity • Ai0 • M·AiAo • Erlang-B is a very good approximation as long as: • A/M small (e.g. <0.2) • In any case, Erlang-B is a conservative formula • yields higher blocking probability • Good feature for planning • Erlang-B obtained for the infinite users case • It is easy (from queueing theory) to obtain an explicit blocking formula for the finite users case: • ENGSET FORMULA:
Capacity planning • Target: support users with a given Grade Of Service (GOS) • GOS expressed in terms of upper-bound for the blocking probability • GOS example: subscribers should find a line available in the 99% of the cases, i.e. they should be blocked in no more than 1% of the attempts • Given: • C channels • Offered load Ao • Target GOS Btarget • C obtained from numerical inversion of
Channel usage efficiency Carried load (erl) Offered load (erl) C channels Blocked traffic Fundamental property: for same GOS, efficiency increases as C grows!! (trunking gain)
Example GOS = 1% maximum blocking. Resulting system dimensioningand efficiency: 40 erl C >= 53 h = 74.9% 60 erl C >= 75 h = 79.3% 80 erl C >= 96 h = 82.6% 100 erl C >= 117 h = 84.6%
Queuing theory definitions • (Bose) “the basic phenomenon of queueing 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 queueing 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.
Example: application of queuing theory • In many retail stores and banks • multiple line/multiple checkout system a queuing system where customers wait for the next available cashier • We can prove using queuing theory that : throughput improves increases when queues are used instead of separate lines
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
Little’s Law System • Little’s Law: Mean number tasks in system = = mean 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 Departures Arrivals
# in System 3 3 3 2 2 2 1 1 1 1 2 3 4 5 6 7 8 Time Time in System 1 2 3 Packet # Proving Little’s Law Arrivals Packet # Departures 1 2 3 4 5 6 7 8 Time J = Shaded area = 9 Same in all cases!
Definitions • J: “Area” from previous slide • N: Number of jobs (packets) • T: Total time • l: Average arrival rate • N/T • W: Average time job is in the system • = J/N • L: Average number of jobs in the system • = J/T
3 3 Time in System (W) 2 2 1 1 1 2 3 Packet # (N) Proof: Method 1: Definition # in System (L) = 1 2 3 4 5 6 7 8 Time (T)
Proof: Method 2: Substitution Tautology
Queuing System Server Queue Queuing System Server System Model Queuing System • Use Queuing models to • Describe the behavior of queuing systems • Evaluate system performance
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
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)
Distributions • M: stands for "Markovian", implying exponential distribution for service times or inter-arrival times. • D: Deterministic (e.g. fixed constant) • Ek: Erlang with parameter k • Hk: Hyperexponential with param. k • G: General (anything)
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
Poisson Process • For a Poisson process with average arrival rate , the probability of seeing n arrivals in time interval delta t
Poisson process & exponential distribution • Inter-arrival time t (time between arrivals) in a Poisson process follows exponential distribution with parameter
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
L Lq l m Wq W M/M/1 queue model
Solving queuing systems • 4 unknowns: L, Lq W, Wq • Relationships: • L=lW • Lq=lWq (steady-state argument) • W = Wq + (1/m) • If we know any 1, can find the others • Finding L is hard or easy depending on the type of system. In general:
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
l l l l n-1 n n+1 m m m m Equilibrium conditions Define to be the probability of having n tasks in the system at time t
Equilibrium conditions l l l l n-1 n n+1 m m m m
Solving for P0 and Pn • Step 1 • Step 2
Solving for P0 and Pn • Step 3 • Step 4