Next: Algorithm for ProcessPending()
Up: int pvm_init_worker_class(char *farm_name
Previous: Client side
- If opcode is INIT_WORKER_CLASS
- Get the farm name, worker class name and worker task id.
- Search the list of the farmers using this farm name.
- If an item is not found then add the request to the list of pending requests
and service some other message (client remains blocked)
- If the farmer item is found then, get the farm item (FItem) and look for
the list of worker classes (WCList).
- Search the list of the worker classes using the worker class name (search by name).
- If the item is not found then Append an item in the list of worker classes and get the worker class id.
- If the worker class id exceeds the hard limit, return an ERROR.
- Make an entry in the Cache of worker class ids regarding
the worker class item and the worker class id.
- Append a worker task item in the list (using the wlist ) and send the wcid to the client task.
- If the worker class item is found then get the WCItem which contains the worker class id.
- Append the worker task to this list
- Send the wcid to the worker task (client)
- Service other messages
Sameer Shende