You are on page 1of 10

THE BIRTH-AND-DEATH PROCESS

BE (CS) Lecture 28
Spring 2022 Semester ▪ Most elementary queuing models assume that the inputs
(arriving jobs) and outputs (leaving jobs) of the queuing
system occur according to the birth-and-death process.
CS-438: Computer Systems Modeling
▪ The state of the system at time t (t ≥ 0), denoted by n(t),
o number of jobs in the queuing system at time t.

Lectures 28-30 ▪ The birth-and-death (B&D) process describes


probabilistically how n(t) changes as t increases.
Birth-And-Death Processes
▪ Broadly speaking, it says that individual births and deaths
M/M/1 System occur randomly, where their mean occurrence rates
M/G/1 System depend only upon the current state of the system.
Dr Syed Zaffar Qasim
Assistant Professor (CIS)
1 2

THE BIRTH-AND-DEATH PROCESS THE BIRTH-AND-DEATH PROCESS


▪ More precisely, the assumptions of the birth-and-death
process are the following:- ▪ The next transition in the state of the process is either
o Assumption 1: Given N(t) = n, the current probability o n → n + 1 (a single birth)
distribution of the remaining time until the next birth or
(arrival) is exponential with parameter n (n = 0, 1, 2,
o n → n - 1 (a single death),
…).
o depending on whether the former or latter random
o Assumption 2: Given N(t) = n, the current probability
variable is smaller.
distribution of the remaining time until the next death
(service completion) is exponential with parameter µn ▪ Because of these assumptions, the B&D process is a
(n = 1, 2, …). special type of continuous time Markov chain.
o Assumption 3: The random variable of assumption 1 ▪ Queuing models that can be represented by a
(the remaining time until the next birth) and the continuous time Markov chain are far more tractable
random variable of assumption 2 (the remaining time analytically than any other.
until the next death) are mutually independent.
3 4

CSM (CS-438) 1
THE BIRTH-AND-DEATH PROCESS Generalized Poisson Queuing Model
▪ We can summarize these assumptions by the rate
diagram shown in Fig. 1. ▪ Except for a few special cases, analysis of the birth-and-
death processes is very difficult when the system is in a
transient condition.
▪ Some results about the probability distribution of N(t)
have been obtained, but they are too complicated to be of
much practical use.
Fig 1: Rate diagram for the birth-and-death process ▪ On the other hand, it is relatively straightforward to
derive this distribution from the rate diagram after the
▪ The arrows in this diagram show the only possible system has reached a steady-state condition.
transitions in the state of the system (as specified by ▪ Here we develop a general queuing model
assumption 3). o that combines both arrivals and departures based on
the Poisson assumptions –
▪ The entry for each arrow gives the mean rate for that
transition (as specified by assumptions 1 and 2) when
o i.e., the inter-arrival and service times follow the
the system is in the state at the base of the arrow. exponential distribution.
5 6

Generalized Poisson Queuing Model Generalized Poisson Queuing Model


▪ Dividing through both sides by t and then letting t → 
▪ Consider any particular state of the system n (n = 0, 1, 2, …). gives
▪ Starting at time 0, suppose that a count is made of the
number of times that the process enters this state and the
number of times it leaves this state, as denoted below:-
▪ Dividing En(t) and Ln(t) by t gives the actual rate
o En(t) = number of times that process enters state n by time t. (number of events per unit time) at which these two
o Ln(t) = number of times that process leaves state n by time t. kinds of events have occurred, and
▪ letting t →  then gives the mean rate (expected number
of events per unit time):-

▪ Because the two types of events (entering and leaving)


must alternate,

7 8

CSM (CS-438) 2
Generalized Poisson Queuing Model Generalized Poisson Queuing Model
▪ To illustrate a balance equation, consider state 0.
▪ These results yield the following key principle:-
Rate In = Rate Out Principle ▪ The process enters this state only from state 1.

Fig 1: Rate diagram for the birth-and-death process


▪ For any state of the system n (n = 0, 1, 2, …),
o mean entering rate = mean leaving rate.
▪ Thus, the steady-state probability of being in state 1
▪ The equation expressing this principle is called the (P1) represents the proportion of time that it would
balance equation for state n.
be possible for the process to enter state 0.
▪ After constructing the balance equations for all the
states in terms of the unknown Pn probabilities, ▪ Given that the process is in state 1, the mean rate of
o we can solve this system of equations (plus an entering state 0 is µ1.
equation that sum of probabilities is 1) to find Pn.
9 10

Generalized Poisson Queuing Model Generalized Poisson Queuing Model

▪ For every other state there are two possible transitions


both into and out of the state.
▪ Therefore, each side of the balance equations for these
states represents the sum of the mean rates for the two
transitions involved.
▪ (In other words, for each cumulative unit of time that the
process spends in state 1, the expected number of times ▪ Otherwise, the reasoning is just the same as for state 0.
that it would leave state 1 to enter state 0 is µ1.) ▪ These balance equations are summarized in Table 1.
▪ From any other state, this mean rate is 0.
▪ Therefore, the overall mean entering rate to state 0 is µ1P1.
▪ By the same reasoning, the mean leaving rate to state 0 is
0P0.
▪ Hence the balance equation for state 0 is
µ1P1 = 0P0 11 12

CSM (CS-438) 3
Generalized Poisson Queuing Model Generalized Poisson Queuing Model
▪ Applying this procedure yields the following results:-
▪ Notice that
o the first balance equation contains two variables (P0 and P1),
o the first two equations contain 3 variables, and so on,
o so that there always is one “extra” variable.
▪ Therefore, the procedure is to solve these equations in terms of
one of the variables, the most convenient one being P0.
▪ At the end, the requirement that the sum of all the probabilities
equal 1 can be used to evaluate P0.
Table 1: Balance equations for the birth-and-death process

13 14

Generalized Poisson Queuing Model Generalized Poisson Queuing Model


▪ To simplify notation, let ▪ When a queuing model is based on the birth-and-death
process,
o so the state of the system n represents the number of
▪ and then define Cn = 1 for n = 0. Thus, the steady-state jobs in the queuing system,
probabilities are o the key measures of performance for the queuing
Pn = CnP0, for n = 0, 1, 2, … system (L, Lq, W, and Wq) can be obtained immediately
▪ The requirement that after calculating the Pn.
▪ The definitions of L and Lq specify that
▪ implies that

▪ so that ▪ Furthermore, the relationships yield

15 16

CSM (CS-438) 4
Generalized Poisson Queuing Model Generalized Poisson Queuing Model
▪ Where  is the average arrival rate over the long run. PROBLEM
▪ A medium-sized university library provides a search
facility for its students and faculty through a single-server
database system. The read-only transactions arrive in the
▪ Several of the expressions just given involve
system according to a Poisson distribution at the mean
summations with an infinite number of terms.
rate of 15 per minute whereas the completion time is
▪ Fortunately, these summations have analytic solutions exponential with mean value 0.05 minute. The maximum
for a number of interesting special cases, as seen later. length of queue is 3 beyond which no more transactions
▪ Otherwise, they can be approximated by summing a are accepted.
finite number of terms on a computer.
1. Determine the steady-state probability pn of n
▪ These steady-state results have been derived under the transactions in the system.
assumption that n and µn have values such that the
process actually can reach a steady-state condition. 2. Also evaluate the key measures of performance for
▪ It also always holds when  and µ are defined and  = the queuing system.
18
/(sµ) < 1. 17

Kendall notation Kendall notation


Lecture 29 ▪ The service discipline (Z) for ordering jobs in the queue
▪ A notation for the parameters of a queuing o FIFO, LIFO, priority ordered, random ordered, and
system due for the most part to Kendall (1953) others.
illustrated below. ▪ The notation M/D/2///FCFS indicates a queuing
process
o with exponential interarrival times, deterministic
service times,
o two parallel servers, no restriction on the maximum
jobs allowed in the system and FCFS queue
discipline.
▪ In many situation, only the first three symbols are
used.

19 20

CSM (CS-438) 5
Kendall notation The M/M/s Model
▪ Thus, M/D/2 would be a queuing system with ▪ Assumes that
o exponential input, o all inter-arrival times are independently and identically
o deterministic service, distributed according to an exponential distribution
(i.e., the input process is Poisson),
o two servers,
o that all service times are independent and identically
o no limit on system capacity distributed according to another exponential
o no limit on calling population and distribution, and
o that the number of servers is s (any positive integer).
o FIFO discipline.
▪ Consequently, this model is just the special case of the
Problem
birth-and-death process where
In an M/M/5 system, jobs arrive at the rate of 24 o the queuing system’s mean arrival rate and mean service
jobs/sec. Calculate the service rate (jobs/sec) rate per busy server are constant ( and µ, respectively)
beyond which the system would remain stable. regardless of the state of the system.
21 22

The M/M/s Model


The M/M/1 Model
▪ When the system has just a single server (s = 1), ▪ However, when the system has multiple servers (s > 1),
then according to property 4 of exponential distribution,
o the parameters for the birth-and-death process are
o when the mean service rate per busy server is µ,
o n =  (n = 0, 1, 2, …) and
o and there are n jobs currently in the system
o µn = µ (n = 1, 2, …).
o the overall mean service rate for n busy servers = nµ.
▪ The resulting rate diagram is shown in Fig. 2.
▪ Therefore,
o µn = nµ when n ≤ s,
o whereas µn = sµ when n ≥ s so all s servers are busy.
▪ When the maximum mean service rate sµ exceeds the
mean arrival rate , that is, when

Fig 2: Rate diagram for the M/M/1 model


▪ a queuing system fitting this model will eventually reach
a steady-state condition.
23 24

CSM (CS-438) 6
The M/M/s Model Results for the Single-Server Case (M/M/1)
▪ For s = 1, the Cn factors for the birth-and-death process
▪ The rate diagram for this case is shown in Fig. 3. reduce to

Fig 3: Rate diagram for the M/M/s model

