CS457 - System Performance Evaluation - Winter 2010


Public Service Announcement

  1. pdf available

Lecture 29 - Examples of Birth & Death Processes

Birth & Death Processes

Derivation

Basic Result

dp_j(t) / dt = \lambda_j-1 p_j-1(t) + \mu_j+1 p_j+1(t) - (\lambda_j + \mu_j) p_j(t)

Steady State Solutions

Reminder. Transient and steady states are different. We are interest in the steady state. The steady state is defined as having stationary (not time-dependent) probabilities.

That is: dp_j(t) / dt = 0.

Then

Solve this iteratively

  1. l0 p0 = m1 p1 => p1 = (l0/m1) p0
  2. (l1 + m1) p1 = l0 p0 + m2 p2 => (l1 + m1) (l0/m1) p0 = l0 p0 + m2 p2 => p2 = p0 (l1*l0 / m1*m0)
  3. ...
  4. pn = p0 (l_n-1*...*l1*l0 / m_n-1 *...*m1*m0)
  5. Set p0 by the condition sum_n pn = 1.

This looks like you could solve it further, but you can't. How could you possibly solve the differential equation above, in that case?

What do we do? Try simplified examples.


The Simplest Example M/M/1

First M: Markovian (Exponential) birth (interarrival) times

Second M: Markovian (Exponential) life/death (service) times

1: one server

Assumptions:

  1. \lambda_j = \lambda
  2. \mu_j = \mu
  3. Define r = \lambda / \mu

Then

  1. pn = r^n p0
  2. p0 = 1 / (1 + r + r^2 + ...) = 1 - r.
  3. pn = (1 - r) * r^n.

Useful tricks.

  1. S = 1 + r + r^2 + r^3 + ... = 1 + r * ( 1 + r + r^2 + r^3 + ... ) = 1 + r * S
    Therefore, S * (1-r) = 1and S = 1 / (1 - r)
  2. dS/dr = 1 + 2r + 3r^2 + 4r^3 + ... = (1 + r + r^2 + ...) + ( r + 2r^2 + 3r^3 +... ) = S + r ( 1 + 2r + 3r^2 + ... ) = S + r dS/dr

    Therefore, dS/dr = S + r dS/dr and dS/dr = S / (1 - r) = 1 / (1 - r)^2

    But E(N) = sum_n n*p_n = (1 - r) (r + 2 r^2 + 3 r^3 + ... ) = (1 - r ) (dS/dr - S) = (1 - r ) (1 / (1 - r)^2 - 1 / (1 - r) ) = 1 / (1 - r) - 1 = r / (1 - r)

Results

The mean number of jobs in the system is E[N] = sum_n n * (1 - r ) * r^n = r / (1 - r)

Little's law

Mean waiting time E[W]

  1. Mean service time is 1/\mu
  2. Mean waiting time is E[W] = E[R] - 1/\mu = r / ( \mu (1-r) ) = r / (\mu - \lambda)
  3. Mean waiting time goes to infinity as \lambda -> \mu from below. Why?

Mean number of jobs in the queue E[Nq]

  1. Little's law applied to the queue: \lambda*E[w] = E[Eq]
  2. E[nq] = r^2 / (1-r)

Utilization

U = 1 - p0 = 1 - (1-r) = r = \lambda / \mu

Note that you can only get utilization at 1 by having the response time go to infinity. Why?


Example 2: Finite Queue

Let the maximum size of the queue be m.

Birth and Death Coefficients
Number of requests in the system, j 0 1 2 ... m-1 m
Probability of a birth, \lambda_j \lambda \lambda \lambda ... \lambda 0
Probability of a death, \mu_j 0 \mu \mu ... \mu \mu

Incremental solution

What's the story

Results

Number of Requests

Response Time

Utilization


Example 3: Two Servers versus One Server Twice as Powerful

One Server Twice as Powerful

Service rate and time:

Number of requests

Response Time

Utilization

Two Servers with One Queue

Birth & Death Coefficients
Number of requests in the system, j 0 1 2 3 ...
Probability of a birth, \lambda_j \lambda \lambda \lambda \lambda ...
Probability of a death, \mu_j 0 \mu 2 \mu 2 \mu ...

Incremental Solution

Now normalize,

Thus, p_n = (2-r) r^n / (2+r)

Results

The mean number of jobs in the system is

Little's law

Utilization


Return to: