|
|
Subscribe / Log in / New account

Zero total lag

Zero total lag

Posted Apr 11, 2024 15:26 UTC (Thu) by corbet (editor, #1)
In reply to: Completing the EEVDF scheduler by brchrisman
Parent article: Completing the EEVDF scheduler

Yes, I believe the "sum of all lag is zero" property is intentional. The changes described in the article would tend to conserve that property. That said, there are complications when, for example, a task with a non-zero lag simply exits. The EEVDF paper describes some elaborate schemes for distributing that lag across the remaining tasks, but I'm not sure the Linux scheduler does that.


to post comments

Zero total lag

Posted Apr 11, 2024 22:10 UTC (Thu) by Wol (subscriber, #4433) [Link]

> The EEVDF paper describes some elaborate schemes for distributing that lag across the remaining tasks, but I'm not sure the Linux scheduler does that.

Surely the easy way to do that is, as each task exits its timeslice and is allocated -ve lag, that same (+ve) lag is shared out amongst the other tasks. Any sleeping tasks with -ve lag less than their share simply get the -ve lag wiped into it and the share is recalculated. And if the running task exits with +ve lag, that lag is suspended and then merged with the -ve lag accumulated by the next task to run before being shared.

So basically, every time a timeslice expires, that's when everything adds up to 0.

Cheers,
Wol


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds