Class ClusterExamples

java.lang.Object
jline.examples.java.basic.ClusterExamples

public class ClusterExamples extends Object
Demonstrates cluster modelling APIs:
  • The static factories Network.cluster*
  • The Cluster builder with comparison and sweep helpers
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    `cl_compare.m`: compare RAND against RROBIN dispatching on one cluster.
    static void
    Compares scheduling disciplines on one cluster, the reference's cl_scheduling.
    static void
    Sweeps the number of parallel servers, the reference's cl_stations.
    static void
    `cl_sweep.m`: arrival-rate sweep on a 2-PS cluster.
    static void
    `dispatch_mixed.m`: a mixed cluster built through the Cluster builder.
    static void
    Solves a four-PS-server open cluster with random dispatching.
    static void
    Three FCFS servers with non-uniform service rates dispatched JSQ.
    static void
    Closed-network variant: 8 jobs cycling between Think and 3 PS servers.
    static void
    Two-class open cluster (interactive + batch) on two PS servers.
    static void
    Mixed variant: an open class and a closed class share the same two servers.
    static void
    main(String[] args)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClusterExamples

      public ClusterExamples()
  • Method Details

    • ex1_basic

      public static void ex1_basic()
      Solves a four-PS-server open cluster with random dispatching.
    • cl_compare

      public static void cl_compare()
      `cl_compare.m`: compare RAND against RROBIN dispatching on one cluster.

      MVA handles RAND routing only, since that is the one dispatching rule leaving the network in product form. A non-product-form policy needs a discrete-event simulator, and a low sample budget keeps the comparison quick.

    • ex3_heterogeneous

      public static void ex3_heterogeneous()
      Three FCFS servers with non-uniform service rates dispatched JSQ.
    • ex4_closed

      public static void ex4_closed()
      Closed-network variant: 8 jobs cycling between Think and 3 PS servers.
    • ex5_multiclass

      public static void ex5_multiclass()
      Two-class open cluster (interactive + batch) on two PS servers.
    • ex7_mixed

      public static void ex7_mixed()
      Mixed variant: an open class and a closed class share the same two servers.
    • cl_sweep

      public static void cl_sweep()
      `cl_sweep.m`: arrival-rate sweep on a 2-PS cluster.

      Shows the response time growing as lambda approaches saturation.

    • dispatch_mixed

      public static void dispatch_mixed()
      `dispatch_mixed.m`: a mixed cluster built through the Cluster builder.

      Two PS server stations shared by one open class (lambda = 0.5) and one closed class (N = 3 jobs, think time Z = 1.0), with mu = 2.0 for the open class and mu = 1.5 for the closed one, dispatched at random. Solved by MVA and re-solved by simulation with LDES for cross-validation.

    • cl_stations

      public static void cl_stations()
      Sweeps the number of parallel servers, the reference's cl_stations. The cluster is declared at one station and 1.6 arrivals against a service rate of 1.0 -- unstable as declared, which is the point: the sweep is over the server count that makes it stable, and utilization falls as 1/m while the response time collapses once m passes the offered load.
    • cl_scheduling

      public static void cl_scheduling()
      Compares scheduling disciplines on one cluster, the reference's cl_scheduling. Service is hyperexponential (SCV 4), which is where the disciplines part company: PS is insensitive to the service distribution beyond its mean, FCFS is not, so the queue lengths differ even though the load does not. The simulator is used rather than MVA because FCFS with non-exponential service is outside the product-form assumptions.
    • main

      public static void main(String[] args)