Package jline.lang.constant
Enum SchedStrategy
- All Implemented Interfaces:
Serializable,Comparable<SchedStrategy>,java.lang.constant.Constable
Enumeration of scheduling strategies available at queueing stations.
These constants specify how jobs are selected for service when multiple jobs are waiting at a station. Each strategy implements different prioritization and fairness policies.
Common strategies include:
- FCFS - First Come First Serve
- PS - Processor Sharing
- LCFS - Last Come First Serve
- SJF - Shortest Job First
- INF - Infinite servers (delay station)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDiscriminatory Processor Sharing - jobs receive weighted shares based on classDiscriminatory PS with Priorities - DPS within priority levelsEarliest Due Date - jobs with earliest deadline served first (non-preemptive)Earliest Deadline First - jobs with earliest deadline served first (preemptive)External routing - used for open classes at sourcesFeedback / Least Attained Service - priority based on attained service (age)First Come First Serve - jobs served in order of arrivalFirst Come First Serve Preemptive Independent - higher priority job preempts, preempted job restartsFirst Come First Served Preemptive Independent with Priority - FCFSPI with priority classesFirst Come First Serve Preemptive Resume - higher priority job preempts, preempted job resumesFirst Come First Served with Priority - alias for HOLFirst Come First Served Preemptive Resume with Priority - FCFSPR with priority classesFork node - jobs are split into parallel tasksGeneralized Processor Sharing - minimum service guarantee with work-conservingGeneralized PS with Priorities - GPS within priority levelsHead Of Line priority (FCFS with priorities) - highest priority class served firstInfinite Server - each job gets its own server immediately (delay station)Last Come First Serve - most recent arrival served first (non-preemptive)Last Come First Serve Preemptive Independent - arriving job preempts and service restarts from beginningLast Come First Served Preemptive Independent with Priority - LCFSPI with priority classesLast Come First Serve Preemptive Resume - arriving job preempts current serviceLast Come First Served with Priority - LCFS with priority classesLast Come First Served Preemptive Resume with Priority - LCFSPR with priority classesLongest Expected Processing Time - based on expected remaining service timeLongest Job First - jobs with largest service requirement served firstLeast Progress Scheduling - hybrid PS/FCFS with max concurrent jobs limitLongest Remaining Processing Time - priority to jobs with longest remaining timePolling - server visits queues in cyclic orderProcessor Sharing - all jobs receive equal share of service capacityPreemptive Shortest Job First - priority based on original job size (not remaining)Processor Sharing with Priorities - PS within priority levelsReference station - used for closed classesShortest Expected Processing Time - based on expected remaining service timeShortest Elapsed Time First - non-preemptive FB/LAS (priority by attained service, no preemption)Service In Random Order - jobs selected randomly from queueShortest Job First - jobs with smallest service requirement served firstShortest Remaining Processing Time - preemptive scheduling based on remaining service timeShortest Remaining Processing Time with Priority - SRPT within priority levels -
Method Summary
Modifier and TypeMethodDescriptionstatic SchedStrategyConverts a LINE string representation to a SchedStrategy enum value.static StringtoFeature(SchedStrategy scheduling) Converts a SchedStrategy enum value to a feature string for analysis.static StringtoText(SchedStrategy scheduling) Converts a SchedStrategy enum value to its text representation.static SchedStrategyReturns the enum constant of this type with the specified name.static SchedStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INF
Infinite Server - each job gets its own server immediately (delay station) -
FCFS
First Come First Serve - jobs served in order of arrival -
FCFSPR
First Come First Serve Preemptive Resume - higher priority job preempts, preempted job resumes -
FCFSPI
First Come First Serve Preemptive Independent - higher priority job preempts, preempted job restarts -
LCFS
Last Come First Serve - most recent arrival served first (non-preemptive) -
LCFSPR
Last Come First Serve Preemptive Resume - arriving job preempts current service -
LCFSPI
Last Come First Serve Preemptive Independent - arriving job preempts and service restarts from beginning -
SIRO
Service In Random Order - jobs selected randomly from queue -
SJF
Shortest Job First - jobs with smallest service requirement served first -
LJF
Longest Job First - jobs with largest service requirement served first -
PS
Processor Sharing - all jobs receive equal share of service capacity -
DPS
Discriminatory Processor Sharing - jobs receive weighted shares based on class -
GPS
Generalized Processor Sharing - minimum service guarantee with work-conserving -
SEPT
Shortest Expected Processing Time - based on expected remaining service time -
LEPT
Longest Expected Processing Time - based on expected remaining service time -
SRPT
Shortest Remaining Processing Time - preemptive scheduling based on remaining service time -
SRPTPRIO
Shortest Remaining Processing Time with Priority - SRPT within priority levels -
HOL
Head Of Line priority (FCFS with priorities) - highest priority class served first -
FCFSPRIO
First Come First Served with Priority - alias for HOL -
FORK
Fork node - jobs are split into parallel tasks -
EXT
External routing - used for open classes at sources -
REF
Reference station - used for closed classes -
POLLING
Polling - server visits queues in cyclic order -
PSPRIO
Processor Sharing with Priorities - PS within priority levels -
DPSPRIO
Discriminatory PS with Priorities - DPS within priority levels -
GPSPRIO
Generalized PS with Priorities - GPS within priority levels -
LCFSPRIO
Last Come First Served with Priority - LCFS with priority classes -
LCFSPRPRIO
Last Come First Served Preemptive Resume with Priority - LCFSPR with priority classes -
LCFSPIPRIO
Last Come First Served Preemptive Independent with Priority - LCFSPI with priority classes -
FCFSPRPRIO
First Come First Served Preemptive Resume with Priority - FCFSPR with priority classes -
FCFSPIPRIO
First Come First Served Preemptive Independent with Priority - FCFSPI with priority classes -
EDD
Earliest Due Date - jobs with earliest deadline served first (non-preemptive) -
EDF
Earliest Deadline First - jobs with earliest deadline served first (preemptive) -
LPS
Least Progress Scheduling - hybrid PS/FCFS with max concurrent jobs limit -
PSJF
Preemptive Shortest Job First - priority based on original job size (not remaining) -
FB
Feedback / Least Attained Service - priority based on attained service (age) -
LRPT
Longest Remaining Processing Time - priority to jobs with longest remaining time -
SETF
Shortest Elapsed Time First - non-preemptive FB/LAS (priority by attained service, no preemption)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromText
Converts a LINE string representation to a SchedStrategy enum value.- Parameters:
string- the string representation (e.g., "fcfs", "ps", "inf")- Returns:
- the corresponding SchedStrategy enum value
- Throws:
RuntimeException- if the string is not recognized
-
toFeature
Converts a SchedStrategy enum value to a feature string for analysis.- Parameters:
scheduling- the scheduling strategy to convert- Returns:
- the feature string representation
-
toText
Converts a SchedStrategy enum value to its text representation.- Parameters:
scheduling- the scheduling strategy to convert- Returns:
- the text representation of the strategy
-