The TaskBag is a service whose functionality is to provide a repository for ‘task descriptions’. It enables clients running in several computers to carry out parts of a computation in parallel. A master process places descriptions of sub-tasks of a computation in the TaskBag, and worker processes select tasks from the TaskBag and carry them out, returning descriptions of results to the TaskBag. The master then collects the results and combines them to produce the final result.

The TaskBag service provides the following operations:

setTask allows clients to add task descriptions to the bag;

takeTask allows clients to take task descriptions out of the bag.

A client makes the request takeTask, when a task is not available but may be available soon. Discuss the advantages and drawbacks of the following alternatives:

(i) the server can reply immediately, telling the client to try again later;
(ii) make the server operation (and therefore the client) wait until a task becomes available;
(iii) use callbacks.


This is a straight-forward application of the ideas on synchronising server operations. One of the projects in the Project Work section is based on the TaskBag service.

Computer Science & Information Technology

You might also like to view...

Which Excel feature automatically saves your work at predetermined intervals?

A. AutoFill B. AutoFormat C. AutoRecover D. AutoSave

Computer Science & Information Technology

If an array's logical size is greater than zero, the index of the last item in the array is the logical size plus 1.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

You should disable GPS tracking on your mobile device unless you need to use it.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A search engine searches _____ to find a match for the query.?

A. ?the web B. ?Open Directory C. ?web bibliographies D. ?its own database

Computer Science & Information Technology