▪ In this situation, the steady-state results derived earlier


for the general B&D process are directly applicable.
▪ However, these results simplify considerably for this
model and yield closed-form expressions for Pn, L, Lq,
and so forth, as shown next.

25 26

Results for M/M/1 model Results for M/M/1 model

▪ Now find W using little’s formula

27 ▪ Next find Wq using little’s formula 28

CSM (CS-438) 7
Results for M/M/1 model The M/M/1 Model
▪ When  ≥ µ, so that the mean arrival rate exceeds the
mean service rate, the preceding solution “blows up” ▪ Even when  = µ,
(because the summation for computing P0 diverges). o the expected number of customers in the queuing
▪ For this case, the queue would “explode” and grow system slowly grows without bound over time
without bound. because,
▪ If the queuing system begins operation with no o even though a temporary return to no customers
customers present, present always is possible,
o the server might succeed in keeping up with o the probabilities of huge numbers of customers
arriving customers over a short period of time, present become increasingly significant over time.
o but this is impossible in the long run.

29 30

Queuing Models Involving Nonexponential Distributions


The M/M/1 Model
Lecture 30
PROBLEM
▪ The assumption of exponential inter-arrival times,
In the head office of a leading commercial bank, there is a o a reasonable approximation in many situations
single printer for a fairly large number of continually o but not when arrivals are carefully regulated.
arriving print jobs. The system manager has concluded that
print jobs arrive pretty much at random according to Poisson ▪ Furthermore, the service-time distribution frequently
process. He also has resolved that the time spent in printing a deviates greatly from exponential form, particularly when
document follows an exponential distribution. the service requirements of the jobs are quite similar.
By projecting the available data for several months, jobs are ▪ Therefore, it is important to have other queuing models
estimated to arrive at an average rate of 2 every 30 seconds. that use alternative distributions.
The printer takes an average of 12 seconds to print each job.
▪ Unfortunately, the mathematical analysis of queuing
a. Would the system attain steady-state? Comment
properly.
models with non-exponential distributions is much more
difficult.
b. Find the probability that printer will be idle.
c. If reply of part (a) is positive, figure out the steady-state ▪ However, it has been possible to obtain some useful
results using appropriate queuing model. 31 results for a few such models.
32

CSM (CS-438) 8
Queuing Models Involving Nonexponential Distributions Queuing Models Involving Nonexponential Distributions

The M/G/1 Model ▪ Any such queuing system can eventually reach a steady-
state condition if  = / < 1.
Assumptions
▪ The readily available steady-state results for this general
1. The queuing system has a single server and
model are the following:-
2. A Poisson input process (exponential inter-arrival times)
with a fixed mean arrival rate .
3. The jobs have independent service times with the same
probability distribution.
o However, no restrictions are imposed on what this
service-time distribution can be.
▪ In fact, it is only necessary to know (or estimate) the
mean 1/ and variance σ2 of this distribution.
▪ The model does not provide a closed-form expression
for pn because of analytic intractability.
33 34

Models Involving Nonexponential Distributions Models Involving Nonexponential Distributions


▪ Considering the complexity involved in analyzing a model ▪ For any fixed expected service time 1/, notice that Lq, L,
that permits any service-time distribution, it is remarkable Wq, and W all increase as σ2 is increased.
that such a simple formula is obtained for Lq.
▪ This formula is one of the most important results in queuing
theory because of
o its ease of use and
▪ This result indicates that
o the prevalence of M/G/1 queuing systems in practice.
o the consistency of the server has a major bearing on
▪ This equation for Lq (or its counterpart for Wq) the performance of the service facility—
o commonly referred to as Pollaczek-Khintchine formula, o not just the server’s average speed.
o named after two pioneers in development of queuing theory ▪ When the service-time distribution is exponential, σ2 =
o who derived the formula independently in the early 1930s. 1/2, and the preceding results will reduce to the the
M/M/1 model.
35 36

CSM (CS-438) 9
Uniform Distribution PROBLEM
▪ X is a uniform random variable if the PDF of X is Requests for a page at a web server arrive
1
𝑎 ≤𝑥 <𝑏 randomly according to Poisson distribution with
𝑓𝑋 𝑥 = ቐ(𝑏 − 𝑎)
25 requests per second. The time taken by the
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
server machine to fulfill a request is in between 20
where the two parameters are b > a.
and 50 msecs, uniformly distributed.
Theorem
▪ If X is a uniform random variable with parameters a and b > a.
a) Determine the percentage of time that the web
▪ The CDF of X is
server will be idle?
0 𝑥 ≤𝑎 b) Determine the average backlog for the server.
(𝑥 − 𝑎) c) The average time until a request is fulfilled.
𝐹𝑋 𝑥 = 𝑎<𝑥 ≤𝑏
(𝑏 − 𝑎)
1 𝑥>𝑏
▪ The expected value of X is E[X] = (b+a)/2
▪ The variance of X is Var[X] = (b – a)2/12 37 38

CSM (CS-438) 10

You might also like