Enum SchedStrategy

java.lang.Object
java.lang.Enum<SchedStrategy>
jline.lang.constant.SchedStrategy
All Implemented Interfaces:
Serializable, Comparable<SchedStrategy>, java.lang.constant.Constable

public enum SchedStrategy extends Enum<SchedStrategy>
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 Constants
    Enum Constant
    Description
    Discriminatory Processor Sharing - jobs receive weighted shares based on class
    Discriminatory PS with Priorities - DPS within priority levels
    Earliest 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 sources
    Feedback / Least Attained Service - priority based on attained service (age)
    First Come First Serve - jobs served in order of arrival
    First Come First Serve Preemptive Independent - higher priority job preempts, preempted job restarts
    First Come First Served Preemptive Independent with Priority - FCFSPI with priority classes
    First Come First Serve Preemptive Resume - higher priority job preempts, preempted job resumes
    First Come First Served with Priority - alias for HOL
    First Come First Served Preemptive Resume with Priority - FCFSPR with priority classes
    Fork node - jobs are split into parallel tasks
    Generalized Processor Sharing - minimum service guarantee with work-conserving
    Generalized PS with Priorities - GPS within priority levels
    Head Of Line priority (FCFS with priorities) - highest priority class served first
    Infinite 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 beginning
    Last Come First Served Preemptive Independent with Priority - LCFSPI with priority classes
    Last Come First Serve Preemptive Resume - arriving job preempts current service
    Last Come First Served with Priority - LCFS with priority classes
    Last Come First Served Preemptive Resume with Priority - LCFSPR with priority classes
    Longest Expected Processing Time - based on expected remaining service time
    Longest Job First - jobs with largest service requirement served first
    Least Progress Scheduling - hybrid PS/FCFS with max concurrent jobs limit
    Longest Remaining Processing Time - priority to jobs with longest remaining time
    Polling - server visits queues in cyclic order
    Processor Sharing - all jobs receive equal share of service capacity
    Preemptive Shortest Job First - priority based on original job size (not remaining)
    Processor Sharing with Priorities - PS within priority levels
    Reference station - used for closed classes
    Shortest Expected Processing Time - based on expected remaining service time
    Shortest Elapsed Time First - non-preemptive FB/LAS (priority by attained service, no preemption)
    Service In Random Order - jobs selected randomly from queue
    Shortest Job First - jobs with smallest service requirement served first
    Shortest Remaining Processing Time - preemptive scheduling based on remaining service time
    Shortest Remaining Processing Time with Priority - SRPT within priority levels
  • Method Summary

    Modifier and Type
    Method
    Description
    fromText(String string)
    Converts a LINE string representation to a SchedStrategy enum value.
    static String
    Converts a SchedStrategy enum value to a feature string for analysis.
    static String
    toText(SchedStrategy scheduling)
    Converts a SchedStrategy enum value to its text representation.
    Returns the enum constant of this type with the specified name.
    static SchedStrategy[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • INF

      public static final SchedStrategy INF
      Infinite Server - each job gets its own server immediately (delay station)
    • FCFS

      public static final SchedStrategy FCFS
      First Come First Serve - jobs served in order of arrival
    • FCFSPR

      public static final SchedStrategy FCFSPR
      First Come First Serve Preemptive Resume - higher priority job preempts, preempted job resumes
    • FCFSPI

      public static final SchedStrategy FCFSPI
      First Come First Serve Preemptive Independent - higher priority job preempts, preempted job restarts
    • LCFS

      public static final SchedStrategy LCFS
      Last Come First Serve - most recent arrival served first (non-preemptive)
    • LCFSPR

      public static final SchedStrategy LCFSPR
      Last Come First Serve Preemptive Resume - arriving job preempts current service
    • LCFSPI

      public static final SchedStrategy LCFSPI
      Last Come First Serve Preemptive Independent - arriving job preempts and service restarts from beginning
    • SIRO

      public static final SchedStrategy SIRO
      Service In Random Order - jobs selected randomly from queue
    • SJF

      public static final SchedStrategy SJF
      Shortest Job First - jobs with smallest service requirement served first
    • LJF

      public static final SchedStrategy LJF
      Longest Job First - jobs with largest service requirement served first
    • PS

      public static final SchedStrategy PS
      Processor Sharing - all jobs receive equal share of service capacity
    • DPS

      public static final SchedStrategy DPS
      Discriminatory Processor Sharing - jobs receive weighted shares based on class
    • GPS

      public static final SchedStrategy GPS
      Generalized Processor Sharing - minimum service guarantee with work-conserving
    • SEPT

      public static final SchedStrategy SEPT
      Shortest Expected Processing Time - based on expected remaining service time
    • LEPT

      public static final SchedStrategy LEPT
      Longest Expected Processing Time - based on expected remaining service time
    • SRPT

      public static final SchedStrategy SRPT
      Shortest Remaining Processing Time - preemptive scheduling based on remaining service time
    • SRPTPRIO

      public static final SchedStrategy SRPTPRIO
      Shortest Remaining Processing Time with Priority - SRPT within priority levels
    • HOL

      public static final SchedStrategy HOL
      Head Of Line priority (FCFS with priorities) - highest priority class served first
    • FCFSPRIO

      public static final SchedStrategy FCFSPRIO
      First Come First Served with Priority - alias for HOL
    • FORK

      public static final SchedStrategy FORK
      Fork node - jobs are split into parallel tasks
    • EXT

      public static final SchedStrategy EXT
      External routing - used for open classes at sources
    • REF

      public static final SchedStrategy REF
      Reference station - used for closed classes
    • POLLING

      public static final SchedStrategy POLLING
      Polling - server visits queues in cyclic order
    • PSPRIO

      public static final SchedStrategy PSPRIO
      Processor Sharing with Priorities - PS within priority levels
    • DPSPRIO

      public static final SchedStrategy DPSPRIO
      Discriminatory PS with Priorities - DPS within priority levels
    • GPSPRIO

      public static final SchedStrategy GPSPRIO
      Generalized PS with Priorities - GPS within priority levels
    • LCFSPRIO

      public static final SchedStrategy LCFSPRIO
      Last Come First Served with Priority - LCFS with priority classes
    • LCFSPRPRIO

      public static final SchedStrategy LCFSPRPRIO
      Last Come First Served Preemptive Resume with Priority - LCFSPR with priority classes
    • LCFSPIPRIO

      public static final SchedStrategy LCFSPIPRIO
      Last Come First Served Preemptive Independent with Priority - LCFSPI with priority classes
    • FCFSPRPRIO

      public static final SchedStrategy FCFSPRPRIO
      First Come First Served Preemptive Resume with Priority - FCFSPR with priority classes
    • FCFSPIPRIO

      public static final SchedStrategy FCFSPIPRIO
      First Come First Served Preemptive Independent with Priority - FCFSPI with priority classes
    • EDD

      public static final SchedStrategy EDD
      Earliest Due Date - jobs with earliest deadline served first (non-preemptive)
    • EDF

      public static final SchedStrategy EDF
      Earliest Deadline First - jobs with earliest deadline served first (preemptive)
    • LPS

      public static final SchedStrategy LPS
      Least Progress Scheduling - hybrid PS/FCFS with max concurrent jobs limit
    • PSJF

      public static final SchedStrategy PSJF
      Preemptive Shortest Job First - priority based on original job size (not remaining)
    • FB

      public static final SchedStrategy FB
      Feedback / Least Attained Service - priority based on attained service (age)
    • LRPT

      public static final SchedStrategy LRPT
      Longest Remaining Processing Time - priority to jobs with longest remaining time
    • SETF

      public static final SchedStrategy SETF
      Shortest Elapsed Time First - non-preemptive FB/LAS (priority by attained service, no preemption)
  • Method Details

    • values

      public static SchedStrategy[] 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

      public static SchedStrategy valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromText

      public static SchedStrategy fromText(String string)
      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

      public static String toFeature(SchedStrategy scheduling)
      Converts a SchedStrategy enum value to a feature string for analysis.
      Parameters:
      scheduling - the scheduling strategy to convert
      Returns:
      the feature string representation
    • toText

      public static String toText(SchedStrategy scheduling)
      Converts a SchedStrategy enum value to its text representation.
      Parameters:
      scheduling - the scheduling strategy to convert
      Returns:
      the text representation of the strategy