HeMPS  8.0
Classes | Functions
processors.h File Reference

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"
Include dependency graph for processors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Processor
 This structure store variables used to manage the processors attributed by the kernel master. More...
 

Functions

void init_procesors ()
 
void update_proc_slack_time (int, int)
 
int get_proc_slack_time (int)
 
void add_procesor (int)
 
void add_task (int, int)
 
void remove_task (int, int)
 
int get_proc_free_pages (int)
 
int get_proc_address (int)
 
int get_task_location (int)
 

Detailed Description

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

Function Documentation

void add_procesor ( int  proc_address)

Add a valid processor to the processors' array

Parameters
proc_addressProcessor address to be added
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
proc_addressProcessor address
task_idTask ID to be added
int get_proc_address ( int  index)

Gets the processor address stored in the index parameter

Parameters
indexIndex 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
proc_addressProcessor address
Returns
The number of free pages
int get_proc_slack_time ( int  proc_address)

Gets the processor slack time

Parameters
proc_addressProcessor address
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
task_idTask ID
Returns
The task location, i.e., the processor address that the task is allocated

Searches for the location of a given task

Parameters
task_IDThe ID of the task
Returns
The task location (processor address in XY)
void init_procesors ( )

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
proc_addressProcessor address
task_idTask ID to be removed
void update_proc_slack_time ( int  proc_address,
int  slack_time 
)

Updates the processor slack time

Parameters
proc_addressProcessor address
slack_timeSlack time in percentage