HeMPS
8.0
|
local_scheduler is a kernel module in charge of implementing task scheduling following a LST (Least Slack Time) algorithm. More...
#include "local_scheduler.h"
#include "../../include/kernel_pkg.h"
#include "../include/plasma.h"
#include "../include/services.h"
#include "packet.h"
#include "utils.h"
Functions | |
unsigned int | get_time_slice () |
void | init_scheduling_ptr (Scheduling **sched_ptr, int tcb_index) |
void | clear_scheduling (Scheduling *scheduling_tcb) |
void | update_slack_time (Scheduling *input_task, unsigned int current_time) |
void | real_time_task (Scheduling *real_time_task, unsigned int period, int deadline, unsigned int execution_time) |
unsigned int | round_robin () |
void | dynamic_slice_time (Scheduling *scheduled, unsigned int time) |
void | update_real_time (unsigned int current_time) |
Scheduling * | LST (unsigned int current_time) |
Variables | |
Scheduling | scheduling [MAX_LOCAL_TASKS] |
Scheduling array with its size equal to the max number of task that can execute into the processor. | |
unsigned int | time_slice |
Time slice used to configure the processor to generate an interruption. | |
unsigned int | schedule_overhead = 500 |
Used to dynamically estimate the scheduler overhead. | |
unsigned int | instant_overhead |
Used to dynamically estimate the scheduler overhead. | |
unsigned int | cpu_utilization = 0 |
RT CPU utilization, only filled with RT constraints. | |
local_scheduler is a kernel module in charge of implementing task scheduling following a LST (Least Slack Time) algorithm.
HEMPS VERSION - 8.0 - support for RT applications
Distribution: June 2016
Created by: Marcelo Ruaro - contact: marce lo.r uaro@ acad .pucr s.br
Research group: GAPH-PUCRS - contact: ferna ndo. morae s@pu crs.b r
The main function of this module is the LST algorithm, which is called by kernel_slave. It returns the pointer for the selected task to execute into the processor. This module is used only by the slave kernel
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 |
|
inline |
This algorithm try to given an extra time slice to task selected by LST. The main approach is looking for the READY task slack time and the closer end of period
scheduled | Scheduled task pointer |
time | Current system time |
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.
unsigned int round_robin | ( | ) |
A simple round-robin scheduler
|
inline |
Updates the dynamic RT parameters for all RT tasks. The dynamic RT parameters are: remaining execution time, status, slack-time
current_time | Current system time |
|
inline |
Updates the task slack time. The slack time is the time until the task start the next period, once it finishes it execution time for the current period
input_task | Scheduling structure of the task to be updated |
current_time | Current system time |