This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
realtime:documentation:howto:applications:cyclic [2017/05/19 15:41] jogness comment spelling |
realtime:documentation:howto:applications:cyclic [2017/06/20 14:15] (current) anna-maria adapt link kernel documentation |
||
---|---|---|---|
Line 14: | Line 14: | ||
Any mechanism for implementing a cyclic task can be divided into the following parts: | Any mechanism for implementing a cyclic task can be divided into the following parts: | ||
- | * periodic_task_init(): initialization code for doing things like requesting timers, initializing variables, setting timer periods. | + | * periodic_task_init(): Initialization code for doing things like requesting timers, initializing variables, setting timer periods. |
* do_rt_task(): The real time task is done here. | * do_rt_task(): The real time task is done here. | ||
- | * wait_rest_of_period(): After the task is done, wait for the rest of the period. The assumption here is the task less time to complete compared to the period length. | + | * wait_rest_of_period(): After the task is done, wait for the rest of the period. The assumption here is the task requires less time to complete compared to the period length. |
- | * struct period_info: this is a struct which will be used to pass around data required by the above mentioned functions. | + | * struct period_info: This is a struct which will be used to pass around data required by the above mentioned functions. |
The stub for the real time task will look like: | The stub for the real time task will look like: | ||
Line 31: | Line 31: | ||
wait_rest_of_period(&pinfo); | wait_rest_of_period(&pinfo); | ||
} | } | ||
+ | | ||
+ | return NULL; | ||
} | } | ||
</code> | </code> | ||
Line 82: | Line 84: | ||
Recently, earliest deadline first scheduling algorithm has been merged in the mainline kernel. Now, users can specify runtime, period and deadline of a task and they scheduler will run the task every specified period and will make sure the deadline is met. The scheduler will also let user know if the tasks(or a set of tasks) cannot be scheduled because the deadline won't be met. | Recently, earliest deadline first scheduling algorithm has been merged in the mainline kernel. Now, users can specify runtime, period and deadline of a task and they scheduler will run the task every specified period and will make sure the deadline is met. The scheduler will also let user know if the tasks(or a set of tasks) cannot be scheduled because the deadline won't be met. | ||
- | More information about the EDF scheduler including an example of implementation can be found at: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/scheduler/sched-deadline.txt?id=refs/tags/v4.10-rc2 | + | More information about the EDF scheduler including an example of implementation can be found at: https://www.kernel.org/doc/Documentation/scheduler/sched-deadline.txt |