1function model = gallery_erlm1ps()
2% GALLERY_ERLM1PS Create an Erlang/M/1-PS queue model (Erlang arrivals, exponential service, processor sharing)
4% This model uses Erlang-distributed inter-arrival times with processor sharing
5% scheduling. Processor sharing means all jobs in the system share the server
6% capacity equally, which
is different from FCFS scheduling.
9% - Arrival process: Erlang with mean 1.0 and 5 phases (lower variance)
10% - Service process: Exponential with rate 2.0 (mean service time = 0.5)
11% - Traffic intensity: ρ = λ/μ = 1.0/2.0 = 0.5 (stable)
12% - Scheduling: Processor Sharing (PS)
15% model - Network object containing the configured Erlang/M/1-PS queue
18% model = gallery_erlm1ps();
21% avg_table = solver.getAvgTable()
24% - Processor sharing provides fairness among jobs
25% - All jobs receive service simultaneously with equal share
26% - Response time independent of service order
27% - Useful
for modeling time-shared computer systems
30% gallery_erlm1, gallery_mm1, gallery_mm1ps
32model = Network(
'Er/M/1-PS');
35source = Source(model,
'mySource');
36queue = Queue(model,
'myQueue', SchedStrategy.PS);
37sink = Sink(model,
'mySink');
40oclass = OpenClass(model,
'myClass');
41source.setArrival(oclass, Erlang.fitMeanAndOrder(1, 5));
42queue.setService(oclass, Exp(2));
45model.link(Network.serialRouting(source, queue, sink));