Coefficient of Thermal Expansion and their Importance.pptx
Lecture-2-01-02-2022.pdf
1. NetworksTrafficTheory
M.Sc. Course
Lecture 2: Elementary QueuingTheory and Single Server Queue
Prof. Dr. Emad Al-Hemiary
Al-Nahrain University
College of Information Engineering
Building B Room B107
emad@coie-nahrain.edu.iq
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 1
2. This topic contains:
❑Characteristics of a queuing system
❑Poisson distribution
❑Performance measures of a queuing system
❑PASTA: Poisson Arrivals See Time Averages
❑Kendall’s notation
❑Little's theorem
❑Markov chains
❑Steady state distribution
❑Birth-Death chains analysis
❑Single Server Queue Analysis
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 2
3. Characteristics of a queuing system
describes how customers arrive to the
queue. This is typically specified as a
stochastic (i.e. random) process.
Service process
specifies the manner in which service to
a customer or job is typically provided
Number of servers
specify how many servers are available
to service customers in the queue.
Typically, all servers are identical to
each other and any available (free)
server may give the service required by
a particular job.
System capacity
Specify number of jobs or packets
allowed to occupy the system
Queue discipline
refers to the manner in
which customers are
selected for service when a
queue has formed (ex:
FCFS, LCFS or SIRO –
Service In RandomOrder).
Arrival process
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 3
Server
Queue
𝒔
Queue can be finite or infinite
4. The Arrival Process
❑ Characterized the number of arrivals per unit time (the arrival rate)
❑ Time between successive arrivals (the interarrival time).
❑ Mean arrival rate () is mean number of incoming jobs per unit time
❑ Mean interarrival time (1/) is the mean time between arrivals
❑ If the arrival pattern is not deterministic, the input process is a
stochastic process, which means that we need its associated
probability distribution.
❑ Interarrival times are iid (independent and identically distributed)
❑ An arrival pattern that does not change with time is said to be a
homogeneous arrival process.
❑ If it is invariant to shifts in the time origin, it is said to be a stationary
arrival process (A stochastic process having first moments do not
vary with time).
Interarrival time
Jobs arrive randomly
Time
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 4
5. The Service Process
❑ Time spent in service, NOT waiting
❑ Number of jobs served per unit time (the departure rate)
❑ Time required to serve a job.
❑ Mean service rate (𝜇) is mean number of served jobs per unit time
❑ Mean service Time (1/𝜇) is the mean time for serving a job
❑ If the service pattern is not deterministic, the service process is a stochastic
process, which means that we need its associated probability distribution.
❑ Service may be batch or single
o Batch: several jobs are served simultaneously. Ex. A bus serving multiple
customers
o Single: one job is served at a time
❑ Service rate may be:
o Load (state) dependent: Service rate increase or decrease according to
number of jobs in the system
o Time dependent (nonhomogeneous): Service rate increase or decrease
following hour-based pattern
Server status
Time
busy busy
Service time
Job arrives Job leaves
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 5
6. Poisson Arrivals and Exponential Service
Random variables are frequently modeled as exponentials because:
• its memoryless (Markov) property and resulting analytical tractability;
• its relationship to the Poisson process.
The cumulative distribution function for an exponential random variable, 𝑋, with parameter 𝜆 > 0, is
given by
𝐹 𝑥 = ቊ1 − 𝑒−𝜆𝑥
𝑥 ≥ 0
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑓 𝑥 = ቊ𝜆𝑒−𝜆𝑥
𝑥 ≥ 0
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Its mean, second moment, and variance are given, respectively, by
𝐸 𝑋 =
1
𝜆
𝐸 𝑋2
=
2
𝜆2
𝑎𝑛𝑑 𝑉𝑎𝑟 𝑋 =
1
𝜆2
and its corresponding probability density function, obtained simply by taking the derivative of 𝐹(𝑥) with
respect to 𝑥, is
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 6
7. Poisson Arrivals and Exponential Service
A Poisson process {𝑁(𝑡 ), 𝑡 ≥ 0} having rate 𝜆 ≥ 0 is a counting process with independent and stationary increments,
with 𝑁(0) = 0, and is such that the number of events that occur in any time interval of length 𝑡 has a Poisson
distribution with mean 𝜆𝑡. This means that
𝑝𝑛 𝑡 = prob 𝑁 𝑡 + 𝑠 − 𝑁 𝑠 = 𝑛 = 𝑒−𝜆𝑡
𝜆𝑡
𝑛!
𝑛 = 0,1,2, …
When n = 0, we get the probability of zero arrivals in (0,t]
𝑝0 𝑡 = 𝑒−𝜆𝑡
To compute the mean number of arrivals in an interval of length 𝑡:
𝐿 = 𝐸 𝑁 𝑡 =
𝑘=1
∞
𝑘𝑝𝑘 𝑡 =
𝑘=1
∞
𝑘𝑒−𝜆𝑡
𝜆𝑡
𝑛!
= 𝜆𝑡
𝑘=1
∞
𝜆𝑡 𝑘−1
𝑘 − 1
𝑒−𝜆𝑡
= 𝜆𝑡
𝑘=0
∞
𝜆𝑡 𝑘
𝑘!
𝑒−𝜆𝑡
= 𝜆𝑡
It is now evident why 𝜆 is referred to as the rate of the Poisson process, since the mean number of
arrivals per unit time, 𝐸[𝑁(𝑡 )]/𝑡 , is equal to 𝜆.
Finally, the mean and variance of Poisson distribution equal to 𝜆𝑡
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 7
8. Superposition/Decomposition of Poisson Streams
When two or more independent Poisson streams merge, the resulting stream is also a Poisson stream.
Service
center
𝜆1
𝜆2
𝜆𝑛
𝜆
𝜆 =
𝑖=1
𝑛
𝜆𝑖
Pooled stream
Superposition
𝜆𝑝1
𝜆𝑝2
𝜆𝑝𝑛
𝜆
1 =
𝑖=1
𝑛
𝑝𝑖
Decomposition
Service
center
𝑝1
𝑝2
𝑝𝑛
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 8
9. Performance Measures of a queuing system
System time (delay)
Time a packet have to
spent in the system
QueuingTime
How much time a packet
should wait before it get
served?
Number of jobs waiting
High number of waiting jobs
affects incoming packets
Blocked packets
Blocking probability
Fraction of packets
dropped or denied from
service
Queuing Probability
Fraction of incoming
packets that have to wait
in queue Number of jobs in system
Looking at this number indicates
level of congestion
System throughput
the average number of
customers that are
processed per unit time.
System Utilization (U)
the fraction of time that
the server is busy.
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 9
Server
Queue
𝒔
Queue can be finite or infinite
10. PASTA: Poisson Arrivals SeeTime Averages
❑ A property limited to Poisson arrival process
❑ The PASTA property refers to the expected state of a queueing system as seen by an arrival from a
Poison process.
❑ An arrival from a Poisson process observes the system as if it was arriving at a random moment in
time. Therefore, the expected value of any parameter of the queue at the instant of a Poisson arrival
is simply the long-run average value of that parameter.
❑ Examples:
• the expected number of customers in the queue, including the one in service, is 𝐿
• the probability the server is busy is 𝑈
• the probability the server is idle is 1 − 𝑈
• the expected number waiting and not being served is 𝐿 − 𝑈
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 10
11. Kendall’s Notation
A/B/C/X/Y/Z
Interarrival-time
distribution
Can be:
Exponential (M),
Deterministic (D),
Erlang (Ek),
Hyper-exponential
(Hk), Phase (PH),
general (G)
Service-time
distribution
Can be:
Exponential (M),
Deterministic (D),
Erlang (Ek),
Hyper-exponential
(Hk), Phase (PH),
general (G)
Maximum system
capacity
1,2,3, …, ∞
Size of the
customer
population
Queue discipline
Can be
FCFS
LCFS
RSS
PR
GD
# of parallel
servers
1,2,3, …, ∞
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 11
12. Traffic Intensity
Traffic intensity is a measure of traffic congestion for m-servers system
𝜌 =
𝑐
𝑚𝜇
=
𝑐𝑠
𝑚
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 12
𝒎𝝁
𝒍
Blocked traffic
Carried traffic
𝒄
Offered traffic
Server
Queue
Finite capacity
𝑚𝜇
13. Traffic Intensity of infinite queue (𝒍 = 𝟎)
❑ > 1
• the average number of arrivals into the system exceeds the average departures from the
system
• we would expect, as time goes on, the queue to get bigger and bigger, increasing delay
and cause system failure
❑ = 1
• System transient state lasts for ever and the system does not reaches steady state
❑ < 1
• System reaches steady state
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 13
14. Little's theorem
❑ This is the only general result that is valid for all queueing systems.
❑ published by Little (1961).
❑ We consider a queueing system, where jobs arrive according to a stochastic process. Jobs
enter the system at a random time and wait to get service, after being served they leave
the system. Both arrival and departure processes are considered as stochastic processes
with cumulated number of jobs as ordinate. Then at steady state:
𝐿 = 𝜆 ∙ 𝑊
𝐿 is the mean number of jobs in the system
𝑊 is the mean system time
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 14
15. Markov Chains
❑ A Markov process is a general class of random processes.
❑ It describes the evolution of a system in the form of states current and future.
❑ The basic idea is that for some random behavior system the prediction of its future
state depends on its current state.
𝑥0
𝑥1
𝑥2
𝑥3
𝑥𝑛
𝑥𝑛+1
System states
starts from 0 and
progresses
The state in which the system finds
itself at time step n + 1 depends only
on where it is at time step n
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 15
16. Discrete-Time Markov process
Pr 𝑋𝑛+1 = 𝑥𝑛+1|𝑋𝑛 = 𝑥𝑛, 𝑋𝑛−1 = 𝑥𝑛−1, … , 𝑋0 = 𝑥0 = 𝐏𝐫 𝑿𝒏+𝟏 = 𝒙𝒏+𝟏|𝑿𝒏 = 𝒙𝒏
This Markov property assumes the following:
Your future state depends on your current state and the past of states before your current
state does not matter.
𝑝𝑖𝑗(𝑛) = Pr 𝑋𝑛+1 = 𝑗|𝑋𝑛 = 𝑖
𝑖 is current state
𝑗 is future state
n is time step
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 16
𝑖
𝑗
17. Transition Probability Matrix or Chain Matrix for DTMC
For any system with 𝑚 states, we can write a matrix of 𝑚 × 𝑚 and entries are the transitions
between these states:
0 ≤ 𝑝𝑖𝑗 𝑛 ≤ 1
Properties:
𝑎𝑙𝑙 𝑗
൯
𝑝𝑖𝑗(𝑛 = 1
Each row sum to 1
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 17
𝑃 𝑛 =
𝑝00 𝑛 𝑝01 𝑛 𝑝02 𝑛 ⋯ 𝑝0m 𝑛
𝑝10 𝑛 𝑝11 𝑛 𝑝12 𝑛 ⋯ 𝑝1𝑚 𝑛
𝑝20 𝑛 𝑝21 𝑛 𝑝22 𝑛 ⋯ 𝑝2𝑚 𝑛
⋮ ⋮ ⋮ ⋱ ⋮
𝑝m0 𝑛 𝑝m1 𝑛 𝑝m2 𝑛 ⋯ 𝑝mm 𝑛
18. Example 1:
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 18
1
2
3
0.6 0.5
0.3
0.3
0.4
0.3
0.1
0.3
0.2
𝑃 =
0.6 0.1 0.3
0.3 0.3 0.4
0.2 0.3 0.5
Notice that each row of P sums to 1
19. n-step transition probability
❑ What happen to the system when time n has elapsed? In other worlds what will be the state
probabilities for time greater than 1? (Time can be second, minute, hour, day, week, …)
❑ Figure aside shows the possible transitions from state 𝑖 to state 𝑗 through some middle
state in 𝑛 time steps. If we follow sample paths, then:
𝑖
1
𝑘
2 𝑗
𝑝𝑖2(𝑛 − 1) 𝑝2𝑗
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 19
𝑆𝑎𝑚𝑝𝑙𝑒 𝑝𝑎𝑡ℎ 𝑓𝑟𝑜𝑚 𝑖 𝑡𝑜 𝑗 𝑡ℎ𝑟𝑜𝑢𝑔ℎ 1: 𝑝𝑖1(𝑛 − 1)𝑝1𝑗
𝑆𝑎𝑚𝑝𝑙𝑒 𝑝𝑎𝑡ℎ 𝑓𝑟𝑜𝑚 𝑖 𝑡𝑜 𝑗 𝑡ℎ𝑟𝑜𝑢𝑔ℎ 2: 𝑝𝑖2(𝑛 − 1)𝑝2𝑗
⋮
𝑆𝑎𝑚𝑝𝑙𝑒 𝑝𝑎𝑡ℎ 𝑓𝑟𝑜𝑚 𝑖 𝑡𝑜 𝑗 𝑡ℎ𝑟𝑜𝑢𝑔ℎ 𝑘: 𝑝𝑖𝑘(𝑛 − 1)𝑝𝑘𝑗
The above sample paths assumes that it took n-1 steps
to move from state 𝑖 to any middle state k, then one
extra time step to move to state 𝑗. Therefore:
𝑝𝑖𝑗(𝑛) =
𝑎𝑙𝑙 𝑘
𝑝𝑖𝑘(𝑛 − 1)𝑝𝑘𝑗
This is well-known as Chapman-Kolmogorov
Equation
20. n-step transition probability
The n-step transition probability can be written in another form. This form states the
following:
𝑖
1
𝑘
2 𝑗
𝑝𝑖2 𝑝2𝑗((𝑛 − 1)
Another form of
Chapman-Kolmogorov Equation
To go from 𝑖 to 𝑗 in 𝑛 steps, it is necessary to go from 𝑖
to an intermediate state 𝑘 single step, and then from 𝑘
to 𝑗 in the remaining n-1steps
𝑝𝑖𝑗(𝑛) =
𝑎𝑙𝑙 𝑘
𝑝𝑖𝑘𝑝𝑘𝑗 (𝑛 − 1)
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 20
23. Classification of States
Recurrent State: If you start from state 𝑖 then there is a way of returning to it after visiting
some states
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 23
24. Classification of States
Transient State: If the state is not recurrent, then it is transient. A transient state is visited a
finite number of times and there is a possibility the system escapes it and does not return
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 24
25. Steady State Distribution and Balance Equations
• In the long run, the system enters steady state
• Steady state does not mean that the system stops moving between states
• The system keeps moving between states and the transition probabilities become fixed.
• Taking the limit of both sides of the recursion CK equation:
lim
𝑛→∞
𝑝𝑖𝑗(𝑛) = lim
𝑛→∞
𝑎𝑙𝑙 𝑘
𝑝𝑖𝑘(𝑛 − 1)𝑝𝑘𝑗
𝜋𝑗 =
𝑎𝑙𝑙 𝑘
𝜋𝑗𝑝𝑘𝑗 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑗
In matrix form:
𝝅 = 𝝅𝑷
𝝅 = 𝟏
Balance Equations for solving Markov chain
Singular, has infinite solutions
One extra common equation to solve for unique solution
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 25
26. Example 3: Let us find the results of Example 2 using the balance equations
1 2
0.5
0.5
0.2
0.8
𝑃 =
0.5 0.5
0.2 0.8
𝜋 = 𝜋𝑃
𝜋1
𝜋2
= 𝜋1 𝜋2
0.5 0.5
0.2 0.8
𝜋1 = 0.5𝜋1 + 0.2𝜋2 ⇒ 𝜋1 =
2
5
𝜋2
𝜋2 = 0.5𝜋1 + 0.8𝜋2 ⇒ 𝜋1 =
2
5
𝜋2
𝜋1 + 𝜋2 = 1
𝜋1 =
2
7
𝜋2 =
5
7
and
The system tends to stay
at state 2 more time than
staying in state 1
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 26
27. Birth-Death (BD) Chain
▪ Continuous-time MC with infinite discrete state space indexed by 0,1,2,…
▪ Transitions are permitted between nearest neighbors only
▪ Birth: An arrival to the queueing system results in one additional unit in the system
▪ Death: A departure removes a unit from the system.
▪ Poisson arrivals (𝜆𝑛), exponentially distributed service rate (𝜇𝑛)
0 1 2 3 n-1 n n+1 ∞
𝜆 0 𝜆 1 𝜆 2 𝜆 𝑛−1
𝜆 3 𝜆 𝑛 𝜆 𝑛+1
𝜇 1 𝜇 2 𝜇 3 𝜇 4 𝜇 𝑛 𝜇 𝑛+1 𝜇 𝑛+2
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 27
28. BD Steady-State Solution
Rate of flow at state n
𝜆𝑛−1
𝜇𝑛+1
𝜆𝑛
𝑢𝑛
𝑛 + 1
𝑛 − 1 𝑛
The rate of probability at which the
system enters state n:
The rate of probability at which the
system leaves state n:
0 1 2 3 n-1 n n+1 ∞
𝜆 0 𝜆 1 𝜆 2 𝜆 𝑛−1
𝜆 3 𝜆 𝑛 𝜆 𝑛+1
𝜇 1 𝜇 2 𝜇 3
𝜇 4 𝜇 𝑛 𝜇 𝑛+1 𝜇 𝑛+2
And state 0 is a special case because the
queue is empty and only birth occurs:
𝜆0𝜋0
𝜆𝑛−1𝜋𝑛−1 + 𝑢𝑛+1𝜋𝑛+1
(𝜆𝑛+𝑢𝑛) ∙ 𝜋𝑛
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 28
29. BD Steady-State Solution
𝜆0
𝑢1
0 1
State 0:
𝜆0𝜋0 = 𝑢1𝜋1 ⇒ 𝜋1 =
𝜆0
𝑢1
𝜋0
𝜆0
𝑢1
0 1
𝜆1
𝑢2
2
State 1:
𝜆0𝜋0 + 𝑢2𝜋2 = (𝜆1+𝑢1) ∙ 𝜋1⇒ 𝜋2 =
𝜆0𝜆1
𝑢1𝑢2
𝜋0
State 2:
𝜆1𝜋1 + 𝑢3𝜋3 = (𝜆2+𝑢2) ∙ 𝜋2⇒ 𝜋3 =
𝜆0𝜆1𝜆2
𝑢1𝑢2𝑢3
𝜋0
𝜆𝑛−2
𝑢𝑛−1
𝑛 − 2 𝑛
𝜆𝑛−1
𝑢𝑛
𝑛 − 1
And so on for all states. In general:
𝜆𝑛−2𝜋𝑛−2 + 𝑢𝑛𝜋𝑛 = (𝜆𝑛−1+𝑢𝑛−1) ∙ 𝜋𝑛−1⇒ 𝜋𝑛 =
𝜆0𝜆1𝜆2 ∙∙∙ 𝜆𝑛−1
𝑢1𝑢2𝑢3 ∙∙∙ 𝑢𝑛
= ෑ
𝑗=1
𝑛
𝜆𝑗−1
𝑢𝑗
𝜋0
0 1 2 3 n-1 n n+1 ∞
𝜆 0 𝜆 1 𝜆 2 𝜆 𝑛−1
𝜆 3 𝜆 𝑛 𝜆 𝑛+1
𝜇 1 𝜇 2 𝜇 3
𝜇 4 𝜇 𝑛 𝜇 𝑛+1 𝜇 𝑛+2
First part of the solution
𝜆1
𝑢2
1 2
𝜆2
𝑢3
3
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 29
30. BD Steady-State Solution
We use sum of all state probabilities to 1
0 1 2 3 n-1 n n+1 ∞
𝜆 0 𝜆 1 𝜆 2 𝜆 𝑛−1
𝜆 3 𝜆 𝑛 𝜆 𝑛+1
𝜇 1 𝜇 2 𝜇 3
𝜇 4 𝜇 𝑛 𝜇 𝑛+1 𝜇 𝑛+2
𝑘=0
∞
𝜋𝑘 = 1
𝜋0 + 𝜋0
𝑘=1
∞
𝜆0𝜆1𝜆2 ∙∙∙ 𝜆𝑘−1
𝑢1𝑢2𝑢3 ∙∙∙ 𝑢𝑘
= 1
𝜋0 =
1
1 + σ𝑘=1
∞ ς𝑗=1
𝑘 𝜆𝑗−1
𝜇𝑗
Therefore the probability of empty system is given by
Which completes the steady state solution
Second part of the solution
𝜋𝑛 =
ς𝑗=1
𝑛 𝜆𝑗−1
𝑢𝑗
1 + σ𝑘=1
∞ ς𝑗=1
𝑘 𝜆𝑗−1
𝜇𝑗
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 30
31. BD Steady-State Solution
BD steady state equations can be formed using Matrices:
0 1 2 3 n-1 n n+1 ∞
𝜆 0 𝜆 1 𝜆 2 𝜆 𝑛−1
𝜆 3 𝜆 𝑛 𝜆 𝑛+1
𝜇 1 𝜇 2 𝜇 3
𝜇 4 𝜇 𝑛 𝜇 𝑛+1 𝜇 𝑛+2
𝜋𝑄 = 0
𝜋0 𝜋1 𝜋2 ⋯ 𝜋𝑛 ⋯
−𝜆0 𝜆0 0 0 0 0
𝜇1 − 𝜆1 + 𝜇1 𝜆1 ⋯ ⋮ ⋮
0 𝜇2 − 𝜆2 + 𝜇2 ⋯ 0 ⋮
0 0 𝜇3 ⋱ 𝜆n−1 0
0 0 0 ⋯ − 𝜆n + 𝜇n ⋯
⋮ ⋮ 0 ⋯ 𝜇n+1 ⋱
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
= 0
CTMC Steady state balance equation
The matrix 𝑄 is referred to as transition rate matrix. Each row should sum to zero
NetworksTrafficTheory - Prof. Dr. Emad Al-Hemiary 31
32. M/M/1 Queue
▪ A BD chain
▪ Markovian (M): Arrivals are Poisson distributed with arrival rate equal to 𝜆 𝑗𝑜𝑏𝑠/𝑡𝑖𝑚𝑒
o 𝜆𝑘 = 𝜆 𝑓𝑜𝑟 𝑘 = 0,1, … , ∞
▪ Markovian(M): Exponentially distributed service time with service rate equal to 𝜇 𝑗𝑜𝑏𝑠/𝑡𝑖𝑚𝑒
o 𝜇𝑘 = 𝜇 𝑓𝑜𝑟 𝑘 = 1, … , ∞
▪ Single server
▪ Infinite capacity
▪ Infinite population
▪ FCFS
0 1 2 3 n-1 n n+1 ∞
𝜆
𝜇 𝜇 𝜇 𝜇 𝜇
𝜆 𝜆 𝜆 𝜆
States represent number of jobs presents in system at steady state
34. 𝜌 < 1
𝑛 ≥ 0
Letting 𝜌 =
𝜆
𝜇 we get:
𝜋𝑛 = 𝜌 𝑛
𝜋0 = 𝜌 𝑛
1 − 𝜌
𝜋0 = 1 − 𝜌
𝜌 is traffic intensity
𝜋0 is probability of idle state
(probability of empty system) at
steady state
𝜋𝑛is probability of finding n jobs in
the system at steady state
The results obtained for M/M/1 queue can be
found using a method of cut:
0 1 2 3 n-1 n n+1 ∞
𝜆
𝜇 𝜇 𝜇 𝜇 𝜇
𝜆 𝜆 𝜆 𝜆
𝜆𝜋0 = 𝜇𝜋1 → 𝜋1 =
𝜆
𝜇
𝜋0 → 𝜋1 = 𝜌𝜋0
𝜆𝜋1 = 𝜇𝜋2 → 𝜋2 =
𝜆
𝜇
𝜋1 → 𝜋2 = 𝜌𝜋1 = 𝜌2𝜋0
𝜆𝜋2 = 𝜇𝜋3 → 𝜋3 =
𝜆
𝜇
𝜋2 → 𝜋3 = 𝜌𝜋2 = 𝜌3
𝜋0
⋮
𝜆𝜋𝑛−1 = 𝜇𝜋𝑛 → 𝜋𝑛 =
𝜆
𝜇
𝜋𝑛−1 → 𝜋𝑛 = 𝜌𝜋𝑛−1 = 𝜌𝑛
𝜋0
Steady State Analysis of M/M/1 Queue
35. Mean Number in the System
In steady state, the mean number in the system is the expected value of jobs at steady state and is
given by (states represents number of jobs):
𝐿 = 𝐸[𝑁] =
𝑛=0
∞
𝑛𝑝𝑛
𝐸[∙] is the mean (expected value)
𝑛 is the state number (n = 0, 1, 2, …)
𝑝𝑛 probability of system state 𝑛
0 1 2 3 n-1 n n+1 ∞
0 jobs with
probability 𝑝0
1 jobs with
probability 𝑝1
2 jobs with
probability 𝑝2
n jobs with
probability 𝑝𝑛
n+1 jobs with
probability 𝑝𝑛+1
= 𝐿
36. 𝐿 = 𝐸 𝑁 =
𝑛=0
∞
𝑛𝑝𝑛 =
𝑛=0
∞
𝑛 1 − 𝜌 𝜌𝑛 = 1 − 𝜌
𝑛=0
∞
𝑛𝜌𝑛 = 𝜌 1 − 𝜌
𝑛=0
∞
𝑛𝜌𝑛−1
𝐿 = 𝜌 1 − 𝜌
𝜕
𝜕𝜌
𝑛=0
∞
𝜌𝑛 = 𝜌 1 − 𝜌
𝜕
𝜕𝜌
1
1 − 𝜌
= 𝜌 1 − 𝜌
1
1 − 𝜌 2
=
𝜌
1 − 𝜌
𝐿 =
𝜌
1 − 𝜌
=
𝜌
𝜋0
=
𝜆
𝜇 − 𝜆
𝑗𝑜𝑏𝑠
Keep in mind (for 𝜌 < 1):
𝑛=0
∞
𝜌𝑛
=
1
1 − 𝜌
𝑛=0
∞
𝑛𝜌𝑛
=
𝜌
1 − 𝜌 2
• As 𝜌 → 1, 𝐿 → ∞ that is, the expected queue length grows to ∞.
• As we attempt to keep the server as busy as possible by increasing the traffic intensity
𝜌, the quality of service provided to a typical customer declines, since, on the average,
such a customer sees an increasingly longer queue length ahead of him.
Mean Number in the System
37. Average SystemTime of M/M/1 Queue
Using Little’s Result:
• As 𝜌 → 0, 𝑊 → 1/𝜇 which is the average service time.
• As 𝜌 → 1, 𝑊 → ∞ as we attempt to keep the server as busy as possible by increasing the traffic
intensity 𝜌, average system time increases rapidly causing congestion and hence large delay.
𝐿 = 𝜆W
𝑊 =
𝐿
𝜆
=
1
𝜆
𝜌
1 − 𝜌
𝑊 =
1/𝜇
1 − 𝜌
=
1/𝜇
𝜋0
=
1
𝜇 − 𝜆
W
0
1/𝜇
0.99
38. AverageWaitingTime of M/M/1 Queue
Waiting in queue for an M/M/1 customer is given by:
• As 𝜌 → 0, 𝑊
𝑞 → 0
• As 𝜌 → 1, 𝑊
𝑞 → ∞ as we attempt to keep the server as busy as possible by increasing the
traffic intensity 𝜌, Average waiting time increases which bad for customers
𝑊
𝑞 = 𝑊 −
1
𝜇
𝑊
𝑞 =
𝜌
𝜇 1 − 𝜌
=
𝜌/𝜇
𝜋0
=
𝜌
𝜇 − 𝜆
=
𝐿
𝜇
𝑊
𝑞 =
1/𝜇
1 − 𝜌
−
1
𝜇
=
𝜌
𝜇 1 − 𝜌
39. Average Queue Length of M/M/1 Queue
We can use Little’s result for average jobs in queue:
• As 𝜌 → 0, 𝐿𝑞 → 0
• As 𝜌 → 1, 𝐿𝑞 → ∞ as we attempt to keep the server as busy as possible by increasing the
traffic intensity 𝜌, Average queue length increases causing larger delay
𝐿𝑞 = 𝜆𝑊
𝑞 = 𝜆
𝐿
𝜇
= 𝜌𝐿 =
𝜌2
1 − 𝜌
=
𝜌2
𝜋0
𝐿𝑞 =
𝜌2
1 − 𝜌
40. Throughput and Utilization of M/M/1 Queue
❑ Throughput is the departure rate of the server, i.e.:
𝑇ℎ𝑟𝑜𝑢𝑔ℎ𝑝𝑢𝑡𝑀𝑀1 = 𝜇 1 − 𝜋0 = 𝜇 1 − 1 + 𝜌 = 𝜇𝜌 = 𝜆
❑ Utilization on the other hand is the fraction of time server is busy, i.e. all states other than state 0.
Therefore:
𝑈𝑀𝑀1 = 1 − 𝜋0 = 𝜌
The above result is expected since at steady state the arrival and departure rates are balanced
41. M/M/1/K Queue
▪ A BD chain
▪ Markovian (M): Arrivals are Poisson distributed with arrival rate equal to 𝜆 𝑗𝑜𝑏𝑠/𝑡𝑖𝑚𝑒
o 𝜆𝑛 = ቊ
𝜆 𝑖𝑓 0 ≤ 𝑛 < 𝐾
0 𝑖𝑓 𝑛 ≥ 𝐾
▪ Markovian(M): Exponentially distributed service time with service rate equal to 𝜇 𝑗𝑜𝑏𝑠/𝑡𝑖𝑚𝑒
o 𝜇𝑛 = 𝜇 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑛 = 1, … , 𝐾
▪ Single server
▪ Finite capacity K
▪ Infinite population
▪ FCFS
Server
Queue
𝜆
𝜆𝜋𝐾
𝜆(1 − 𝜋𝐾) 𝜇(1 − 𝜋0)
Lost Capacity = K
𝜇
0 1 2 3 K-1 K
𝜆
𝜇 𝜇 𝜇 𝜇
𝜆 𝜆 𝜆
Number of states = K+1
42. M/M/1/K Queue 0 1 2 3 K-1 K
𝜆
𝜇 𝜇 𝜇 𝜇
𝜆 𝜆 𝜆
We follow the same procedure for obtaining state probabilities of M/M/1 system. The result
is:
𝜋𝑛 = 𝜌𝑛𝜋0 𝑛 = 0,1,2, ⋯ , 𝐾
𝑎𝑙𝑙 𝑛
𝜋𝑛 = 1 →
𝑎𝑙𝑙 𝑛
𝜌𝑛𝜋0 = 1 → 𝜋0 =
1
σ𝑛=0
𝐾
𝜌𝑛
=
1
1 − 𝜌𝐾+1
1 − 𝜌
=
1 − 𝜌
1 − 𝜌𝐾+1
When 𝜌 = 1, we use L’Hopital’ s rule
𝜋0 =
−1
−(𝐾 + 1)𝜌𝐾
=
1
𝐾 + 1
𝜋0 =
1 − 𝜌
1 − 𝜌𝐾+1
, 𝜌 ≠ 1
1
𝐾 + 1
, 𝜌 = 1
𝜋𝑛 =
1 − 𝜌
1 − 𝜌𝐾+1
𝜌𝑛, 𝜌 ≠ 1, 𝑛 ≤ 𝐾
1
𝐾 + 1
, 𝜌 = 1, 𝑛 ≤ 𝐾
Finally we get:
43. M/M/1/K Queue
❑ The steady-state solution always exists, even for 𝜌 ≥ 1.
❑ The system is stable for all positive values of 𝜆 and 𝜇. When 𝜆 > 𝜇, the number of
customers in the system will increase, but it is bound from above by K.
❑ 𝜌 no longer represents the utilization!
44. Performance Measures for the M/M/1/K Queue
The mean number in system L:
𝐿 =
𝜌 1 − 𝐾 + 1 𝜌𝐾
+ 𝐾𝜌𝐾+1
1 − 𝜌 1 − 𝜌𝐾+1
The mean number in queue 𝐿𝑞:
𝐿𝑞 = 𝐿 −
𝜌 1 − 𝜌𝐾
1 − 𝜌𝐾+1
The mean system W time is found using Little’s result as follows:
The effective arrival rate 𝜆𝑐 is the actual arrival rate entering the system which is equal to:
𝜆𝑐 = 𝜆 1 − 𝜋𝐾 𝑊 =
1
𝜆𝑐
𝐿 𝑊
𝑞 =
1
𝜆𝑐
𝐿𝑞
and