HeMPS
8.0
|
Kernel master is the system manager kernel. More...
#include "kernel_master.h"
#include "../../modules/utils.h"
#include "../../include/plasma.h"
#include "../../include/services.h"
#include "../../modules/packet.h"
#include "../../modules/new_task.h"
#include "../../modules/cluster_scheduler.h"
#include "../../modules/reclustering.h"
#include "../../modules/applications.h"
#include "../../modules/processors.h"
Functions | |
int | get_cluster_ID (int x, int y) |
int | get_master_address (int slave_address) |
void | send_app_terminated (Application *app, unsigned int *terminated_task_list) |
void | send_task_allocation (NewTask *new_t) |
void | send_task_release (Application *app) |
void | send_app_allocation_request (Application *app, unsigned int *task_info) |
int | send_task_migration (int task_ID, int new_proc) |
void | request_application (Application *app) |
void | handle_pending_application () |
void | handle_app_terminated (int appID, unsigned int app_task_number, unsigned int app_master_addr) |
void | handle_packet () |
void | initialize_cluster_load () |
void | initialize_slaves () |
void | initialize_clusters () |
void | handle_new_app (int app_ID, volatile unsigned int *ref_address, unsigned int app_descriptor_size) |
void | handle_app_request () |
int | main () |
Variables | |
unsigned int | pending_app_to_map = 0 |
Controls the number of pending applications already handled by not completely mapped. | |
unsigned char | is_global_master |
Defines if this kernel is at global or local operation mode. | |
unsigned int | global_master_address |
Used to stores the global master address, is useful in local operation mode. | |
unsigned int | terminated_task_master [MAX_TASKS_APP] |
Auxiliary array that stores the terminated task list. | |
unsigned int | total_mpsoc_resources = (MAX_LOCAL_TASKS * MAX_SLAVE_PROCESSORS) |
Controls the number of total slave processors pages available. Is the admission control variable. | |
unsigned int | cluster_load [CLUSTER_NUMBER] |
Keep the cluster load, updated at every applications start and finish. | |
unsigned int | terminated_app_count = 0 |
Used to fires the END OF ALL APPLIATIONS. | |
unsigned int | waiting_app_allocation = 0 |
Signal that an application is not fully mapped. | |
Kernel master is the system manager kernel.
HEMPS VERSION - 8.0 - support for RT applications
Distribution: June 2016
Created by: Marcelo Ruaro - contact: marce lo.r uaro@ acad .pucr s.br
Research group: GAPH-PUCRS - contact: ferna ndo. morae s@pu crs.b r
kernel_master is the core of the OS running into the managers processors (local and global). It assumes two operation modes: global or local. The operation modes is defined by the global variable is_global_master. Local operation mode: runs into local managers. Manage the applications and task mapping. Global operation mode: runs into global manager. Runs all functions of the local operation mode, further the applications admission control. The kernel_master file uses several modules that implement specific functions
int get_cluster_ID | ( | int | x, |
int | y | ||
) |
Receive a address and return the cluster index of array cluster_info[]
x | Address x of the manager processor |
y | Address y of the manager processor |
int get_master_address | ( | int | slave_address | ) |
Receives a slave address and tells which is its master address
slave_address | The XY slave address |
void handle_app_request | ( | ) |
Handles a new application request triggered by test_bench (repository)
void handle_app_terminated | ( | int | appID, |
unsigned int | app_task_number, | ||
unsigned int | app_master_addr | ||
) |
Handles an application which terminated its execution
appID | Application ID of the terminated app |
app_task_number | Application task number |
app_master_addr | Application master XY address |
void handle_new_app | ( | int | app_ID, |
volatile unsigned int * | ref_address, | ||
unsigned int | app_descriptor_size | ||
) |
Handles a new application incoming from the global manager or by repository
app_ID | Application ID to be handled |
ref_address | Pointer to the application descriptor. It can point to a array (local manager) or the repository directly (global manager) |
app_descriptor_size | Size of the application descriptor |
void handle_packet | ( | ) |
Handles a new packet from NoC
void handle_pending_application | ( | ) |
Handles a pending application. A pending application it the one which there is some task to be inserted into reclustering
void initialize_cluster_load | ( | ) |
Initializes the cluster load by zeroing the cluster_load[] array
void initialize_clusters | ( | ) |
Initializes all local managers by sending a INITIALIZE_CLUSTER packet to each one
void initialize_slaves | ( | ) |
Initializes all slave processor by sending a INITIALIZE_SLAVE packet to each one
void request_application | ( | Application * | app | ) |
Requests a new application to the global master kernel
app | Application to be requested |
void send_app_allocation_request | ( | Application * | app, |
unsigned int * | task_info | ||
) |
Assembles and sends a APP_ALLOCATION_REQUEST packet to the global master
app | The Application instance |
task_info | An array containing relevant task informations |
void send_app_terminated | ( | Application * | app, |
unsigned int * | terminated_task_list | ||
) |
Assembles and sends a APP_TERMINATED packet to the global master
app | The Applications address |
terminated_task_list | The terminated task list of the application |
void send_task_allocation | ( | NewTask * | new_t | ) |
Assembles and sends a TASK_ALLOCATION packet to a slave kernel
new_t | The NewTask instance |
int send_task_migration | ( | int | task_ID, |
int | new_proc | ||
) |
Assembles and sends a TASK_MIGRATION packet to a slave kernel
task_ID | The task ID to be migrated |
new_proc | The new processor address of task_ID |
void send_task_release | ( | Application * | app | ) |
Assembles and sends a TASK_RELEASE packet to a slave kernel
app | The Application instance |