2 % @brief Compute maximum response time R_K^max(rho)
for K M/M/1 queues
4 % @author LINE Development Team
8 % @brief Compute maximum response time R_K^max(rho)
for K M/M/1 queues
11 % Computes the expected value of the maximum of K response times from
12 % independent M/M/1 queues. This serves as an upper bound to the K-way
13 % Fork-Join response time R_K^{F/J}(rho).
15 % R_K^max(rho) = H_K * R(rho) = H_K / (mu - lambda)
17 % where H_K
is the K-th Harmonic number and R(rho)
is the M/M/1 mean
20 % This formula holds because
for M/M/1 queues, the response time
21 % distribution
is exponential with rate (mu - lambda), and the expected
22 % maximum of K i.i.d. exponential random variables with rate theta
is
27 % Rmax = fj_rmax(K, lambda, mu)
32 % <tr><th>Name<th>Description
33 % <tr><td>K<td>Number of parallel servers (positive integer)
34 % <tr><td>lambda<td>Arrival rate
35 % <tr><td>mu<td>Service rate (mu > lambda
for stability)
40 % <tr><th>Name<th>Description
41 % <tr><td>Rmax<td>Expected maximum response time R_K^max(rho) = H_K * R(rho)
45 % A. Thomasian,
"Analysis of Fork/Join and Related Queueing Systems",
46 % ACM Computing Surveys, Vol. 47, No. 2, Article 17, July 2014.
47 % Page 17:8, Eq. (1), and surrounding text.
49function Rmax = fj_rmax(K, lambda, mu)
52 line_error(mfilename,
'K must be a positive integer. Got K=%d.', K);
55% Compute harmonic number H_K
58% Compute M/M/1 mean response time
59R_rho = qsys_mm1(lambda, mu);
61% Maximum response time: R_K^max(rho) = H_K * R(rho)