Class CyclicPollingExamples
-
- All Implemented Interfaces:
public class CyclicPollingExamples
Examples demonstrating cyclic polling systems. This class provides Java implementations corresponding to the Kotlin notebooks in jline.examples.kotlin.advanced.cyclicPolling package.
-
-
Constructor Summary
Constructors Constructor Description CyclicPollingExamples()
-
Method Summary
Modifier and Type Method Description static void
polling_exhaustive_det()
Demonstrates exhaustive polling with deterministic service times (polling_exhaustive_det.ipynb). static void
polling_exhaustive_exp()
Demonstrates exhaustive polling with exponential service times (polling_exhaustive_exp.ipynb). static void
polling_gated()
Demonstrates gated polling service discipline (polling_gated.ipynb). static void
polling_klimited()
Demonstrates k-limited polling service discipline (polling_klimited.ipynb). static void
main(Array<String> args)
Main method to run all cyclic polling examples. -
-
Method Detail
-
polling_exhaustive_det
static void polling_exhaustive_det()
Demonstrates exhaustive polling with deterministic service times (polling_exhaustive_det.ipynb). This example models a polling system where the server visits queues in cyclic order and serves all customers at a queue before moving to the next (exhaustive service). The service times are deterministic, allowing analysis of worst-case behaviors. Features: - Multiple queues with POLLING scheduling strategy - Exhaustive service discipline - Deterministic service time distributions - Cyclic server movement pattern
-
polling_exhaustive_exp
static void polling_exhaustive_exp()
Demonstrates exhaustive polling with exponential service times (polling_exhaustive_exp.ipynb). This example is similar to the deterministic case but uses exponential service times, which is more common in practice and allows for analytical approximations. The exhaustive service discipline ensures fairness by completely serving each queue. Features: - Multiple queues with POLLING scheduling strategy - Exhaustive service discipline - Exponential service time distributions - Analysis of mean waiting times and queue lengths
-
polling_gated
static void polling_gated()
Demonstrates gated polling service discipline (polling_gated.ipynb). In gated polling, the server only serves customers that were present when it arrived at the queue. New arrivals during service must wait for the next cycle. This provides better control over service times but may increase waiting times. Features: - Multiple queues with POLLING scheduling strategy - Gated service discipline - Comparison with exhaustive service - Analysis of cycle times and fairness
-
polling_klimited
static void polling_klimited()
Demonstrates k-limited polling service discipline (polling_klimited.ipynb). In k-limited polling, the server serves at most k customers at each queue before moving to the next. This provides a compromise between exhaustive and 1-limited (pure cyclic) service, balancing fairness and efficiency. Features: - Multiple queues with POLLING scheduling strategy - K-limited service discipline with configurable k - Analysis of the impact of k on performance - Trade-off between fairness and efficiency
-
-
-
-