This module defines function relative to the slave processor management by the manager kernel. The Processor structure is defined, this structure stores information relative the slave processor, which are used by the kernel master to search task locations and get the number of free pages of each slave during the mapping processes.
More...
#include "../../include/kernel_pkg.h"
Go to the source code of this file.
|
struct | Processor |
| This structure store variables used to manage the processors attributed by the kernel master. More...
|
|
This module defines function relative to the slave processor management by the manager kernel. The Processor structure is defined, this structure stores information relative the slave processor, which are used by the kernel master to search task locations and get the number of free pages of each slave during the mapping processes.
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
Searches for the location of a given task
- Parameters
-
task_ID | The ID of the task |
- Returns
- The task location (processor address in XY)
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
-
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 |