HeMPS  8.0
Functions | Variables
processors.c File Reference

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"
Include dependency graph for processors.c:

Functions

Processorsearch_processor (int proc_address)
 
int get_proc_address (int index)
 
void update_proc_slack_time (int proc_address, int slack_time)
 
int get_proc_slack_time (int proc_address)
 
void add_procesor (int proc_address)
 
void add_task (int proc_address, int task_id)
 
void remove_task (int proc_address, int task_id)
 
int get_proc_free_pages (int proc_address)
 
int get_task_location (int task_id)
 
void init_procesors ()
 

Variables

Processor processors [MAX_CLUSTER_SLAVES]
 Processor array.
 

Detailed Description

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

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
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
Processor* search_processor ( int  proc_address)

Internal function to search by a processor - not visible to the other software part

Parameters
proc_addressProcessor address to be searched
Returns
The processor pointer
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