Creating Task Queues



next up previous
Next: Enqueueing a Task Up: Interface Description Previous: Interface Description

Creating Task Queues

A large application may use multiple task queues for storing different types of tasks, and each task queue may reside on a subset of all available processors. Therefore, when creating a task queue, the programmer must specify the range of processors on which the task queue can be accessed.

The programmer must also specify the size of a task when creating a task queue. Using a uniform task size allows more efficient implementation of accesses. Note that the structure of a ``task'' is not visible to the task queue; the task queue simply treats each task as an array of bytes, which is to be interpreted by the computational part of the program. We do recommend, however, that the programmer put the handle (pointer) of a task on the task queue instead of the putting the task itself (which can be quite large). This is because tasks may be migrated more than once by the task queue, and larger tasks cause more overhead for migration.

The programmer can also supply optional parameters to choose a particular configuration of the task queue. The current task queue implementation allows several configurations for load balancing purposes (details in Section 3).

The create operation must be called by all processors, one of which is then designated as the ``manager'' of that task queue for termination detection (details in Section 4). The create operation returns unique id as the handle of the task queue.



Boris Vaysman
Fri Mar 22 13:38:23 PST 1996