primer
play

primer Lecturer: Massimo Tornatore Original material prepared by: - PowerPoint PPT Presentation

Queueing theory primer Lecturer: Massimo Tornatore Original material prepared by: Professor James S. Meditch Typesetter: Dr. Anpeng Huang Courtesy of: Prof. Biswanath Mukherjee 1 A change of focus So far we have investigated static


  1. Queueing theory primer Lecturer: Massimo Tornatore Original material prepared by: Professor James S. Meditch Typesetter: Dr. Anpeng Huang Courtesy of: Prof. Biswanath Mukherjee 1

  2. A change of focus • So far we have investigated «static» problems – Traffic requests are given and constant in time • E.g., Multi commodity flow problem • In general, mathematical programming, optimization and graph theory, heuristics… • Now we move to a class of dynamic problems – Random or stochastic flow problems – The times at which the demands arrive are uncertain and also the size of the demands are unpredictable • Queueing (in our case «traffic») theory 2

  3. Source • Notes taken mainly from – L. Kleinrock, Queueing Systems (Vol 1: Theory) • Chapter 1 and 2 – L. Kleinrock, Queueing Systems (Vol. 2: Computer Applications) • Chapter 1 3

  4. Delay and Congestion, why? R C If R>C, we expect congestion (intuitive) If R<C, there might still be congestion (why?) • The reason for this behaviour is the irregularity (i.e, statistical distribution) of: – Arrivals (i.e., interarrival times) – Services (i.e., service times) 4

  5. A. Notation and terminology 5

  6.  c n = customer n = arrival time of c n n   ~ t n = – = interarrival time → t  1 n n ~ w n = waiting time for c n → w ~ x n = service time for c n → x ~ s n = system time for c n → s s n = w n + x n 6 *Note that these distributions do not depend by n (same distribution for all arrivals/services)

  7. Arrival process Service process CDF ~ ~     ( ) [ ] B x P x x ( ) [ ] A t P t t ( ) dB x ( ) dA t pdf   ( ) b x ( ) a t dx dt 1 1 mean ~ ~     [ ] [ ] E x x E t t   k th moment ~  ~ k k  [( ) ] k E t t k [( ) ] E x x 7

  8. Laplace transform/moment generating f n  ~       * st s t ( ) ( ) [ ] [ ( )] A s a t e dt E e E f t 0 ~   * s x ( ) [ ] B s E e * k ( ) d A s ( ) k    * k k ( 0 ) ( 1 ) A t  0 s k ds 8

  9. Queueing system performance ~ ~ x t Input variables: system defined by and Output variables: performance defined by 1. N(t) no. of customers in system at time t 2. w n waiting time 3. s n system time    HP: (statistical equilibrium, , ( ) t N t N stationarity) 9

  10. N w s ~ ~     ( ) [ ] ( ) [ ]   W y P w y S y P s y ( ) [ ] F k P N k N   ( ) ( ) dW y dS y [ ] P P N k   ( ) ( ) w y s y k dy dy  [ ] E N N ~ ~   [ ] [ ] E w W E s T     N k [ ] ( ) E z Q z P z ~ ~     k * * s w s s [ ] ( ) [ ] ( ) E e W s E e S s  0 k 10

  11. Other performance variables: I = idle period D = interdeparture time G = busy period N q = no. of customers in queue 11

  12. Kendall’s notation for queueing systems A/B/m A/B/m/K/M no. of users no. of servers queue size M exponential(Markovian) D deterministic E r r-stage Erlangian G general H r R-stage hyperexponential 12

  13. B. General results 1. Utilization factor avg. rate at which w ork arrives R    capacity of the system to do work C   fraction of system capacity in use (on the avg.)    0 1 13

  14. G/G/1 • Let us start with no assumptions on arrival and service distribution and one single server • It can be generally proven that:  avg. no. arrivals / sec      x  avg. rate of service / sec 1  where x  14

  15. G/G/m • In case of multiple ( m ) servers:   1 x     , avg. service time for each server   m m   avg. fraction of busy servers    Stability requires 0 1    ( except for where 0 1 ) D/D/m 15

  16. 2. System time ~ ~ ~   s x w ~ ~ ~   [ ] [ ] [ ] E s E x E w   T x W 16

  17. 3. Little’s result     , N T     N T N W q The average number of customers in a queueing system is equal to the average arrival time of customers to that system, times the average time spent in that system 17

  18.   ( ) no. arrivals in (0, t) t   ( ) no. departures in (0, t) t     N(t) (t) - (t) 0   t  ( ) ( ) (customer - sec) total time all customers t N s ds 0 have spent in the system up to time t (i.e, the grey area! )  system time per customer averaged over all customers T t who arrived during (0, t)  avg. no. of customers in the system during the interval (0, t) N t 18

  19.    ( ) t customers   ( ) Avg. arrival rate in (0, t) t     sec t  ( )   t  sec/custom ers Avg. system time per customer in (0, t) T  t ( ) t  ( ) t  N Avg. no. customers in system in (0, t) t t   ( ) ( ) t t   But we can N  t ( ) t t    N T t t t 19

  20.       If lim and lim exist, then (q.e.d) T T N T     t t t t Similarly, it can be proven tha t :     N W   q  N N N s q      ( )  N x s   and we also get T x W       / / : , G G m N N m  q m 20

  21. C. Poisson process  independen t  Interarriv al times : t i  exponentia lly distribute d, 1 ~        t [ ] 1 , 0 , P t t e t t   k ( ) t     t  ( ) , 0 , 1 , P t e k k ! k  Pr [ arrivals in ( 0 ) ] k ,t 21 Pure birth system (see p. 60-63, 65,Vol. 1)

  22. 1. Derivation of the Poisson process      Δt Pr[ 1 arrival in ] t o( t)   Δt Δt Pr[ 0 arrival in ] 1 Pr[ 1 arrival in ]       1 t o( t)   process intensity (arrival rate)            ( ) ( )[ 1 ] ( ) ( ) P t t P t t P t t o t  1 k k k              ( ) ( ) ( ) ( ) ( ) P t t P t P t t P t t o t  1 k k k k 22

  23. If I divide by « dt », I obtain: ( ) dP t       k  ( 1 ) ( ) ( ) 1 , 2 , P t P t k  1 k k dt Similarly for P 0 :          ( ) ( )[ 1 ] ( ) P t t P t t o t 0 0 ( ) dP t     0 ( 2 ) ( ) note that ( 0 ) 1 P t P 0 0 dt    t ( ) P t e Solving the the first-order differential equation (2): 0     t ( ) P t te then inserting P 0 (t) in (1) for k=1: 1  k ( ) t      t then continuing by induction: ( ) , 0 , 0 P t e k t k ! k ~       t * Final note (relation with exp. neg. distributi on! ! ) ( ) 1 [ ] P t e P t t 0 23

  24. 2. Properties of the Poisson Process      i. ( ) ( ) N t kP t t k  k 0   avg. arrival rate    2 ii. t ( ) N t        ( ) ( 1 ) k N t t z iii. ( ) [ ] Q(z,t) P t z E z e k  0 k ( , ) dQ z t        t ( z 1 ) t e t  dz 1 z  1 z ~       t iv. [ ] 1 A(t) P t t e     t ( ) a t e Interarriv al times are exponentia lly distribute d (memoryles s! ) 1 1    2 t   2 24

  25. Random process • Poisson Process is a stochastic (or random) process • Now we will use some more advanced stochastic processes (Markov chains) • But… what is a stochastic process? – It is «family» of random variables X(t) indexed by time t – A possible (intuitive) case is when the random process represents the sum of simple random variables at instant t 25

  26. Example of a random process  S 1 (t) , S 2 (t) S 3 (t) …. are H H ´ ´ 1 6 S 1 random variables H H ´ ´ 3 7 S 2  X(t) is random process H H ´ ´ 4 8 S 3  X(t, w ) = Number of servers H H ´ ´ 2 5 S 4 busy at time t of realization X(t) w of the process= one 4 realization of the process H H 7 8 3  Assumptions H H H 6 7 8 2 Stationarity  H H H H H H 2 3 4 5 6 7 E [to,to+  ] [X(t, w )] = A  (t 0 , w ) 1 • = A  ( w )= A( w ) H H H H 1 3 4 5 0 t + Ergodicity   t t 0 0 A( w ) = A • 26

Recommend


More recommend