2-5 Characteristics of a Queuem b Number of servers m: one, multiple, infinite Buffer size b Service discipline scheduling: FCFS, LCFS, Processor Sharing PS, etc Arrival process Service
Trang 1TCOM 501:
Networking Theory & Fundamentals
Lecture 2 January 22, 2003 Prof Yannis A Korilis
Trang 22-2 Topics
Delay in Packet Networks Introduction to Queueing Theory Review of Probability Theory
The Poisson Process Little’s Theorem
Proof and Intuitive ExplanationApplications
Trang 32-3 Sources of Network Delay
Time spend on the link – transmission of electrical signal Independent of traffic carried by the link
Focus: Queueing & Transmission Delay
Trang 42-4 Basic Queueing Model
Arrivals Departures
Buffer Server(s)
Queued In Service
A queue models any service station with:
One or multiple servers
A waiting area or buffer
Customers arrive to receive service
A customer that upon arrival does not find a free server is waits in the buffer
Trang 52-5 Characteristics of a Queue
m b
Number of servers m: one, multiple, infinite Buffer size b
Service discipline (scheduling): FCFS, LCFS, Processor Sharing (PS), etc
Arrival process Service statistics
Trang 7µ is called the service rate For packets, are the service times really random?
Trang 82-8 Queue Descriptors
Generic descriptor: A/S/m/k
A denotes the arrival process
For Poisson arrivals we use M (for Markovian)
B denotes the service-time distribution
M: exponential distribution D: deterministic service times G: general distribution
m is the number of servers
k is the max number of customers allowed in the system – either in the buffer or in service
k is omitted when the buffer size is infinite
Trang 92-9 Queue Descriptors: Examples
M/M/1: Poisson arrivals, exponentially distributed service times, one server, infinite buffer
M/M/m: same as previous with m serversM/M/m/m: Poisson arrivals, exponentially distributed service times, m server, no buffering
M/G/1: Poisson arrivals, identically distributed service times follows a general distribution, one server,
infinite buffer
*/D/∞ : A constant delay system
Trang 102-10 Probability Fundamentals
Exponential Distribution Memoryless Property
Poisson Distribution Poisson Process
Definition and PropertiesInterarrival Time DistributionModeling Arrival and Service Statistics
Trang 112-11 The Exponential Distribution
A continuous RV X follows the exponential distribution with parameter µ, if its probability density function is:
Probability distribution function:
if 0( )
Trang 122-12 Exponential Distribution (cont.)
Mean and Variance:
x X
Trang 142-14 Poisson Distribution
A discrete RV X follows the Poisson distribution with
parameter λ if its probability mass function is:
Wide applicability in modeling the number of random events that occur during a given time interval – The Poisson Process:
Customers that arrive at a post office during a day Wrong phone calls received during a week
Students that go to the instructor’s office during office hours
… and packets that arrive at a network switch
Trang 152-15 Poisson Distribution (cont.)
Mean and VarianceProof:
Trang 162-16 Sum of Poisson Random Variables
X i , i =1,2,…,n, are independent RVs
X i follows Poisson distribution with parameter λi
Partial sum defined as:
S n follows Poisson distribution with parameter λ
Trang 172-17 Sum of Poisson Random Variables (cont.)
Proof: For n = 2 Generalization by
Trang 182-18 Sampling a Poisson Variable
X follows Poisson distribution with parameter λ
Each of the X arrivals is of type i with probability p i ,
i =1,2,…,n, independently of other arrivals;
Trang 192-19 Sampling a Poisson Variable (cont.)
Proof: For n = 2 Generalize by induction Joint pmf:
Trang 202-20 Poisson Approximation to Binomial
Binomial distribution with
parameters (n, p)
As n →∞ and p→0, with np=λ
moderate, binomial distribution
converges to Poisson with
1 1
n n k n
n P
Trang 212-21 Poisson Process with Rate λ
{A(t): t≥0} counting process
A(t) is the number of events (arrivals) that have occurred from time 0 – when A(0)=0 – to time t
A(t)-A(s) number of arrivals in interval (s, t]
Number of arrivals in disjoint intervals independentNumber of arrivals in any interval (t, t+τ] of length τ
Depends only on its length τ
Follows Poisson distribution with parameter λτ
Average number of arrivals λτ; λ is the arrival rate
Trang 22Probability distribution function
Independence follows from independence of number of arrivals in disjoint intervals
P τ ≤ s = − P τ > s = − P A t + −s A t = = − e−λ
Trang 232-23 Small Interval Probabilities
Trang 242-24 Merging & Splitting Poisson Processes
processes with rates λ1,…, λk
Merged in a single process
A1 is Poisson with rate λ1= λp
A2 is Poisson with rate λ2= λ(1-p)
Trang 252-25 Modeling Arrival Statistics
Poisson process widely used to model packet arrivals
in numerous networking problemsJustification: provides a good model for aggregate traffic of a large number of “independent” users
n traffic streams, with independent identically distributed (iid) interarrival times with PDF F(s) – not necessarily exponential Arrival rate of each stream λ/n
As n →∞, combined stream can be approximated by Poisson under mild conditions on F(s) – e.g., F(0)=0, F’(0)>0
☺ Most important reason for Poisson assumption:
Analytic tractability of queueing models
Trang 262-26 Little’s Theorem
N λ
T
λ: customer arrival rateN: average number of customers in systemT: average delay per customer in systemLittle’s Theorem: System in steady-state
Trang 272-27 Counting Processes of a Queue
α(t)
N(t)
t
β(t)
N(t) : number of customers in system at time t
α(t) : number of customer arrivals till time t β(t) : number of customer departures till time t
T i : time spent in system by the ith customer
Trang 28Time average over interval [0,t]
Steady state time averages
0
( ) 1
1
( )
lim 1
lim ( )
a t t t
Trang 292-29 Proof of Little’s Theorem for FCFS
Assumption: N(t)=0, infinitely often For any such t
If limits N t→N, T t→T, λ t→λ exist, Little’s formula follows
We will relax the last assumption
β(t)
( ) 1
Trang 302-30 Proof of Little’s for FCFS (cont.)
β(t)
In general – even if the queue is not empty infinitely often:
Result follows assuming the limits T t →T, λ t →λ, and δ t→δ exist,
Trang 312-31 Probabilistic Form of Little’s Theorem
Have considered a single sample function for a stochastic process
Now will focus on the probabilities of the various sample functions of a stochastic process
Probability of n customers in system at time t
Expected number of customers in system at t
Trang 322-32 Probabilistic Form of Little (cont.)
p n (t), E[N(t)] depend on t and initial distribution at t=0
We will consider systems that converge to steady-state
there exist p n independent of initial distribution
Expected number of customers in steady-state [stochastic aver.]
For an ergodic process , the time average of a sample function is equal to the steady-state expectation, with probability 1.
Trang 332-33 Probabilistic Form of Little (cont.)
In principle, we can find the probability distribution of the delay
T i for customer i, and from that the expected value E[T i], which converges to steady-state
For an ergodic system
Probabilistic Form of Little’s Formula:
Arrival rate define as
→∞
=
Trang 342-34 Time vs Stochastic Averages
“Time averages = Stochastic averages,” for all systems of interest in this course
It holds if a single sample function of the stochastic process contains all possible realizations of the
process at t→∞
Can be justified on the basis of general properties of Markov chains
Trang 352-35 Moment Generating Function
1 De¯nition: for any t 2 IR:
it determines the distribution of X uniquely.
3 Fundamental Properties: for any n 2 IN:
Trang 362-36 Discrete Random Variables
Trang 372-37 Continuous Random Variables