230 likes | 655 Views
Chapter 8. Queueing models. Delay and Queueing. Main source of delay Transmission (e.g., n/R) Propagation (e.g., d/c) Retransmission (e.g., in ARQ) Processing (e.g., running time of protocols) Queueing Queueing Theory Study of mathematical queueing models Since early 1900’s by Erlang.
E N D
Chapter 8 Queueing models
Delay and Queueing • Main source of delay • Transmission (e.g., n/R) • Propagation (e.g., d/c) • Retransmission (e.g., in ARQ) • Processing (e.g., running time of protocols) • Queueing • Queueing Theory • Study of mathematical queueing models • Since early 1900’s by Erlang
Queue • Customer • System • Service Delay box: Multiplexer switch network Message, packet, cell arrivals Message, packet, cell departures T seconds Lost or blocked
Queueing Discipline • One customer at a time • First-in first-out (FIFO) • LIFO • Round robin • Priorities • Multiple customers at a time • FIFO • Separate queues/separate servers • Blocking rule • Discard when full • Drop randomly • Block a certain class
Definitions • T: Time spent in the system • A(t): # of arrivals in [0,t] • B(t): # of blocked customers in [0,t] • D(t): # of departures in [0,t] • N(t): # of customers in the system at t N(t)=A(t)-D(t)-B(t) • Long term arrival rate • Throughput • Average number in the system • Fraction of blocked customers
Arrivals n+1 A(t) n n-1 ••• 2 1 t 2 n 1 n+1 0 3 Time of nth arrival = 1 + 2 + . . . + n n arrivals 1 Arrival Rate 1 = = E[] 1 + 2 + . . . + nseconds (1+2 +...+n)/n
Little’s Law • Little’s Law If the system does not block customers, then E{N} = λ E{T} If the block rate is Pb, then E{N} = (1-Pb) λ E{T} • Proof
A(t) T7 Assumes first-in first-out T6 T5 T4 D(t) T3 T2 T1 Arrivals C1 C2 C3 C4 C5 C6 C7 C1 C2 C3 C4 C5 C6 C7 Departures Arrivals and Departures
Examples • Let the arrival rate be 100 packets/sec. If 10 packets are found in the queue in average, then the average delay is 10/100=0.1 sec. • Traffic is bad in a rainy day. • For the same volume of customers, a fast food restaurant requires smaller dining area.
Example E{N} = λ E{T}
Servers Arrival process 1 Queue A(t) D(t) 2 t t i i+1 c B(t) X Service time Basic Queueing Models
Arrival Processes • Interarrival times 1, 2,… • Arrival rate λ=1/E{} • Statistics • Deterministic • Exponential interarrival times • Poisson arrival process
Service Processes • Service times X1, X2,… • Processing capacity =1/E{X}
Queueing System Classification Arrival Process / Service Time / # of Servers / Max Occupancy Interarrival times M = exponential D = deterministic G = general Arrival Rate: = 1/E[t] Service times X M = exponential D = deterministic G = general Service Rate: m = 1/E[X] K customers unspecified if unlimited 1 server c servers infinite Multiplexer Models: M/M/1/K, M/M/1, M/G/1, M/D/1 Trunking Models: M/M/c/c, M/G/c/c User Activity: M/M/, M/G/
N(t) = number in system N(t) = Nq(t) + Ns(t) Nq(t) = number in queue Ns(t) Nq(t) Ns(t) = number in service 1 (1 – Pb) 2 T = total delay c W X W = waiting time Pb T = W + X X = service time Queueing System Variables • E{N} • E{Nq} • E{Ns} • Traffic load • Utilization
Exponential service time with rate K – 1 buffer Poisson arrivals rate The M/M/1/K Model • Average packet transmission time E{X} = E{L}/R • Maximum service rate =R/E{L} • P{1 arrival in Δt} = Δt + o(Δt)
1 - (t 1 - (t 1 - (t 1 - (t 1 - t 1 - (t t t t t n 2 n-1 0 1 n+1 t t t t M/M/1 Steady State Probabilities • Average number of customers in the system? • Average delay? • Average wait time?
m One consolidated system m separate systems versus m Example: Effect of Scale • What is the average delay of the combined system?
Infinite buffer = 1/E[X] Poisson arrivals rate The M/G/1 Model • The average wait time: • Similar to M/M/1 except that the service time X may not be exponentially distributed.
c a c ! = B ( c , a ) c j a å j ! j=0 Erlang B Formula: M/M/c/c N(t) Poisson arrivals • Blocked calls are cleared from the system; no waiting allowed. • Performance parameter: Pb = fraction of arrivals that are blocked • Pb = P[N(t)=c] = B(c,a) where a= • The Erlang B formula, valid for any service time distribution 1 Limited number of trunks Many lines = (1–Pb) 2 c Pb E[X]=1/
1 - (t 1 - (2t 1 - t 1 - ((c-1) t 1 - ct t t t c 2 c-1 0 1 t 2t c t State Transition Diagram