Termination Detection



next up previous
Next: Polling the Task Up: Interface Description Previous: Dequeueing a task

Termination Detection

Termination is detected by the dequeue operation via the status code. It can also be checked by a separate primitive which performs no dequeue operation. Note that the programmer does not have to invoke these operations to start the termination detection protocol; it is performed in the background by the task queue.

We must know what constitutes the condition for termination before we can understand its use. Termination is confirmed when there is no task being processed or stored in the system, where the system includes the task queue and the work space of the processors.

The emptiness of the task queue (which includes the local partitions and the network) can be checked by the task queue runtime system. The work space of the processors, however, can only be checked by the programmer. For example, the programmer may use multi-threading to hide latency, and the task queue has no way of knowing that tasks are buffered. To solve this problem, the programmer uses a special primitive whose sole purpose is to inform the task queue runtime system that a processor is free of tasks.



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