|
HeMPS
8.0
|
Defines Scheduling structure. This struct is used to manages the scheduling informations relative to each task. More...

Go to the source code of this file.
Classes | |
| struct | Scheduling |
| This structure stores variables useful to manage the task scheduling (for BE or RT) Some of the values are only used for RT tasks. More... | |
Macros | |
| #define | FREE -1 |
| Scheduling position not have a valid task. | |
| #define | READY 0 |
| Task is in ready to execute. | |
| #define | WAITING 1 |
| Task is waiting for a message. | |
| #define | RUNNING 2 |
| Task is running in the CPU. | |
| #define | MIGRATING 3 |
| Task is being migrated. | |
| #define | BLOCKED 4 |
| Task is blocked waiting for the manager send a TASK_RELEASE packet. | |
| #define | SLEEPING 5 |
| Task already executed all its execution time and is sleeping until the end of period. | |
| #define | DEBUG 0 |
| When enabled shows the puts placed within local_scheduler.c. | |
| #define | NO_DEADLINE -1 |
| A task that is best-effor have its deadline variable equal to -1. | |
| #define | MAX_TIME_SLICE 16318 |
| Standard time slice value for task execution. | |
Functions | |
| void | real_time_task (Scheduling *, unsigned int, int, unsigned int) |
| unsigned int | get_time_slice () |
| void | init_scheduling_ptr (Scheduling **, int) |
| void | clear_scheduling (Scheduling *) |
| Scheduling * | LST (unsigned int) |
Defines Scheduling structure. This struct is used to manages the scheduling informations relative to each task.
HEMPS VERSION - 8.0 - support for RT applications
Distribution: June 2016
Created by: Marcelo Ruaro - contact: marcelo.ruaro@acad.pucrs.br
Research group: GAPH-PUCRS - contact: fernando.moraes@pucrs.br
A given task can be BE (Best-Effort) or RT (Real-Time).
BE task have not timing constraints. RT have the timing constraints defined according the next diagram
Periodic task real-time parameters
|<---------— period --------------—> | | |
| <---------—deadline---------—> | |
|---|---|
| _______________________ |
|| execution time |<-slack->| | ||_______________________|_________|_____| ^ time -> | | ready time
| void clear_scheduling | ( | Scheduling * | scheduling_tcb | ) |
Clear a scheduling instance, used when the task is removed from slave processor
| scheduling_tcb | Scheduling pointer to be cleared |
| unsigned int get_time_slice | ( | ) |
Get the time slice. Useful to provide the kernel slave time slice
| void init_scheduling_ptr | ( | Scheduling ** | sched_ptr, |
| int | tcb_index | ||
| ) |
| Scheduling* LST | ( | unsigned int | current_time | ) |
The LST algorithm called by kernel slave. It select the next RT task with the least slack time, or the next BE task following a round-robin order
| current_time | Current system time |
| void real_time_task | ( | Scheduling * | real_time_task, |
| unsigned int | period, | ||
| int | deadline, | ||
| unsigned int | execution_time | ||
| ) |
Funcion called by kernel slave when a task call the primitive RealTime. This function set the real-time paramenters for the task.
1.8.11