1%{ @file fj_synch_delay.m
2 % @brief Synchronization delay S_2(rho)
for two-way Fork-Join
4 % @author LINE Development Team
8 % @brief Synchronization delay S_2(rho)
for two-way Fork-Join
11 % Computes the mean synchronization delay
for a 2-way Fork-Join
12 % queueing system. This
is the average time tasks spend waiting
13 % at synchronization queues
for their siblings to complete.
15 % S_2(rho) = (1/2) * (1 - rho/4) * R(rho)
17 % The F/J response time decomposes as:
18 % R_2^{F/J}(rho) = R(rho) + S_2(rho)
20 % where R(rho)
is the delay at the server (M/M/1 response time).
24 % S = fj_synch_delay(lambda, mu)
29 % <tr><th>Name<th>Description
30 % <tr><td>lambda<td>Arrival rate
31 % <tr><td>mu<td>Service rate (mu > lambda
for stability)
36 % <tr><th>Name<th>Description
37 % <tr><td>S<td>Mean synchronization delay S_2(rho)
41 % A. Thomasian,
"Analysis of Fork/Join and Related Queueing Systems",
42 % ACM Computing Surveys, Vol. 47, No. 2, Article 17, July 2014.
43 % Eq. (8) on page 17:11.
45function S = fj_synch_delay(lambda, mu)
51 line_error(mfilename,
'System is unstable: rho = lambda/mu = %.4f >= 1. Require lambda < mu.', rho);
54% Compute M/M/1 mean response time
55R_rho = qsys_mm1(lambda, mu);
57% Synchronization delay (Eq. 8): S_2(rho) = (1/2) * (1 - rho/4) * R(rho)
58S = 0.5 * (1 - rho / 4) * R_rho;