1%{ @file fj_respt_2way.m
2 % @brief Exact two-way Fork-Join response time R_2^{F/J}(rho)
4 % @author LINE Development Team
8 % @brief Exact two-way Fork-Join response time R_2^{F/J}(rho)
11 % Computes the exact mean response time
for a 2-way (K=2) Fork-Join
12 % queueing system with Poisson arrivals and exponential service times.
13 % This
is derived from the analysis in Flatto and Hahn [1984].
15 % R_2^{F/J}(rho) = (H_2 - rho/8) * R(rho) = (12 - rho)/8 * R(rho)
17 % where H_2 = 1.5 and R(rho) = (mu - lambda)^{-1}
is the M/M/1 mean
20 % Note that R_2^{F/J}(rho) < R_2^max(rho), with the difference being
25 % R = fj_respt_2way(lambda, mu)
30 % <tr><th>Name<th>Description
31 % <tr><td>lambda<td>Arrival rate
32 % <tr><td>mu<td>Service rate (mu > lambda
for stability)
37 % <tr><th>Name<th>Description
38 % <tr><td>R<td>Exact 2-way F/J response time R_2^{F/J}(rho)
42 % A. Thomasian,
"Analysis of Fork/Join and Related Queueing Systems",
43 % ACM Computing Surveys, Vol. 47, No. 2, Article 17, July 2014.
44 % Eq. (6) on page 17:10.
46 % Original derivation: L. Flatto and S. Hahn,
"Two Parallel Queues Created
47 % by Arrivals with Two Demands I", SIAM J. Appl. Math., 44(5), 1984.
49function R = fj_respt_2way(lambda, mu)
55 line_error(mfilename,
'System is unstable: rho = lambda/mu = %.4f >= 1. Require lambda < mu.', rho);
58% Compute M/M/1 mean response time
59R_rho = qsys_mm1(lambda, mu);
61% Exact 2-way F/J response time: R_2^{F/J}(rho) = (H_2 - rho/8) * R(rho)
63% (H_2 - rho/8) = (1.5 - rho/8) = (12 - rho)/8
64R = (12 - rho) / 8 * R_rho;