Class Qsys_mm1_ps

java.lang.Object
jline.api.qsys.Qsys_mm1_ps

public class Qsys_mm1_ps extends Object
Exact sojourn-time moments of the multiclass M/M/1-PS queue.

Class j arrives in a Poisson stream of rate lambda[j] and requires an exponential amount of service with rate mu[j]. The processor is shared equally by all jobs in service, so the class of a job affects its sojourn time both through its own service rate and through the mix of rates of the jobs it shares the processor with. With alpha = 1 - sum_j lambda_j/mu_j the unutilized fraction of the processor, the moments of the sojourn time W_r of a tagged class-r job are

   E[W_r]   = 1/(alpha*mu_r)
   E[W_r^2] = 2/(alpha*mu_r)^2 * [1 - sum_j lambda_j (mu_j-mu_r)/(mu_j(mu_j+mu_r))]
                               / [1 - sum_j lambda_j/(mu_j+mu_r)]
 

which is equation (7) of Mitra and Morrison (1983). Both are exact, not asymptotic: the open system is the N -> infinity limit of the closed terminal-driven system whose moments that paper expands in 1/N, and the leading term of the expansion is exact in the limit. For a single class the second moment reduces to the classical 4/(mu^2 (1-rho)^2 (2-rho)) of Coffman, Muntz and Trotter (1970).

Reference: D. Mitra, J. A. Morrison, "Asymptotic Expansions of Moments of the Waiting Time in Closed and Open Processor-Sharing Systems with Multiple Job Classes", Adv. Appl. Prob. 15(4):813-839, 1983.

Port of MATLAB qsys_mm1_ps.m.

  • Method Details

    • qsys_mm1_ps

      public static QsysMm1PsResult qsys_mm1_ps(double[] lambda, double[] mu)
      Sojourn-time moments of the multiclass M/M/1-PS queue.
      Parameters:
      lambda - per-class Poisson arrival rates, non-negative
      mu - per-class exponential service rates, positive
      Returns:
      per-class mean and second moment of the sojourn time