This module implements function relative to the slave processor management by the manager kernel. This modules is used only by the manager kernel.
More...
#include "processors.h"
#include "utils.h"
This module implements function relative to the slave processor management by the manager kernel. This modules is used only by the manager kernel.
HEMPS VERSION - 8.0 - support for RT applications
Distribution: June 2016
Created by: Marcelo Ruaro - contact: marce.nosp@m.lo.r.nosp@m.uaro@.nosp@m.acad.nosp@m..pucr.nosp@m.s.br
Research group: GAPH-PUCRS - contact: ferna.nosp@m.ndo..nosp@m.morae.nosp@m.s@pu.nosp@m.crs.b.nosp@m.r
void add_procesor |
( |
int |
proc_address | ) |
|
Add a valid processor to the processors' array
- Parameters
-
void add_task |
( |
int |
proc_address, |
|
|
int |
task_id |
|
) |
| |
Add a task into a processor. Called evenly when a task is mapped into a processor.
- Parameters
-
int get_proc_address |
( |
int |
index | ) |
|
Gets the processor address stored in the index parameter
- Parameters
-
index | Index of the processor address |
- Returns
- The processor address (XY)
int get_proc_free_pages |
( |
int |
proc_address | ) |
|
Gets the total of free pages of a given processor
- Parameters
-
- Returns
- The number of free pages
int get_proc_slack_time |
( |
int |
proc_address | ) |
|
Gets the processor slack time
- Parameters
-
- Returns
- The processor slack time in percentage
int get_task_location |
( |
int |
task_id | ) |
|
Searches for a task location by walking for all processors within processors' array
- Parameters
-
- Returns
- The task location, i.e., the processor address that the task is allocated
Initializes the processors's array with invalid values
void remove_task |
( |
int |
proc_address, |
|
|
int |
task_id |
|
) |
| |
Remove a task from a processor. Called evenly when a task is unmapped (removed) from a processor.
- Parameters
-
Processor* search_processor |
( |
int |
proc_address | ) |
|
Internal function to search by a processor - not visible to the other software part
- Parameters
-
- Returns
- The processor pointer
void update_proc_slack_time |
( |
int |
proc_address, |
|
|
int |
slack_time |
|
) |
| |
Updates the processor slack time
- Parameters
-
proc_address | Processor address |
slack_time | Slack time in percentage |