Compute utilization, response time, average number of requests and throughput for a M/M/1 queue.
INPUTS
lambda
Arrival rate (lambda ≥ 0
).
mu
Service rate (mu > lambda
).
k
Number of requests in the system (k ≥ 0
).
OUTPUTS
U
Server utilization
R
Server response time
Q
Average number of requests in the system
X
Server throughput. If the system is ergodic (mu >
lambda
), we always have X = lambda
p0
Steady-state probability that there are no requests in the system.
pk
Steady-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