class PNRManager

The PNRManager acts as a proxy between clients and servers.

Inheritance:


Public Methods

[more]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
[more]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.
[more]Computer* receiveServerSignal(Token& token, Computer* server, ID procID)
Receive a response from a network RAM server concerning a request for network RAM
[more]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.
[more]void setBroadcastListeners(const unsigned int listeners = 0)
Set how many other servents are listening to broadcasts sent by this manager.
[more]MEMAMT getNetRAMRequest(ID jobID)
[more]MEMAMT getRequest(ID jobID, Computer* client)
[more]MEMAMT getNetRAMAllocated(ID jobID, Computer* client)
[more]MEMAMT getNetRAMDeallocation(ID jobID, Computer* server)
[more]void updateAvailable(PNRManager* remoteManager, ID updateID)
Receive broadcast information on network RAM availability
[more]map<Computer*, MEMAMT> & getToDeallocateServers(ID jobID)
[more]list<pair <Computer*, MEMAMT> > & getNetRAMServers(ID jobID, Computer* client)
[more]list<Token> & getRequestingClients(ID jobID)
[more]list<pair<Computer*, MEMAMT> > getBcastInfo(ID jobID)
[more]void receivedNetRAMInfo(const ID jobID)
[more]void eraseClientInfo(const ID jobID)
[more]void addNetRAMAllocationEntry(ID processID, Computer* client, Computer* server, MEMAMT amount)
[more]ID recallThreadID(ID jobID)
[more]void clearBroadcastTable()
[more]string _check_Tables()


Inherited from PNRAgent:

Public Methods

ovoid setHost(Computer* _host = NULL)
ovoid setGrantingThreshold(const MEMAMT _newThreshold = 0.1)
oComputer* getHost(void) const
ovoid setAvailabilityTable(map<Computer*, MEMAMT>* table)
ovoid setComputerTable(map<ID, Computer>* table)
ovoid loadMagicKnowledge()
ovoid setMagicKnowledge()
oComputer* selectServer()
obool 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.
oProcessEvent 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.

oProcessEvent receiveClientFree(Token& token, map<Computer*, MEMAMT>& deallocTable, Computer* clientHost, ID jobID, unsigned int numberOfThreads)

oComputer* 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.

obool receiveServerDeallocOK(Token& token, Computer* server, ID procID)
@Receive a response from a network RAM server concerning a deallocation notification.

ovoid setBroadcastListeners(const unsigned int listeners = 0)

oMEMAMT 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

oMEMAMT getRequest(ID jobID, Computer* client)
Returns:
amount of network RAM requested at a particular time by a particular client

oMEMAMT 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

oMEMAMT getNetRAMDeallocation(ID jobID, Computer* server)
Returns:
amount of network RAM that is to be deallocated at a particular time on a particular server

ovoid updateAvailable(PNRManager* remoteManager, ID updateID)

omap<Computer*, MEMAMT> & getToDeallocateServers(ID jobID)
Returns:
a list of computers that should have network RAM deallocated.

olist<pair <Computer*, MEMAMT> > & getNetRAMServers(ID jobID, Computer* client)
Returns:
a list of servers that are meeting a particular request for network RAM

olist<Token> & getRequestingClients(ID jobID)

olist<pair<Computer*, MEMAMT> > getBcastInfo(ID jobID)
Returns:
an availablity table that

ovoid receivedNetRAMInfo(const ID jobID)

ovoid eraseClientInfo(const ID jobID)

ovoid addNetRAMAllocationEntry(ID processID, Computer* client, Computer* server, MEMAMT amount)

oID recallThreadID(ID jobID)

ovoid clearBroadcastTable()

ostring _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++.