Bjarke Freund-Hansen
Bjarke Freund-Hansen

Reputation: 30128

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

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?

Upvotes: 1

Views: 699

Answers (1)

Claudio
Claudio

Reputation: 10947

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.

Upvotes: 0

Related Questions