The PNRManager acts as a proxy between clients and servers.
Inheritance:
Public Methods
-
ProcessEvent receiveClientQuery(Token& token, Computer* client, ID jobID, unsigned int numberOfThreads, Computer* & targetServer)
- As a network RAM manager, receive a memory request message (query) from a client
-
ProcessEvent receiveClientFree(Token& token, map<Computer*, MEMAMT>& deallocTable, Computer* clientHost, ID jobID, unsigned int numberOfThreads)
- Receive a message from a network RAM client that says that a thread has finished on the client and that the client MAY want to deallocate some network RAM.
-
Computer* receiveServerSignal(Token& token, Computer* server, ID procID)
- Receive a response from a network RAM server concerning a request for network RAM
-
bool receiveServerDeallocOK(Token& token, Computer* server, ID procID)
- A server will always deallocate network RAM without question. This message simply acknowledges the message and passes back some load information.
-
void setBroadcastListeners(const unsigned int listeners = 0)
- Set how many other servents are listening to broadcasts sent by this manager.
-
MEMAMT getNetRAMRequest(ID jobID)
-
-
MEMAMT getRequest(ID jobID, Computer* client)
-
-
MEMAMT getNetRAMAllocated(ID jobID, Computer* client)
-
-
MEMAMT getNetRAMDeallocation(ID jobID, Computer* server)
-
-
void updateAvailable(PNRManager* remoteManager, ID updateID)
- Receive broadcast information on network RAM availability
-
map<Computer*, MEMAMT> & getToDeallocateServers(ID jobID)
-
-
list<pair <Computer*, MEMAMT> > & getNetRAMServers(ID jobID, Computer* client)
-
-
list<Token> & getRequestingClients(ID jobID)
-
-
list<pair<Computer*, MEMAMT> > getBcastInfo(ID jobID)
-
-
void receivedNetRAMInfo(const ID jobID)
-
-
void eraseClientInfo(const ID jobID)
-
-
void addNetRAMAllocationEntry(ID processID, Computer* client, Computer* server, MEMAMT amount)
-
-
ID recallThreadID(ID jobID)
-
-
void clearBroadcastTable()
-
-
string _check_Tables()
-
Public Methods
-
void setHost(Computer* _host = NULL)
-
void setGrantingThreshold(const MEMAMT _newThreshold = 0.1)
-
Computer* getHost(void) const
-
void setAvailabilityTable(map<Computer*, MEMAMT>* table)
-
void setComputerTable(map<ID, Computer>* table)
-
void loadMagicKnowledge()
-
void setMagicKnowledge()
-
Computer* selectServer()
-
bool serverAvailable()
Documentation
Currently, no matter what algorithms are used by servents to allocate network RAM,
clients must always contact managers to complete allocation. This is because the managers
contain virtually all of the code for allocation and deallocation, and I didn't feel like
duplicating the code in other objects just for some PNR applications.
ProcessEvent receiveClientQuery(Token& token, Computer* client, ID jobID, unsigned int numberOfThreads, Computer* & targetServer)
-
Clients send messages to managers to either request network RAM or notify the manager
that no network RAM is needed.
ProcessEvent receiveClientFree(Token& token, map<Computer*, MEMAMT>& deallocTable, Computer* clientHost, ID jobID, unsigned int numberOfThreads)
-
Computer* receiveServerSignal(Token& token, Computer* server, ID procID)
-
The token will be carrying allocation information. The server may grant, partially grant,
or deny network RAM requests.
bool receiveServerDeallocOK(Token& token, Computer* server, ID procID)
-
@Receive a response from a network RAM server concerning a deallocation notification.
void setBroadcastListeners(const unsigned int listeners = 0)
-
MEMAMT getNetRAMRequest(ID jobID)
-
Note that the "time" the network RAM is requested is indexed by parallel job ID.
this is used just to keep the order of requests straight.
- Returns:
- total amount of network RAM requested at a particular time by a group of clients
MEMAMT getRequest(ID jobID, Computer* client)
-
- Returns:
- amount of network RAM requested at a particular time by a particular client
MEMAMT getNetRAMAllocated(ID jobID, Computer* client)
-
- Returns:
- amount of network RAM granted to the particular thread with the given process ID residing
on the given client
MEMAMT getNetRAMDeallocation(ID jobID, Computer* server)
-
- Returns:
- amount of network RAM that is to be deallocated at a particular time on a particular server
void updateAvailable(PNRManager* remoteManager, ID updateID)
-
map<Computer*, MEMAMT> & getToDeallocateServers(ID jobID)
-
- Returns:
- a list of computers that should have network RAM deallocated.
list<pair <Computer*, MEMAMT> > & getNetRAMServers(ID jobID, Computer* client)
-
- Returns:
- a list of servers that are meeting a particular request for network RAM
list<Token> & getRequestingClients(ID jobID)
-
list<pair<Computer*, MEMAMT> > getBcastInfo(ID jobID)
-
- Returns:
- an availablity table that
void receivedNetRAMInfo(const ID jobID)
-
void eraseClientInfo(const ID jobID)
-
void addNetRAMAllocationEntry(ID processID, Computer* client, Computer* server, MEMAMT amount)
-
ID recallThreadID(ID jobID)
-
void clearBroadcastTable()
-
string _check_Tables()
-
- This class has no child classes.
- Author:
- John Oleszkiewicz
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.