Skip to content

Commit

Permalink
Add kill option for GFL scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratfink committed Feb 17, 2023
1 parent b2ddd1c commit 2884885
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/schedules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,19 @@ schedule_gedf(T::AbstractRealTimeTaskSystem, m::Int, time::Real; kill::Bool=fals
end

"""
schedule_gfl(T, m, time)
schedule_gfl(T, m, time; kill=false)
Simulate a preemptive global fair lateness (GFL) schedule of task system `T` on `m`
processors for the specified `time`. This provides the lowest tardiness bounds of any
GEDF-like scheduler under compliant vector analysis; for more information, see Erickson,
"Managing Tardiness Bounds and Overload in Soft Real-Time Systems."
DOI: [10.17615/fvp3-q039](https://doi.org/10.17615/fvp3-q039).
If `kill` is `true`, jobs are killed at their deadline if they have not yet completed.
See also [`schedule_global`](@ref) for more general global scheduling.
"""
schedule_gfl(T::AbstractRealTimeTaskSystem, m::Int, time::Real) = schedule_global(T, m, time) do j
schedule_gfl(T::AbstractRealTimeTaskSystem, m::Int, time::Real; kill::Bool=false) = schedule_global(T, m, time, kill=kill) do j
j.priority = deadline(j) - (m - 1) / m * cost(j)
end

Expand Down

0 comments on commit 2884885

Please sign in to comment.