#include <BspCentral.hpp>
Collaboration diagram for BspCentral:
Public Member Functions | |
BspCentral (Config &config) | |
void | registerRemoteIor (int pid, string ior) |
void | takeYourPid (int pid) |
void | waitGlobalInit () |
void | initSlave (string processZeroIor) |
int | getPid () |
void | setPid (int pid_) |
void | setTotalNumProcs (int numProcs) |
int | getTotalNumProcs () |
string | getIor () |
void | bspPut (int pid, void *src, void *dst, int offset, int nBytes) |
void | bspSynch () |
void | bspSynchDone () |
void | bspLocalSynch () |
void | addPendingPut (const BspPut &bspPut) |
void | addPendingRegistration (void *ident, int size) |
void | addPendingDeregistration (void *ident) |
void | bspEnd () |
void | bspGet (int pid, void *src, int offset, void *dst, int nBytes) |
void | bspGetRequest (const BspGetRequest &request) |
void | bspGetReply (const BspGetReply &reply) |
void | bspGetReplyFowarder (const int &pid, const BspGetReply &reply) |
Private Member Functions | |
int | getNextPid () |
string | getIor (int taskNum) |
string | getTaskId (int taskNum) |
Private Attributes | |
BspProxyStubPool | stubPool |
std::map< int, std::string > | tasks |
std::map< int, std::string > | iors |
int | myPid |
int | totalNumProcs |
GuardedVariable< int > | superstep |
GuardedVariable< int > | synchedProcecess |
GuardedVariable< int > | pids |
DrmaManager | drmaManager |
pthread_mutex_t | bspSynchLock |
Condition | globalInitDone |
Condition | synchDone |
BspCentral contais methods needed by a BSP application. It contains a server side, represented by BspProxyImpl, and a client side implemented by BspProxyStubPool. It also implements the methods defined by BspProxy and fowarded by BspProxyImpl.
|
Constructs a BspCentral object
|
|
Deregister the LAST registration of a given memory address
|
|
Adds a pending remote bsp_put request to the DrmaManager
|
|
Registers a memory area as globally accessible to all BSP tasks
|
|
FIXME Uninplemented |
|
Implements the bsp_get method. Allows the local task to read from memory from a remote process.
|
|
Called by another BSP task in order to reply to one of our bspGetRequets
|
|
Called by DrmaManager in order to reply to a bspGetRequest originated from a remote process
|
|
Called by another BSP task in order to request the contents of a given memory area.
|
|
Indicates that the local BSP task reached a synchronization barrier and is awaiting for global synchronization |
|
The implementation of the bsp_put operation. Allows a BSP task to write on the address space of a task.
|
|
Called on Process Zero to indicate that a given process reached the barrier synchronization. |
|
Called by process zero on each remote BSP task to indicate that the current barrier synchronization is complete. |
|
Gets the IOR of the local process |
|
Gets the IOR of a given task
|
|
Returns the next BSP PID that should be attributed to a BSP task. |
|
Return the BSP PID of the local task |
|
Gets the BspProxyStubPool ID of a given task
|
|
Gets the total number of tasks in the BSP application |
|
Initializes the BspCentral when the task in question is a slave, that is, not the process zero.
|
|
Register the IOR of a remote BSP task. This method encapsulate the logic of the method defined in BspProxy IDL interface and fowarded by BspProxyImpl
|
|
Sets the BSP PID of the local task |
|
Sets the total number of tasks in the BSP application |
|
Receives a PID from process zero. This method encapsulate the logic of the method defined in BspProxy IDL interface and fowarded by BspProxyImpl.
|
|
Blocks until initialization is complete, that is all tasks know all the PIDs and IORs of each other |
|
Lock to avoid race conditions between local and remote synchronization requests. Relevant only to process zero |
|
DrmaManager object. Responsible for DRMA operations |
|
Indicates Wether or not global initialization is complete, that is, each tasks has its pid and knows the IORs of each other |
|
iors of the remote tasks |
|
PID of this BSP task |
|
Last pid atributted to a BSP tast. Relevant to process zero only. |
|
The stubPool contains proxies for each of the other BSP tasks |
|
The current superstep of the BSP application |
|
Indicate wether or not a bsp_synch is complete |
|
Number of tasks that called bsp_synch. Relevant to process zero only. |
|
Ids for proxy retrieval from the stubPool |
|
Total number of tasks in the BSP program |