Under the SCHED_DEADLINE scheduler is sched_yield() guaranteeing wakeup at the start of the next period?

556 Views Asked by At

The documentation for SCHED_DEADLINE states under point 4.4 that:

This behavior of sched_yield() allows the task to wake-up exactly at the beginning of the next period.

Does this mean that using sched_yield() in a SCHED_DEADLINE thread guarantees that the thread will wake up exactly at the start of the next period? Even when other SCHED_DEADLINE threads are present?

1

There are 1 best solutions below

0
On

Yes, the scheduler will wake up the task exactly (based on the timing granularity, of course) at the start of the next period. However, the task will start executing only if it will have the earliest deadline among all ready SCHED_DEADLINE tasks. More precisely, 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.