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

Σχετικά έγγραφα
Queueing Theory I. Summary. Little s Law Queueing System Notation Stationary Analysis of Elementary Queueing Systems. M/M/1 M/M/m M/M/1/K

Outline. M/M/1 Queue (infinite buffer) M/M/1/N (finite buffer) Networks of M/M/1 Queues M/G/1 Priority Queue

Section 8.3 Trigonometric Equations

5.4 The Poisson Distribution.

Homework 3 Solutions

2 Composition. Invertible Mappings

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Εισαγωγή (2/2) Επισκόπηση Γνώσεων Πιθανοτήτων (1/2)

Statistical Inference I Locally most powerful tests

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems

4.6 Autoregressive Moving Average Model ARMA(1,1)

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Διαδικασίες Γεννήσεων - Θανάτων Εξισώσεις Ισορροπίας - Ουρές Μ/Μ/1, M/M/1/N Προσομοίωση Ουράς Μ/Μ/1/Ν

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Επισκόπηση Γνώσεων Πιθανοτήτων (2/2) Διαδικασία Γεννήσεων Θανάτων Η Ουρά Μ/Μ/1

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Areas and Lengths in Polar Coordinates

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

M / M (k) /1 Queuing model with varying bulk service

Areas and Lengths in Polar Coordinates

Probability and Random Processes (Part II)

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Systems with unlimited supply of work: MCQN with infinite virtual buffers A Push Pull multiclass system

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

ST5224: Advanced Statistical Theory II

Math221: HW# 1 solutions

Math 6 SL Probability Distributions Practice Test Mark Scheme

The Simply Typed Lambda Calculus

PARTIAL NOTES for 6.1 Trigonometric Identities

(C) 2010 Pearson Education, Inc. All rights reserved.

EE512: Error Control Coding

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Second Order RLC Filters

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Παράμετροι Συστημάτων Αναμονής Τύπος Little

Homework 8 Model Solution Section

Matrices and Determinants

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems

[1] P Q. Fig. 3.1

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Παράμετροι Συστημάτων Αναμονής Τύπος Little. Β. Μάγκλαρης, Σ. Παπαβασιλείου

6.3 Forecasting ARMA processes

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Example Sheet 3 Solutions

Solutions to Exercise Sheet 5

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Μηχανική Μάθηση Hypothesis Testing

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Inverse trigonometric functions & General Solution of Trigonometric Equations

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review

Section 9.2 Polar Equations and Graphs

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Εκθετική Κατανομή, Στοχαστικές Ανελίξεις Διαδικασίες Απαρίθμησης, Κατανομή Poisson

Solution Series 9. i=1 x i and i=1 x i.

Second Order Partial Differential Equations

EE101: Resonance in RLC circuits

CHAPTER 101 FOURIER SERIES FOR PERIODIC FUNCTIONS OF PERIOD

Elements of Information Theory

D Alembert s Solution to the Wave Equation

derivation of the Laplacian from rectangular to spherical coordinates

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

A Bonus-Malus System as a Markov Set-Chain. Małgorzata Niemiec Warsaw School of Economics Institute of Econometrics

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems Διαδικασίες Birth-Death, Ουρές Markov:

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

Differential equations

The challenges of non-stable predicates

Capacitors - Capacitance, Charge and Potential Difference

Every set of first-order formulas is equivalent to an independent set

ΣΥΣΤΗΜΑΤΑ ΑΝΑΜΟΝΗΣ Queuing Systems

Section 7.6 Double and Half Angle Formulas

( ) 2 and compare to M.

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Numerical Analysis FMN011

Approximation of distance between locations on earth given by latitude and longitude

Uniform Convergence of Fourier Series Michael Taylor

Srednicki Chapter 55

Aquinas College. Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

C.S. 430 Assignment 6, Sample Solutions

w o = R 1 p. (1) R = p =. = 1

THE M/G/1 FEEDBACK RETRIAL QUEUE WITH TWO TYPES OF CUSTOMERS. Yong Wan Lee

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

Démographie spatiale/spatial Demography

Fractional Colorings and Zykov Products of graphs

Risk! " #$%&'() *!'+,'''## -. / # $

Pg The perimeter is P = 3x The area of a triangle is. where b is the base, h is the height. In our case b = x, then the area is

Finite Field Problems: Solutions

Problem Set 3: Solutions

10.7 Performance of Second-Order System (Unit Step Response)

Transcript:

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

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

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

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

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

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

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

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

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

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

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

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 E ( n ) =λ(1-p b ) E( T)

λ Eq ( ) = λew ( ) µ En ( ) = λet ( ) E(T) = E(w) + 1/μ Average time delay Average wait time Average service time The average number of customers E(q) waiting in the queue is: λ E( q) = λe( w) = λe( T ) = E( n) µ ρ

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

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

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

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 λ 2 + m λ = λi i= 1 λ m

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

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. τ

Service Process r service time 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.

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

The M/M/1 Queue. Poisson arrivals. Infinite Buffer Exponetnial service single server, with Poisson arrivals, exponential service time statistics and FIFO 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.

n+1 Buffer Occupancy State n n-1 P ( t + t) = P + n P n t t+dt ( t)[(1 λ t)(1 µ t) + µ tλ t + o( t) 1( t)[ λ t(1 µ t) + o( t)] + Pn + 1( t)[(1 λ t) t + o( t)] n µ Simplifying, dropping o(δt) and expanding as a Taylor series about t a Differential- Difference equation can be derived: dpn ( t) = ( λ + µ ) Pn ( t) + λpn 1( t) + µ Pn + 1( t) dt In steady state: ( λ + µ ) P = + n λpn 1 µ Pn + 1

Deriving the Equation using Balance Equations λ λ 0 1 2 3 n-1 n n+1 µ µ (λ+μ)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

M/M/1 Queue State diagrams 1 - λ t 1 - (λ + µ) t 1 - (λ + µ) t 1 - (λ + µ) t 1 - (λ + µ) t 1 - (λ + µ) t λ t λ t λ t λ t 0 1 2 n-1 n n+1 µ t µ t µ t µ t Figure A.10

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

Solving recursively: P 1 P P 2 n = λ P µ 0 = ρ. ρ. P n = ρ P 0 = ρp 0 0 where λ = ρ µ is the line utilization or traffic intensity. By utilizing the probability normalization condition : n P n = 1 P 0 P n = 1 ρ n = (1 ρ) ρ The above distribution is called a geometric distribution and it can only be derived if ρ<1.

Expected number of customers in M/M/1 queue with infinite buffer space: En ( ) E( n) ρ 1 ρ = npn = n= 0 1 ρ

Extension to Finite Queues. The queue has a finite maximum queue length N: = n ρ (1 ρ) P n N 1 1 ρ + The probability that the queue is full, which is equal to the Blocking probability is equal to: P N ρ (1 ρ) 1 ρ N = N + 1 ρ 1 The probability that the queue is empty is equal to: 1 ρ P0 = N + 1 1 ρ

Poisson arrivals rate λ K-1 buffer Exponential service time with rate µ Figure A.9

Relation between Throughput and Load λp B λ =load rejected or blocked Queue γ =throughput= λ(1 P B ) throughput γ = λ( 1 P B ) = µ (1 P0 ) net arrival rate net departure rate γ = λ(1 ) P B µ γ = µ (1 P ) 0

P B 1 1 N +1 Region of Congestion. Normalized Throughput γ µ 1 ρ 1 N N + 1 1 ρ Normalized Load

Queue Performance As the load of the system increases the throughput increases as well. More customers are blocked. The average number of customers in the queue and thus the average wait time increases as well. At high loads queuing deadlocks can occur and throughput may drop to zero. There is a trade-off in performance.

Nonpreemptive Priority Queuing Systems Need to provide priority in many systems: Computer systems Computer control of telephone digital switching exchanges Deadlock prevention in packet switching Nonpreemptive Priority: Higher priority customers move ahead of lower priority ones in the queue but do not preempt lower priority customers already in service. Preemptive Priority: Interrupt lower priority customers in service until all higher priority customers are served.

Queuing Networks For M/M/1 queues, models handling network of queues are relatively easy. They make use of the so called product form solution (Jackson Network). Much of the research since 1970s is devoted to these two problem areas: -finding conditions for which the product form solution applies. -developing improved and efficient algorithms for reducing the computational complexity. Two generic classes can be considered: open and closed queuing networks.

Open Queuing Networks r 21 2 r ab routing probability from node a to node b. r s1 1 λ s 3 6 4 5 r 4d λ d r 65 Packets enter and leave the network without losses. From flow conservation principles Net arrival rate= Net departure rate λs = λd

source terminal destination host 1 2 3 5 4 source terminal destination host λ d 2 1 2 λ s1 3 5 4 λ s5 λ d 4

Consider a portion of the network with M queues: µ 1 λ source r s1 dest λ r s2 µ 2 The Poisson arrival rate at a source is labelled λ. The symbol rij represents the probability that a packet (customer) completing service at queue i is routed to queue j. The queue service rate at a node i is labelled μi.

Normalization condition: r id M + rij = j= 1 1 Continuity of flow: M λ r λ r λ = + i is ki k K = 1 Product form solution: M n = Pn ( ) = (1 ρ ) ρ Pn ( ) Pn ( ) i= 1 i i i i i i The various queues even though interconnected though the continuity expression behave as if they are independent. More remarkably they appear as M/M/1 queues with the familiar state probability distribution.

M/D/1 M/ Er/1 M/M/1 M/H/1 Service Time Constant Erlang Exponential Hyperexponential Coefficient of Variation 0 <1 1 >1 E[W]/E[W M/M/1 ] 1/2 1/2<, <1 1 >1 Figure A.13