queuing
play

. / - PowerPoint PPT Presentation

. / Queuing Theory.


  1. Εισαγωγή στην θεωρία ουρών.

  2. Εισαγωγή στη Θεωρία Ουρών/ Queuing Theory. • Από τα πιο ισχυρά μαθηματικά εργαλεία για την εκτέλεση ποσοτικών αναλύσεων. • Αρχικά αναπτύχθηκε για ανάλυση της στατιστικής συμπεριφοράς των συστημάτων μεταγωγής τηλεφώνου/ telephone switching systems αλλά έχει εφαρμογές σε πολλά προβλήματα της δικτύωσης υπολογιστών .

  3. Συστήματα Ουρών Μπορουν να χρησιµποποιηθουν για την µοντελλοποιηση διεργασιων, στις οποιες οι πελατες γτανουν, περιµενουν την σειρα τους για εξυπηρετηση, εξυπηρετουνται και αναχωρουν. 4.τροπος εξυπηρετησης: FIFO,LILO, priority without pushout, random 5. µεγεθος ενδιαµεσης µνηµης 1.συναρτηση πυκνοτητας του χρονου αναµεσα στις αφιξεις. π.χ. Poisson 2.συναρτηση πυκνοτητας 3.αριθµος των πιθανοτητας του χρονου µοναδων εξυπηρετησης αναµεσα στις αναχωρησεις.

  4. Για να αναλυθεί ένα σύστημα πρέπει να ειναί γνωστά : • η συνάρτηση πυκνότητας πιθανότητας (probability density function) άφιξης και η συνάρτηση πυκνότητας πιθανότητας εξυπηρέτησης (1,2). • ο αριθμός των μονάδων εξυπηρέτησης (3). • ο τρόπος εξυπηρέτησης (4). • μέγεθος ενδιάμεσης μνήμης (5). Θα συγκεντρωθούμε στα συστήματα με άπειρο χώρο μνήμης, μια μονάδα εξυπηρέτησης, FIFO τρόπο εξυπηρέτησης.

  5. Συμβολισμός Α/Β/ m/K/M • A- πυκνότητα πιθανότητας των χρηστών μεταξύ των αφίξεων. • Β - πυκνότητα πιθανότητας του χρόνου εξυπηρέτησης . • m- αριθμός των μονάδων εξυπηρέτησης. • K- χωριτικότητα capacity • Μ - Πληθυσμός population

  6. Arrival Process / Service Time / Servers / Max Occupancy Interarrival times τ Service times X K customers 1 server M = exponential M = exponential unspecified if c servers D = deterministic D = deterministic unlimited infinite G = general G = general Service Rate: Arrival Rate: µ = 1/ E [ X ] λ = 1/ E [ τ ] 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 M/M/ ∞ , M/G/ ∞ User Activity: Figure A.7

  7. Είδη Ουρών • Μ/Μ/1 - για μοντελλοποίηση συστημάτων με μεγάλο αριθμό από ανεξάρτητους πελάτες (π.χ. Το τηλεφωνικό σύστημα). Τα πάντα είναι γνωστά (π.χ. Ο αριθμός πελατών στην ουρά, η μέση καθυστέρηση, κ.ο.κ) και οι λύσεις προσφέρωνται σε ακριβή αναλυτική μορφή ( closed form). • G/G/1- για μοντελλοποίηση πιο γενικών συστημάτων. Ακριβές αναλυτικές λύσεις δεν είναι γνωστες. • M/D/1 • G/D/1

  8. Arrival Rates and Traffic Load Delay Box : Message, Message, Packet, Multiplexer Packet, Cell Switch Cell Network Arrivals Departures A(t) D(t) T seconds Lost or Blocked B(t) Number of users in system N(t) = A(t) – D(t) –B(t) Figure A.1

  9. n+ 1 A(t) n n- 1 ••• 2 1 t τ 2 τ n τ 1 τ n+1 τ 3 0 Time of n th arrival = τ 1 + τ 2 + . . . + τ n n arrivals 1 Arrival 1 = = Rate E [ τ ] τ 1 + τ 2 + . . . + τ n seconds ( τ 1 + τ 2 +...+ τ n )/ n Arrival Rate = 1 / mean interarrival time Figure A.2

  10. Little’s Law T A(t) D(t) Delay Box N(t) Figure A.3

  11. Little’s Law A(t) T 7 Assumes T 6 first-in T 5 T 4 D(t) first-out T 3 T 2 T 1 Arrivals C 1 C 2 C 3 C 4 C 5 C 6 C 7 Departures C 1 C 2 C 3 C 4 C 5 C 6 C 7 Figure A.4

  12. Little’s Formula A queuing system with arrival rate λ , mean delay E(T) through the system and an average queue length E(n) is governed by Little’s Formula: = λ E ( n ) E ( T ) If we consider a system where customers will be blocked then = λ (1-P b ) E ( n ) E ( T )

  13. λ = λ E q ( ) E w ( ) µ = λ E n ( ) E T ( ) E(T) = E(w) + 1/ μ Average time delay Average service time Average wait time The average number of customers E(q) waiting in the queue is: λ = λ = λ − = − ρ E ( q ) E ( w ) E ( T ) E ( n ) µ

  14. Arrival Processes • Deterministic – when interarrival times are all equal to the same constant • Exponential – when the interarrival times are exponential random variables with mean E[ τ] = 1/ λ • P[ τ > t] = e -t/E[ τ] = e - λ t for t > 0

  15. Poisson Process T ∆ ∆ ∆ time t t t ∆ ∆ → Consider a small interval : t ( t 0) The probability of one arrival in the interval Δ t is defined 1. to be λΔ t+ o ( Δ t), λ Δ t << 1 and λ is a specified proportionality constant. The probability of zero arrivals in Δ t is 1- Δ t + o (Δ t). 2. 3. Arrivals are memoryless: An arrival (event) in one time interval of length Δ t is independent of events in previous or future intervals.

  16. Poisson Distribution Taking a larger finite time interval T one can find the probability of k arrivals in T: − λ T e = λ k p ( k ) ( T ) . k ! The mean or expected value of k arrivals: = λ E ( k ) T The variance is: σ = = λ 2 E k ( ) T ( ) k

  17. Distribution Conservation • If there are m independent Poisson process streams of arbitrary arrival rates, λ 1 , λ 2 , ... λ m, and these are merged , the composite stream , is itself a = ∑ λ λ Poisson process with parameter . i • Sums of Poisson processes are distribution conserving. They retain the Poisson property. λ 1 m = ∑ λ λ λ + i 2 = i 1 λ m

  18. Time between successive arrivals, τ arrivals τ time The time between successive arrivals, τ , is an exponentially distributed random variable i.e. its probability density function is as follows: τ τ = λ e λτ − τ ≥ f ( ) 0 Var τ = λ E τ = λ 2 ( ) 1/ ( ) 1/

  19. Time between successive arrivals f τ τ ( ) λ τ 1 λ For Poisson arrivals, the time between arrivals is more likely to be small than large. The probability between 2 successive events decreases exponentially with the time τ between them.

  20. Service Process service time r queue output service completions Following similar arguments as for the arrival process, it can be observed that the service process is the complete analogue of the arrival process. For the case where r, the time between completions, is exponentially distributed with mean value 1/ μ , the completion times themselves must represent a Poisson Process.

  21. M/M/1 Queue Exponential service Infinite buffer time with rate µ Poisson arrivals rate λ Figure A.9

  22. The M/M/1 Queue. Infinite Buffer single server, with Poisson arrivals, exponential service time statistics and FIFO service. Poisson Exponetnial arrivals. service n The aim is to find the probability of state n at the queue as a function of time (Pn(t)). The probability Pn (t+ Δ t) that the queue is in state n at time t+ Δ t must be the sum of the mutually exclusive probabilities that the queue was in states n-1, n, n+1 at time t, each multiplied by the independent probability of arriving at state n in the intervening Δ t units of time.

  23. n+1 Buffer Occupancy n State n-1 t t+dt + ∆ = − λ ∆ − µ ∆ + µ ∆ λ ∆ + ∆ P ( t t ) P ( t )[( 1 t )( 1 t ) t t o ( t ) n n + λ ∆ − µ ∆ + ∆ + − λ ∆ µ ∆ + ∆ P ( t )[ t ( 1 t ) o ( t )] P ( t )[( 1 t ) t o ( t )] − + n 1 n 1 Simplifying, dropping o( Δ t) and expanding as a Taylor series about t a Differential- Difference equation can be derived: dP ( t ) = − λ + µ + λ + µ n ( ) P ( t ) P ( t ) P ( t ) − + n n 1 n 1 dt In steady state: λ + µ = λ − + µ ( ) P P P + n n 1 n 1

  24. Deriving the Equation using Balance Equations λ λ 1 2 3 n-1 n n+1 0 µ µ ( λ + μ )Pn = λ Pn-1 μ Pn+1 + rate of rate of rate of leaving entering entering state n state n state n from state n+1 given the from systems was state n-1 in state n with probability Pn

  25. M/M/1 Queue State diagrams 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 Figure A.10

  26. Solution using the Flow Balance Diagram Surface 2 λ λ 1 2 3 n-1 n n n+1 0 µ µ Surface 1 Equating input and output flux around: • Surface 1: λ + µ = λ − + µ ( ) P P P + n n 1 n 1 • Surface 2: µ = λ P P + 1 n n

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