CS457 - System Performance Evaluation - Winter 2008
Questions and Comments
Lecture 31
Analytic Queueing Theory - Examples
Text: Chapters 30--36.
Birth-death process
The Simplest Example M/M/1
Mean response time: E(r) = (1/\lambda) * E(n) = 1 / (\mu - \lambda) = 1 /
(\mu (1-r))
Another Example: M/M/2 & M/M/m
Mean response time: E[r] = (1/\lambda) E[n] = 1/ (\mu (1-r^2))
Compare this result to two independent servers each of which has reponse
time 1 / (\mu (1-r))
Example 3. M/M/1/B
B stands for finite buffer, and B is its size, which includes the job
being served.
- Maximum number of jobs in the system is B. Therefore stable.
- \lambda_j = \lambda when j < B & \lambda_j = 0 when j >=
B
- \mu_j = \mu
- pn = p0 r^n when n <= B; pn = 0 otherwise
- \sum pn = 1 = p0 sum^B r^n = (1 - r^(B+1)) / (1-r) when r != 1. When r
= 1, \sum pn = B+1.
Can talk about an effective rate.
How to do the sum:
- S(B) = sum_(n=0)^B r^n = sum_n^inf r^n - \sum_(n=B+1)^inf r^n
- S(B) = 1/(1-r) -r^(B+1) \sum_n r^n = (1-r^(B+1)) / (1-r)
Example 4. M/M/1/Infinity/N
- N stands for number of users.
- This is a closed model with a think time
- The first M is not exponential interarrival time, but exponential think
time.
What are \lambda_j and \mu_j?
- \lambda_j = (N-j) \lambda:
- Any user without a job in the system can submit one at any
moment.
- All users are the same.
\mu_j = \mu
- All jobs pass through the same server.
j 0 1 N-1 N
\lambda_j N\lambda (N-1)\lambda ... \lambda 0 ...
\mu_(j+1) \mu \mu \mu n/a
- p1 = N r p0
- p2 = N(N-1) r^2 p0
- ...
- pn = (N! / (N-n)!) r^n p0
We can write down a nice looking expression, but we cannot sum it.
- Write a few expression in terms of p0
- Remember E[r] = N/X - Z where Z = 1/\lambda and X = \mu(1-p0)
- E[r] = N / (\mu(1-p0) - 1/\lambda
- E[n] = \lambda E[r] = N r / (1-p0) - 1
Here is a very rough approximation to p0
- p0^(-1) = \sum^N N^n r^n = (1 - (Nr)^(N+1) ) / (1 - Nr)
- p0 = (1-Nr) / ( 1 - (Nr)^(N+1) )
- 1 - p0 = Nr ( 1 - (Nr)^N ) / ( 1 - (Nr)^(N+1) )
- E[n] = ( 1 - (Nr)^(N+1) ) / ( 1 - (Nr)^N ) - 1 = (Nr)^N
More General Markov Processes
Solution method
- Draw state transition diagram
- Obtain balance condition equations: rate in equals rate out
- Solve balance equations with normalizing equation
- Determine performance metrics from pn
Simple in principle. May be complex in practice.
Example 1. Single server with paired arrivals and finite buffer
Example 2. M/G/1
Return to: