queueing theory
play

Queueing Theory 14-740: Fundamentals of Computer Networks Bill Nace - PowerPoint PPT Presentation

Queueing Theory 14-740: Fundamentals of Computer Networks Bill Nace Material from Computer Networking: A Top Down Approach, J.F. Kurose and K.W. Ross Administrivia Quiz #1 is next lesson, on Canvas Study Guide is on the website


  1. Queueing Theory 14-740: Fundamentals of Computer Networks Bill Nace Material from Computer Networking: A Top Down Approach, J.F. Kurose and K.W. Ross

  2. Administrivia • Quiz #1 is next lesson, on Canvas • Study Guide is on the website • Covers all material so far, including today • Includes readings (text and papers) • Closed book, closed notes • No calculator needed • HW #1 due the next Wed (6 Oct) • Lab #1 is now posted 2

  3. Quiz Details • Equation sheet on the website • 15 Questions • 2 Medium Answer • 5 T/F • 1 Queueing • 3 Multiple Answer Theory • 4 Short Answer 3

  4. traceroute • QT Overview • Performance Evaluation • Little’s Law • Rate Transition Diagrams • M/M/1 Systems • M/M/c Systems • Examples 4

  5. ♫ Queueing Theory • An analytic tool to make performance statements about queueing processes Waiting Served Customers Customers (leaving) Arriving Customers Service Facility Customers being Served Discouraged Customers (leaving) • Very applicable: retail, manufacturing, ... • Network uses: routers, transport, ... 5

  6. Queueing System • Describe via six characteristics • Arrival pattern • Service pattern • Queue discipline • System capacity • # of service channels • # of service stages 6

  7. #1: Arrival Pattern • Often, arrivals are stochastic • Need to know the PDF of interarrival times • Sometimes, arrive in batches or in bulk • Need the PDF of batch size • A stationary arrival pattern doesn’t change with time 7

  8. Impatient Customers • Customer reaction is 
 sometimes impatient • Balk is when a customer 
 refuses to enter • Renege is when customer leaves • Customer may jockey for position by switching input queues • Network packets rarely do any of these 8

  9. #2: Service Pattern • Similar to arrival patterns, service patterns are often stochastic • Described by a PDF of customer service times • A state-dependent server changes based on the number of customers waiting • Server may get flustered or work faster • Service can be stationary or nonstationary 9

  10. #3: Queue Discipline • The manner in which customers are chosen from the queue for service • First Come First Served (FCFS) • Last Come First Served • Useful for stack based or inventory systems • Random Service Selection (RSS) • Priority Schemes 10

  11. #4: System Capacity • Is there a physical limitation to the number of customers in the queue? • Common in real life • Bu ff er memory in a router • # of chairs for waiting at barber shop • Often ignored to simplify the analysis 11

  12. ♫ ♫ ♫ #5: Multiple Service Channels • Adding servers increases capacity • How do customers wait? • Single queue can feed many servers • Each server may have its own queue Service Service Facility Facility Service Service Facility Facility Service Service Facility Facility 12

  13. #6: Stages of Service • In a multistage queueing system, customers exit one service only to start waiting for another service • Doctor’s O ffi ce: check-in, history, exam, tests, re-exam, payment • Some systems allow feedback (recycling parts is common in manufacturing) 13

  14. Kendall53’s A/B/X/Y/Z Notation Characteristic Symbol Explanation M Exponential Interarrival-time D Deterministic distribution (A) E k Erlang type k H k k exponentials Service-time PH Phase Type distribution (B) G General 1, 2, 3... , ∞ # parallel servers (X) 1, 2, 3... , ∞ Max capacity ( Y ) FCFS First come, first served LCFS Last come, first served Queue Discipline ( Z ) RSS Random Selection for Service PR Priority GD General Discipline 14

  15. Common Queueing Systems • G/G/1 ➙ General, single server system • G/G/c ➙ General, multi-server system • G/G/ ∞ ➙ General, self-serve system • M/M/1 ➙ Markovian, single server • M/M/c ➙ Markovian, multi-server • M/M/c/k ➙ Multi-server, with limited size • Infinite system size and FCFS discipline are always assumed as the defaults 15

  16. traceroute • QT Overview • Performance Evaluation • Little’s Law • Rate Transition Diagrams • M/M/1 Systems • M/M/c Systems • Examples 16

  17. Parameters • λ is the average arrival rate • # customers or packets per second • μ is the average service rate • # packets served per second • c is number of servers 17

  18. Tra ffi c intensity • ρ ≡ λ / c μ • A measure of tra ffi c congestion in the servers • When ρ > 1, average # of arrivals exceeds service capability ➙ bad • When ρ = 1, randomness prevents queues from emptying (unless perfectly scheduled deterministic arrivals) ➙ bad • Steady state only when ρ < 1 18

  19. # of customers • N(t) is number of customers in the system • Sum of N q (t) and N s (t) , for queues and service • Expected number in system ∞ X L = E [ N ] = np n n =0 • Expected number in queue ∞ X L q = E [ N q ] = ( n − c ) p n n = c +1 • Where p n is Pr{N=n}, probability of a particular number n customers in the system 19

  20. Time • TI is interarrival time (time between successive arrivals) • T q is time spent in queue • S is service time Arrival of Arrival of Departure of Departure of Customer n Customer n+1 Customer n-1 Customer n • T is total time TI(n) (n) S(n) Tq • T = T q + S (n+1) Tq 20

  21. Little’s Law • Relationship between # customers and the waiting time • W is the mean waiting time in the system • W = E[ T ] and W q = E[ T q ] • Little’s Law: L = λ W ( and L q = λ W q ) • Especially powerful when combined with E[ T ] = E[ T q ] + E[ S ] to get W = W q + 1/ μ • Given λ , μ and any 1 of {W, W q , L, L q } can get rest 21

  22. Further Results • What is E[ N s ]? • L - L q = λ (W - W q ) = λ (1/ μ ) = λ / μ • r ≡ λ / μ • For c=1, r = ρ and ∞ ∞ ∞ X X X L − L q = ( n − 1) p n = p n = 1 − p 0 np n − n =1 n =1 n =1 22

  23. Busy Probability • For a G/G/c system, P b is the probability of a given server being busy • At steady state, E[ N s ] = r • Servers are identical, so • E[N a server ] = r/c = P b • Recall that ρ = λ / c μ and r = λ / μ • Therefore, P b = ρ 23

  24. G/G/c Summary ρ = λ /c μ Traffic intensity L = λ W Little’s Law L q = λ W q Little’s Law W = W q +1/ μ P b = λ /c μ = ρ Busy probability for an arbitrary server r = λ / μ Expected number of customers in service L = L q + r p 0 = 1 - ρ G/G/1 empty-system probability G/G/1 combined result L = L q + (1-p 0 ) 24

  25. traceroute • QT Overview • Performance Evaluation • Little’s Law • Rate Transition Diagrams • M/M/1 Systems • M/M/c Systems • Examples 25

  26. Birth-death process • A type of continuous-time Markov chain • System modeled as a set of states • Transitions occur between adjacent states • When in state n , an arrival moves the system to state n +1 • When in state n > 0, a departure moves the system to state n -1 26

  27. Rate Transition Diagram λ 0 λ 1 λ 2 λ 3 λ 4 0 1 2 3 4 μ 1 μ 2 μ 3 μ 4 μ 5 • Describes the number of customers in the system • Customers arrival time is an exponential random variable with rate λ n • Likewise, departure is random with rate μ n 27

  28. Flow-balance Equations λ 0 λ 1 λ 2 λ 3 λ 4 0 1 2 3 4 μ 1 μ 2 μ 3 μ 4 μ 5 • p n is the probability of being in state n • The system is in steady-state, therefore: ( λ n + μ n )p n = λ n-1 p n-1 + μ n+1 p n+1 for n ≥ 1 λ 0 p 0 = μ 1 p 1 28

  29. • My apologies for the derivation! • Rewriting the flow-balance equations: λ n + µ n p n − λ n − 1 = p n +1 p n − 1 µ n +1 µ n +1 λ 0 = p 1 p 0 µ 1 • Do some inductive reasoning: λ 1 + µ 1 p 1 − λ 0 = p 2 p 0 µ 2 µ 2 λ 1 + µ 1 λ 0 p 0 − λ 0 = p 0 µ 2 µ 1 µ 2 Which leads to: λ 1 λ 0 = p 0 µ 2 µ 1 • Similarly: λ n − 1 λ n − 2 · · · λ 0 p n p 0 = µ n µ n − 1 · · · µ 1 p 3 = λ 2 λ 1 λ 0 n λ i − 1 p 0 Y µ 3 µ 2 µ 1 p 0 = µ i i =1 29

  30. traceroute • QT Overview • Performance Evaluation • Little’s Law • Rate Transition Diagrams • M/M/1 Systems • M/M/c Systems • Examples 30

  31. M/M/1 Systems • Exponentially distributed because TI ( t ) = λ e − λ t Interarrival time S ( t ) = µe − µt Service time • Independent of state of the system λ λ λ λ λ 0 1 2 3 4 μ μ μ μ μ 31

  32. M/M/1 Flow Balance Eqns • Rewrite the G/G/c eqns with λ and μ • λ n = λ and μ n = μ for all n n ◆ n ✓ λ ◆ ✓ λ Y p n = p 0 = p 0 µ µ i =1 • Now what? • We need to know what p 0 is! 32

  33. Probabilities must add to 1 ∞ ∞ ∞ ◆ n ✓ λ X X X ρ n 1 = p n = = p 0 p 0 µ n =0 n =0 n =0 • (Remember ρ = λ /c μ and c=1 server) ∞ X ρ n converges if ρ < 1 n =0 ∞ 1 X ρ n = 1 − ρ n =0 p 0 1 = 1 − ρ = 1 − ρ p 0 33

  34. Plug p 0 into Flow-Balance = 1 − ρ gets plugged into p 0 ◆ n ✓ λ = to produce p n p 0 µ = (1 − ρ ) ρ n p n • This final equation is incredibly useful, as it allows us to determine probabilities of system state, given only λ and μ • Also allows us to generate measures of e ff ectiveness 34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend