CS457 - System Performance Evaluation - Winter 2010


Public Service Announcements

  1. The weeks ahead

Lecture 27 - Assignment 3, Birth & Death Processes

Assignment 3 - Simple Model of a Mobile Telephone

Only two services

  1. Speak and be heard on another telephone.
  2. Run an application

There is only one other function at this level of abstraction

The Abstraction

Four processors

  1. A Codec (coder/decoder) that creates
  2. A GPU that creates
  3. A CPU that does general purpose computing including
  4. A user who

Service implementation

Speaking

  1. The user decides to make a phone call, and
  2. The arrival, connexion request (1) enqueues the request at the CPU,
  3. The departure event (2) enqueues the request at the user who
  4. The departure event (3) enqueues the request at the codec who
  5. The departure event (4) transmits the digitized block of sound from the user
  6. The arrival event (3)enqueues the request at the CPU
  7. Continue from (3) until eventually the arrival teardown event occurs,

Running an application

  1. The user decides to run an application, and
  2. The arrival, next request (1) enqueues the request at the CPU,
  3. The departure event (2) enqueues the request at either the codec or the GPU who
  4. The departure event (3) enqueues the request at the user who
  5. The departure event (4) enqueues the request at the CPU, who
  6. The arrival event (2)
  7. Continue from (3) until eventually the arrival stop event occurs,

Comments

  1. The phone call and the application circulate different ways in the system
  2. There can be only one application request at a time.
  3. There can be more than one connexion request at a time
  4. Serial numbers are essential for data analysis
  5. Times of events that begin and end applications and phone calls should be exponentially generated, not necessarily with the same average arrival rate
  6. Times of most departure events should be generated from normal distributions, the mean of which is the average service time for that event type and processor
  7. It is easier to discard data from a too-extensive log than it is to create data from a too-skimpy one.
  8. Start with two events in the event queue. What should they be?
  9. Make certain that the number of requests in each server is consistently defined
  10. The pattern

    is commonly encountered in interactive systems. This is easier if we conceive of the user as having a ghost, who initiates, while the user continues.


Birth & Death Processes

The example above is a Birth-death process. Why?

A special process where only transitions to neighbouring states are possible That is, if we are in S(j) then the next state can be

  1. S(j-1), a death occurs.

    Death rate \mu_j.

  2. S(j+1), a birth occurs

    Birth rate \lambda_j.

  3. S(j), neither a birth nor a death occurs, or both a birth and death occur.

We now want to examine what happens, in a birth-death process, in the short time between t and t + \Delta t. Use the Poisson distribution.

  1. Poission Distribution
  2. Since dt is very small terms in dt^2 are inconsequential compared to terms in dt
  3. We get exactly the same thing for deaths, with \mu in place of \lambda
  4. What about births and deaths together

Exercise for the reader. Explain the equivalence of the above to only Arrival and Departure events affecting the system state.

Remember. The state is the population N(t), having the value j. The state j occurs with probability P( N(t) = j ) which we define as p_j(t).

Then

This equation looks as though we can solve it, and indeed we can!

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)

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

Little's law


Return to: