Compute utilization, response time, average number of requests and throughput for a M/M/1 queue.
INPUTS
lambdaArrival rate (lambda ≥ 0).
muService rate (mu > lambda).
kNumber of requests in the system (k ≥ 0).
OUTPUTS
UServer utilization
RServer response time
QAverage number of requests in the system
XServer throughput. If the system is ergodic (mu >
lambda), we always have X = lambda
p0Steady-state probability that there are no requests in the system.
pkSteady-state probability that there are k requests in the system. (including the one being served).
If this function is called with less than three input parameters, lambda and mu can be vectors of the same size. In this case, the results will be vectors as well.
REFERENCES
See also: qsmmm, qsmminf, qsmmmk.
The following code
## Given a M/M/1 queue, compute the steady-state probability pk
## of having k requests in the systen.
lambda = 0.2;
mu = 0.25;
k = 0:10;
pk = qsmm1(lambda, mu, k);
plot(k, pk, "-o", "linewidth", 2);
xlabel("N. of requests (k)");
ylabel("p_k");
title(sprintf("M/M/1 system, \\lambda = %g, \\mu = %g", lambda, mu));
Produces the following figure
| Figure 1 |
|---|
![]() |
Package: queueing