Základy teorie front

Similar documents
Základy teorie front II

Markovské řetězce se spojitým parametrem

Bootstrap metody II Kernelové Odhady Hustot

Performance Evaluation of Queuing Systems

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 "

QUEUING SYSTEM. Yetunde Folajimi, PhD

Introduction to queuing theory

Statistika pro informatiku

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Introduction to Queueing Theory

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

Elementary queueing system

Introduction to Queueing Theory

Introduction to Queueing Theory

Statistika pro informatiku

Introduction to Markov Chains, Queuing Theory, and Network Performance

Kendall notation. PASTA theorem Basics of M/M/1 queue

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

Queues and Queueing Networks

Data analysis and stochastic modeling

GI/M/1 and GI/M/m queuing systems

Part II: continuous time Markov chain (CTMC)

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Queueing Theory and Simulation. Introduction

M/G/1 and M/G/1/K systems

Queueing Systems: Lecture 3. Amedeo R. Odoni October 18, Announcements

Chapter 2 Queueing Theory and Simulation

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

Non Markovian Queues (contd.)

Figure 10.1: Recording when the event E occurs

Chapter 1. Introduction. 1.1 Stochastic process

Analysis of Software Artifacts

PBW 654 Applied Statistics - I Urban Operations Research

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

Lecture 20: Reversible Processes and Queues

Queuing Theory. Using the Math. Management Science

Part I Stochastic variables and Markov chains

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

Advanced Computer Networks Lecture 3. Models of Queuing

CS418 Operating Systems

Queuing Theory and Stochas St t ochas ic Service Syste y ms Li Xia

IEOR 6711, HMWK 5, Professor Sigman

Computer Systems Modelling

Quantum computing. Jan Černý, FIT, Czech Technical University in Prague. České vysoké učení technické v Praze. Fakulta informačních technologií

Chapter 3 Balance equations, birth-death processes, continuous Markov Chains

Queuing Theory. Richard Lockhart. Simon Fraser University. STAT 870 Summer 2011

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

Link Models for Circuit Switching

Statistics 150: Spring 2007

Queueing. Chapter Continuous Time Markov Chains 2 CHAPTER 5. QUEUEING

NEW FRONTIERS IN APPLIED PROBABILITY

Link Models for Packet Switching

Classification of Queuing Models

Stochastic process. X, a series of random variables indexed by t

Performance Modelling of Computer Systems

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

COMP9334: Capacity Planning of Computer Systems and Networks

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

Models and Simulations of Queueing Systems

NATCOR: Stochastic Modelling

Introduction to Queueing Theory with Applications to Air Transportation Systems

Continuous Time Processes

Name of the Student:

Markov processes and queueing networks

Introduction to Queuing Theory. Mathematical Modelling

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

LECTURE #6 BIRTH-DEATH PROCESS

Continuous-Time Markov Chain

Queueing Theory. VK Room: M Last updated: October 17, 2013.

Systems Simulation Chapter 6: Queuing Models

COMP9334 Capacity Planning for Computer Systems and Networks

Introduction to queuing theory

Operations Research Letters. Instability of FIFO in a simple queueing system with arbitrarily low loads

Chapter 11. Performance Modeling

Lecture Notes of Communication Network I y: part 5. Lijun Qian. Rutgers The State University of New Jersey. 94 Brett Road. Piscataway, NJ

Probability Models in Electrical and Computer Engineering Mathematical models as tools in analysis and design Deterministic models Probability models

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

Chapter 5: Special Types of Queuing Models

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

Readings: Finish Section 5.2

Intro Refresher Reversibility Open networks Closed networks Multiclass networks Other networks. Queuing Networks. Florence Perronnin

Intro to Queueing Theory

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

Introduction to Queuing Networks Solutions to Problem Sheet 3

An engineering approximation for the mean waiting time in the M/H 2 b /s queue

Bernoulli Counting Process with p=0.1

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Chapter 11. Performance Modeling

M/G/1 and Priority Queueing

Performance analysis of queueing systems with resequencing

The effect of probabilities of departure with time in a bank

Review of Queuing Models

Analysis of A Single Queue

10.2 For the system in 10.1, find the following statistics for population 1 and 2. For populations 2, find: Lq, Ls, L, Wq, Ws, W, Wq 0 and SL.

Little s result. T = average sojourn time (time spent) in the system N = average number of customers in the system. Little s result says that

Birth-Death Processes

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/6/16. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

Chapter 5. Continuous-Time Markov Chains. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

λ λ λ In-class problems

Transcription:

Základy teorie front Mgr. Rudolf B. Blažek, Ph.D. prof. RNDr. Roman Kotecký, DrSc. Katedra počítačových systémů Katedra teoretické informatiky Fakulta informačních technologií České vysoké učení technické v Praze Rudolf Blažek & Roman Kotecký, 2011 Statistika pro informatiku MI-SPI, ZS 2011/12, Přednáška 16 Evropský sociální fond Praha & EU: Investujeme do vaší budoucnos@

Introduction to Queueing Theory Mgr. Rudolf B. Blažek, Ph.D. prof. RNDr. Roman Kotecký, DrSc. Department of Computer Systems Department of Theoretical Informatics Faculty of Information Technologies Czech Technical University in Prague Rudolf Blažek & Roman Kotecký, 2011 Statistics for Informatics MI-SPI, ZS 2011/12, Lecture 16 The European Social Fund Prague & EU: We Invest in Your Future

Random Processes White Random Processes White Random Processes 3

Random Processes White Random Processes White Random Processes Definition!!!!!!!!!!!!!!! Bílý šum White noise random process is a process whose power spectral density is constant for all frequencies S X ( )= 1 2 N 0, for 1< < 1 Notes N0 > 0 is a fixed constant May or may not be Gaussian white noise This process does not exist in real life, but is useful for theory 4

Random Processes White Random Processes White Random Processes The Autocorrelation Function of the White Random Process If the power spectral density is constant for all frequencies S X ( )= 1 2 N 0, for 1< < 1 then the autocorrelation function of the process (the inverse Fourier transform of SX) is given by R X ( )=F 1 (S X )= 1 2 N 0 ( ) where δ(τ) is the Dirac delta function ( pulse at 0). 5

White Random Processes White Random Processes The Dirac Delta Function Definition The Dirac delta function ( pulse at 0) is defined as +1 if t =0 such that (t) = Z " 0 otherwise, " (t) dt = 1, 8" > 0. The integration notation is only a symbolic convention Such function δ does not exist as an ordinary function 6

Random Processes White Random Processes The Dirac Delta Function δ(t) Dirac delta function δ(t) is the ( pulse at 0) 0 t 7

Random Processes White Random Processes We Can Find the Autocorrelation Function Backwards Assume S X ( )= 1 2 N 0, for 1< < 1 Then 1 2 N 0 = S X ( ) = Z 1 1 R X ( ) e i d. Does not depend on ξ That only works for τ = 0 We will try δ(τ) (infinite pulse at 0) Z 1 1 Z 1 1 2 N 0 ( ) e i d = 1 2 N 0 1 ( ) e i d = 1 2 N 0 1 for τ = 0 8

Random Processes White Random Processes White Random Processes The white random process is not physically realizable It would have infinite average power: R X (0) = 1 2 R 1 1 S X ( ) d = 1 2 Its autocorrelation function is the Dirac Delta which itself does not exist as an ordinary function It is useful for theoretical calculations R 1 1 1 2 N 0 d = 1 If it is passed through a filter, the output is an observable random process Gaussian white noise (GWN) is often assumed in problems where we need to filter-out noise from signal 9

Random Processes Final Remarks Sampling of Continuous Random Processes Originally electronic filters used to be analog circuits The input signals were processed continuously The output of filters was really an integral of the input Today we use mostly digital circuits Input signals are periodically sampled at times T, 2T, 3T,... ( ( ( ( ( X [k] = X(kT ), k = 1, 2, 3,... Stationarity of X(t ) implies stationarity of X [k] The mean and autocorrelation fn. can be sampled as well: EX[k] =EX(kT )= X (kt ) R X [k 1, k 2 ]=EX(k 1 T )X(k 2 T )=R X (k 1 T, k 2 T ) 10

Random Processes Final Remarks Important Types of Random Processes Second-Order Stationary Processes Wide Sense Stationary Processes Gaussian Processes, White Noise,... (Multi)Linear Systems (filtering and detection of signals) Ergodic Processes (we will discuss them later) Autoregressive Moving Average Processes (ARMA) Autocorrelation function is hard to find directly via densities It becomes easy if we define ARMA as linear systems and use spectral densities to find the autocorrelation function 11

Introduction to Queueing Theory Základy teorie front Alternative Spelling: Queuing 12

Literature Textbook Chee-Hock Ng & Soong Boon-Hee Queueing Modelling Fundamentals With Applications in Communication Networks John Wiley and Sons, Inc., 2 edition, 2008 13

Literature Textbook Richard Durrett Essentials of Stochastic Processes Springer Texts in Statistics 1st ed. 1999 Corr. 2nd printing edition (November 2, 2010) 14

Basic Principles and Terminology Queueing Systems ( ( Systémy hromadné obsluhy Activities today are highly interdependent and intertwined Sharing of resources is common in all walks of life Sharing leads to waiting for resources in queues In data communications (e.g. the Internet) Data packets are queued in switch/router buffers for transmission In computer systems Jobs are queued for processing by CPU or I/O devices 15

Basic Principles and Terminology Queueing Theory Originally developed for telephone networks A.K. Erlang (Danish engineer, published a paper in 1909) D.G. Kendall (British statistician, Oxford, Cambridge, introduced notation in 1953) In modern packet switching networks L. Kleinrock (American engineer, MIT, UCLA, main work in early 1960s) Poisson Process The most common model for customer arrivals 16

Basic Principles and Terminology Basic Principles and Terminology Customers Arrive according to an arrival process Want to obtain service from a service facility Networking: Data packets, data frames,... Computing: Jobs, transactions, user requests,... Service facility Contains one or more servers Each server can serve one customer at a time Customers join a queue if all servers are occupied 17

Basic Principles and Terminology Queueing System Diagram Fronta Waiting Queue Obsluha Service Facility Customer Population Arriving Customers Vstupní tok požadavků Departing Customers Výstupní tok požadavků Prvky systému hromadné obsluhy 18

Basic Principles and Terminology Basic Principles and Terminology Queueing System Arrival process Service Facility Waiting Queue Systém hromadné obsluhy Vstupní tok požadavků Obsluha a její režim Fronta a její režim We need a mathematical description of The input process The system structure Queueing policy; Service policy The output process 19

Basic Principles and Terminology Characteristics of the Input Process Charakteristiky vstupního toku požadavků (i) The size of arriving population Finite or infinite Infinite is easier to solve arrival rate not affected by size We often assume infinite arriving population It approximates a very large population (ii) Behavior of arriving customers May leave forever if the queue is full May leave randomly if the queue is too long 20

Basic Principles and Terminology Characteristics of the Input Process Charakteristiky vstupního toku požadavků (iii) Arriving patterns M: ( Markovian or Memoryless Poisson Process ( ( (I.e. exponential & independent interarrival times) D:( Ek:( G:( GI:( Deterministic, constant interarrival times Erlang distribution of order k of interarrival times General probability distribution of interarrival times General & Independent distribution of interarrival times Default Assumption: Poisson Process 21

Basic Principles and Terminology Characteristics of the System Structure (i) Physical number and layout of servers One or more; identical or different; serial or parallel We will focus on parallel identical servers I.e. customers can go to any free server and then leave (ii) The system capacity ( System capacity = waiting customers + served customers Non-blocking system infinite queue Easier to solve often we assume this Blocking system finite queue Customers leave forever if the queue is full 22

Basic Principles and Terminology Physical Layout of Servers Arriving Customers Departing Customers Parallel Servers Arriving Customers Departing Customers Serial Servers 23

Basic Principles and Terminology Characteristics of the Output Process Charakteristiky výstupního toku požadavků (i) Queueing discipline or serving discipline ( ( ( ( ( ( Obsluha a její režim / Fronta a její režim First-come-first-served (FCFS) / First-in-first-out (FIFO) Last-come-first-served (LCFS) / First-in-last-out (FILO) Priority based (preemptive or non-preemptive) Processor sharing (1/k of time to each of k customers) Random Default Assumption: FCFS/FIFO 24

Basic Principles and Terminology Characteristics of the Output Process Charakteristiky výstupního toku požadavků (ii) Service time distribution M: ( Markovian or Memoryless exponential service times D:( Deterministic, constant service times Ek:( Erlang distribution of order k of service times G:( General probability distribution of service times Default Assumption: Exponential service times 25

Basic Principles and Terminology Web and Database Servers Example Pool of m application servers (e.g. Tomcat) submits a job to a central database server Application server 1 Application server 2 Central Database Server Application server m 26

Basic Principles and Terminology Web and Database Servers Example We assume the Poisson arrival process for the requests. So we obtain a state-dependent Poisson arrival process with the rate (m k) k < m (k) = 0 k m 27

Basic Principles and Terminology Kendall Notation A / B / X / Y / Z A:( Customer arrival pattern ( ( (Interarrival time distribution) B:( Service pattern (Service time distribution) X:( Number of parallel servers Y: ( System capacity Z:( Queueing discipline Default values:( Y =, Z = FCFS Example: ( M / M / 1 = M / M / 1 / / FCFS ( ( ( ( (Poisson arrivals, Exp. service times, 1 server) 28

Basic Principles and Terminology Plan of Study We will focus on M/M/m systems We must therefore study The Exponential Distribution (interarrival & service times) The Poisson Process (interarrival times are Exponential) Birth & Death Markov chains with continuous time (the number of customers in the system) We will also look at a M/G/ system Poisson arrivals, General service time, many servers But we will look at some general results first... 29

Little s Theorem and Related Results Little s Theorem and Related Results 30

Little s Theorem and Related Results Ergodicity Two ways of calculating the average value of a process: Time average Expected value X t = 1 t 1X Z t 0 X( ) d EX(t) = k P[X(t) =k] k=0 Definition A random process X is ergodic if the two averages are equal (have the same limit) as t 31

Little s Theorem and Related Results Little s Theorem Theorem N = λ T where ( ( N (=( average number of customers in the system ( ( λ ( =( average arrival rate of customers ( ( T( =( average time a customer spends in the system Very general no assumptions about Interarrival and service time distribution Queueing policy Number of parallel servers 32

Little s Theorem and Related Results Proof of Little s Theorem Assume FCFS (FIFO) policy Define ( ( A(t)( =( Number of arrivals during time interval (0,t) ( ( D(t)( =( Number of departures during (0,t) ( ( N(t)( =( Number of customers in the system at time t Assume we start wit empty system at time 0, then!!!!!!! N(t)( =( A(t) D(t) ( ( ( ( 33

Little s Theorem and Related Results Proof of Little s Theorem Z t 0 Number of arrivals or departures 0 N( ) d = Z t 0 N(t) = A(t) D(t) T1 T2 t1 t2 t3 [A( ) D( )] d A(t)... arrivals D(t)... departures tk(...( arrival time of k th customer Tk(...( time spent in the system ( ( by the k th customer Time t Area between the curves: departed in the system = t D(t) X k=1 T k 1 + A(t) X k=d(t)+1 (t t k ) 1 34

Little s Theorem and Related Results Before we got the total number of customers up to time t Z t 0 N( ) d = Z t 0 [A( ) D( )] d = D(t) X k=1 T k 1 + A(t) X k=d(t)+1 (t t k ) 1 The time average of the number of customers Nt is Z " # t X D(t) XA(t) N t = 1 t 0 N( ) d = = " D(t) X k=1 k=1 T k + T k + k=d(t)+1 A(t) X k=d(t)+1 (t t k ) (t t k ) # 1 t 1 A(t) A(t) t Nt = Tt time average of the time spent by a customer λt time average of the arrival rate 35

Little s Theorem and Related Results Proof of Little s Theorem We have ( ( ( ( ( ( ( ( Nt =Tt λt ( ( Nt(...( time average of the number of customers ( ( Tt(...( time average of the time spent by a customer ( ( λt(...( time average of the arrival rate For ergodic processes the time average ( ( Nt( N = Expectation in steady state, as t Let t to get ( ( ( ( ( ( ( ( N =T λ Note: Most queueing systems are ergodic. 36

Little s Theorem and Related Results Resource Utilization Definition Resource utilization of a queueing system is the fraction of time the system is used = Time a server is occupied Time available 37

Little s Theorem and Related Results Resource Utilization Note With m servers, N customers during (t, t+t ), arrival rate λ each server serves on average N /m = (λt / m) customers. If the average service time is (1/μ) then = Time a server is occupied Time available = ( T/m) (1/µ) T = mµ 38

Little s Theorem and Related Results Traffic Intensity Definition Traffic Intensity (offered load) of a queueing system is the product of the average arrival rate λ and the average service time (1/μ): = µ 39

Little s Theorem and Related Results Flow Conservation Law Proposition For a stable queueing system rate of customers leaving = rate of customers entering λout = λin 40