LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
fj_sm_tput.m
1%{ @file fj_sm_tput.m
2 % @brief Maximum throughput for Split-Merge queueing system
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Maximum throughput for Split-Merge queueing system
9 %
10 % @details
11 % Computes the maximum throughput for a K-way Split-Merge (SM) queueing
12 % system with exponential service times.
13 %
14 % In an SM system, all tasks of a request must complete before the next
15 % request can be issued. The maximum throughput is:
16 %
17 % lambda_K^SM = 1 / X_K^max = mu / H_K
18 %
19 % where X_K^max = H_K / mu is the expected maximum service time.
20 %
21 % For comparison, the maximum throughput of a K-way F/J system is
22 % lambda_K^FJ = mu, which exceeds lambda_K^SM by a factor H_K.
23 %
24 % @par Syntax:
25 % @code
26 % lambda_max = fj_sm_tput(K, mu)
27 % @endcode
28 %
29 % @par Parameters:
30 % <table>
31 % <tr><th>Name<th>Description
32 % <tr><td>K<td>Number of parallel servers (positive integer)
33 % <tr><td>mu<td>Service rate at each server
34 % </table>
35 %
36 % @par Returns:
37 % <table>
38 % <tr><th>Name<th>Description
39 % <tr><td>lambda_max<td>Maximum throughput lambda_K^SM = mu / H_K
40 % </table>
41 %
42 % @par Reference:
43 % A. Thomasian, "Analysis of Fork/Join and Related Queueing Systems",
44 % ACM Computing Surveys, Vol. 47, No. 2, Article 17, July 2014.
45 % Page 17:2.
46%}
47function lambda_max = fj_sm_tput(K, mu)
48
49if K < 1
50 line_error(mfilename, 'K must be a positive integer. Got K=%d.', K);
51end
52
53if mu <= 0
54 line_error(mfilename, 'Service rate mu must be positive. Got mu=%.4f.', mu);
55end
56
57% Compute harmonic number H_K
58H_K = fj_harmonic(K);
59
60% Maximum throughput: lambda_K^SM = mu / H_K = 1 / X_K^max
61lambda_max = mu / H_K;
62
63end