Professional Documents
Culture Documents
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.
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
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.
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
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
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
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
25 26
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
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
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