-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the scheduler is now fair (#2158)
Generators are now ordered by rank in the priority queue. The rank computation formula is: - 100/(1+generated_task_count) for high priority tasks - 10/(1+generated_task_count) for medium priority tasks - 1/(1+generated_task_count) for low priority tasks Note the ranks are used when comparing generators both with the same priority and with different priority. So now we are: - giving an opportunity to all generators with the same priority to take turns generating tasks - giving roughly 1 low priority and 10 medium priority tasks the opportunity to run for every 100 high priority tasks running. After a generator generates a task, the generators are reordered in the priority queue based on rank. Signed-off-by: Andrei Aaron <[email protected]>
- Loading branch information
Showing
2 changed files
with
146 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters