HeMPS  8.0
Macros | Functions | Variables
reclustering.c File Reference

This module implements function relative to reclustering This module is used by the kernel manager Reclustering is a functionality that enable the system to borrow some resources (free pages) of a cluster to another cluster. More...

#include "reclustering.h"
#include "../include/services.h"
#include "utils.h"
#include "cluster_scheduler.h"
#include "processors.h"
#include "packet.h"
Include dependency graph for reclustering.c:

Macros

#define RECLUSTERING_DEBUG   0
 When enable compile the puts in this file.
 

Functions

void reclustering_setup (int c_id)
 
int is_reclustering_NOT_active ()
 
void send_loan_proc_request (int address, int taskID)
 
void send_loan_proc_delivery (int master_address, int taskID, int proc, int hops)
 
void send_loan_proc_release (int master_address, int release_proc, int taskID)
 
void fires_reclustering_protocol ()
 
void handle_reclustering (ServiceHeader *p)
 
int reclustering_next_task (Application *app)
 

Variables

Reclustering reclustering
 Reclustering structure instance.
 
int max_neighbors_level = 0
 Max of neighbors clusters for each reclustering level.
 
unsigned int clusterID
 Current cluster ID. More...
 
unsigned int starting_x_cluster_size
 Starting X size of cluster when reclustering is started.
 
unsigned int starting_y_cluster_size
 Starting Y size of cluster when reclustering is started.
 

Detailed Description

This module implements function relative to reclustering This module is used by the kernel manager Reclustering is a functionality that enable the system to borrow some resources (free pages) of a cluster to another cluster.

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 fires_reclustering_protocol ( )

Fires a new round of the reclustering protocol. This function send the load request to the neighboors masters delimited by the reclustering.neighbors_level variable

void handle_reclustering ( ServiceHeader p)

handle reclustering packets incoming from kernel master. The kernel master kwnows that the packet is a reclustering related packet and calls this function passing the ServiceHeader pointer.

Parameters
pServiceHeader pointer
int is_reclustering_NOT_active ( )
inline

Test if the reclustering is not active

Returns
1 if is not active, 0 if is active
int reclustering_next_task ( Application app)

Searches for first application task not mapped yet, firing the reclustering

Parameters
appApplication pointer
Returns
1 - if the application have all its task mapped, 0 - if the reclustering was initiated
void reclustering_setup ( int  c_id)

Setup a reclustering, called by kernel and configure the cluster ID and initializes some variables

Parameters
c_idCurrent cluster ID
void send_loan_proc_delivery ( int  master_address,
int  taskID,
int  proc,
int  hops 
)

Assembles and sends a LOAN_PROCESSOR_DELIVERY packet to the target of reclustering (requesting) master kernel

Parameters
master_addressRequesting reclustering master address
taskIDTask ID target of reclustering
procAllocated processor
hopsNumber of hops from the target processor
void send_loan_proc_release ( int  master_address,
int  release_proc,
int  taskID 
)

Assembles and sends a LOAN_PROCESSOR_RELEASE packet to the neighbor master kernel

Parameters
master_addressNeighbor master address
release_procAddress of the released processor
taskIDTask ID target of reclustering
void send_loan_proc_request ( int  address,
int  taskID 
)

Assembles and sends a LOAN_PROCESSOR_REQUEST packet to the neighbor master kernel

Parameters
addressNeighbor master address
taskIDTask ID target of reclustering

Variable Documentation

unsigned int clusterID

Current cluster ID.

Cluster ID index of array cluster_info - clusterID is the only extern global variable in in all software.