next up previous
Next: Algorithm for ProcessPending() Up: int pvm_init_worker_class(char *farm_name Previous: Client side

Server side

  1. If opcode is INIT_WORKER_CLASS
  2. Get the farm name, worker class name and worker task id.
  3. Search the list of the farmers using this farm name.
  4. If an item is not found then add the request to the list of pending requests and service some other message (client remains blocked)
  5. If the farmer item is found then, get the farm item (FItem) and look for the list of worker classes (WCList).
  6. Search the list of the worker classes using the worker class name (search by name).
  7. If the item is not found then Append an item in the list of worker classes and get the worker class id.
  8. If the worker class id exceeds the hard limit, return an ERROR.
  9. Make an entry in the Cache of worker class ids regarding the worker class item and the worker class id.
  10. Append a worker task item in the list (using the wlist ) and send the wcid to the client task.
  11. If the worker class item is found then get the WCItem which contains the worker class id.
  12. Append the worker task to this list
  13. Send the wcid to the worker task (client)
  14. Service other messages


Sameer Shende