Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

DrmaManager Class Reference

#include <DrmaManager.hpp>

Collaboration diagram for DrmaManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void addPendingRegistration (void *ptr, int size)
void addPendingDeregistration (void *ptr)
 DrmaManager (BspCentral *bspCentral)
void addPendingPut (const BspPut &bspPut)
int findLastRegistration (void *ptr)
RegistrationgetRegistration (int pos)
void processPendingOperations ()
void incSuperstep ()
int superstep ()
void incPendingGetReplies ()
void addPendingGetRequest (const BspGetRequest &request)
void addPendingGetReply (const BspGetReply &reply)

Private Member Functions

void commitPendingGetRequests ()
void commitPendingGetReplies ()
void commitRegistrations ()
void commitDeregistrations ()
void commitPendingPuts ()
void deregister (Deregistration &dereg)

Private Attributes

std::vector< Registrationregistrations
std::vector< RegistrationpendingRegistrations
std::vector< DeregistrationpendingDeregistrations
std::vector< BspPutpendingPuts
std::vector< BspGetRequestpendingGetRequests
std::vector< BspGetReplypendingGetReplies
GuardedVariable< int > superstep_
pthread_mutex_t pendingRegistrationsLock
pthread_mutex_t pendingDeregistrationsLock
pthread_mutex_t pendingPutsLock
pthread_mutex_t pendingGetRequestsLock
pthread_mutex_t pendingGetRepliesLock
GuardedVariable< int > pendingGetRepliesCount
Condition noPendingGetReplies
BspCentralbspCentral_

Detailed Description

DrmaManager - performs all BSP DRMA related operations.

DrmaManager keeps track of pending puts and gets, and also maintains the BSP registration stack.

Author:
Andrei Goldchleger
Date:
December, 2003


Constructor & Destructor Documentation

DrmaManager::DrmaManager BspCentral bspCentral  ) 
 

Creates a DrmaManager Object.


Member Function Documentation

void DrmaManager::addPendingDeregistration void *  ptr  ) 
 

Add a BSP deregistration request that will become effective at next barrier

Parameters:
ptr - pointer to the memory region being unregistered

void DrmaManager::addPendingGetReply const BspGetReply reply  ) 
 

Adds a reply to one of our bsp_get requests

Parameters:
reply - Information regarding the bsp_get reply

void DrmaManager::addPendingGetRequest const BspGetRequest request  ) 
 

Adds a bsp_get request that will be processed by the end of the superstep

Parameters:
request - Information regarding the get request

void DrmaManager::addPendingPut const BspPut bspPut  ) 
 

Adds a bsp_put request to the pending bsp_put queue.

Parameters:
bspPut - The DrmaOperating object containing the put details.

void DrmaManager::addPendingRegistration void *  ptr,
int  size
 

Add a BSP registration that will become effective at next barrier

Parameters:
ptr - pointer to the memory region being registered
size - size of the memory region being registered, in bytes

void DrmaManager::commitDeregistrations  )  [private]
 

Commit pending deregistrations.

void DrmaManager::commitPendingGetReplies  )  [private]
 

Makes effective all bsp_get requests that were replied during the last superstep

void DrmaManager::commitPendingGetRequests  )  [private]
 

Reply to any bsp_get requested during the last superstep

void DrmaManager::commitPendingPuts  )  [private]
 

Commit pending puts.

void DrmaManager::commitRegistrations  )  [private]
 

Commit pending registrations.

void DrmaManager::deregister Deregistration dereg  )  [private]
 

Removes a registration from the DRMA registration stack

Parameters:
dereg - the deregistrtation corresponding to the registration that will be removed.

int DrmaManager::findLastRegistration void *  ptr  ) 
 

Returns the last registration for a given memory address.

Parameters:
ptr - the memory address to be looked up.

Registration & DrmaManager::getRegistration int  pos  ) 
 

Returns a BSP registration

Parameters:
pos - the stack index of the wanted registration

void DrmaManager::incPendingGetReplies  )  [inline]
 

Increments the number of bsp_get replies that we expect to receive

void DrmaManager::incSuperstep  )  [inline]
 

Increments tthe superstep

void DrmaManager::processPendingOperations  ) 
 

Called at the end of the superstep, commits all pending operations.

int DrmaManager::superstep  )  [inline]
 

Returns the current superstep


Member Data Documentation

BspCentral* DrmaManager::bspCentral_ [private]
 

Necessary in order to call methods on remote tasks

Condition DrmaManager::noPendingGetReplies [private]
 

Indicates if wether or not there are pending replies

std::vector<Deregistration> DrmaManager::pendingDeregistrations [private]
 

Pending deregistrations that will become effective on the next superstep

pthread_mutex_t DrmaManager::pendingDeregistrationsLock [private]
 

Lock for container access

std::vector<BspGetReply> DrmaManager::pendingGetReplies [private]
 

replies to the bsp_get requests made by the local task

GuardedVariable<int> DrmaManager::pendingGetRepliesCount [private]
 

Number of expected replies to the bsp_get requests. We need to be sure that we received all replies before starting the next superstep

pthread_mutex_t DrmaManager::pendingGetRepliesLock [private]
 

Lock for container access

std::vector<BspGetRequest> DrmaManager::pendingGetRequests [private]
 

bsp_get requests that will be replied at the end of the superstep

pthread_mutex_t DrmaManager::pendingGetRequestsLock [private]
 

Lock for container access

std::vector<BspPut> DrmaManager::pendingPuts [private]
 

Pending puts that will become effective on the next superstep

pthread_mutex_t DrmaManager::pendingPutsLock [private]
 

Lock for container access

std::vector<Registration> DrmaManager::pendingRegistrations [private]
 

Pending registrations that will become effective on the next superstep

pthread_mutex_t DrmaManager::pendingRegistrationsLock [private]
 

Lock for container access

std::vector<Registration> DrmaManager::registrations [private]
 

BSP Registration "stack"

GuardedVariable<int> DrmaManager::superstep_ [private]
 

Current superstep


The documentation for this class was generated from the following files:
Generated on Mon Sep 6 16:13:12 2004 by doxygen 1.3.3