SCHED_DEADLINE
的文档第 4.4 点指出:
This behavior of sched_yield() allows the task to wake-up exactly at the beginning of the next period.
这是否意味着在 SCHED_DEADLINE
线程中使用 sched_yield()
保证线程将在下一个开始时恰好唤醒时期?即使存在其他 SCHED_DEADLINE
线程?
最佳答案
是的,调度器将在下一个周期开始时准确地唤醒任务(当然,基于计时粒度)。但是,只有当任务在所有就绪的 SCHED_DEADLINE 任务中具有最早的截止日期时,它才会开始执行。更准确地说,it will be scheduled only once it gets among the m SCHED_DEADLINE tasks with the earliest absolute deadline, where 'm' is the number of CPUs in the scheduling domain .
关于linux - 在 SCHED_DEADLINE 调度程序下 sched_yield() 保证在下一个周期开始时唤醒?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45728486/