kazcw / jerbs

Command-line work-stealing scheduler.
GNU General Public License v3.0
1 stars 0 forks source link

task orders #3

Open kazcw opened 3 years ago

kazcw commented 3 years ago

Task order complements priority with a relative prioritization based on task status.

/// How to apply ordering algorithm across priorities
enum OrderType {
    /// --group-order (default): Priority takes precedence; order breaks ties
    Group,
    /// --global-order: Order algorithm takes precedence; priority breaks ties
    Global,
}

/// Order to take tasks
enum Order {
    /// --round-robin-running (default):
    /// Select a task with the fewest outstanding jobs
    /// (taken AND (NOT finished) AND (NOT superceded))
    RoundRobinRunning,
    /// --round-robin-taken: Select a task with the fewest taken jobs
    RoundRobinTaken,
    /// --sequential-tasks: Exhaust one task before moving on to the next
    Sequential,
}

Although Order::RoundRobinRunning will eventually be the default, I have only implemented Order::Sequential at this point.