Model One — Empowerment

In this model, the main task registers for inbound allocate requests and attaches one or more subtasks to handle each conversation.

Figure 1 shows this type of multi-tasking server. In this case, the server registers for two different TP names (Steps 1 and 2), and dedicates two of its three subtasks to handling allocate requests from TPA. The main task attaches a third subtask to handle requests from TPB. The main task passes the allocate queue tokens it received from Register_For_Allocates (AQTOKEN1 and AQTOKEN2) to the subtasks so that they can begin processing requests from each allocate queue.

When invoked, each subtask calls the Receive_Allocate service (Steps 3 through 5), specifying the allocate queue token it received from the main task. Each subtask can now process requests from the appropriate allocate queue.

At the end of server processing, the main task unregisters from its allocate queues (Step 6).

Figure 1. Example of a Multi-tasking Server Address Space
Example of a Multi-tasking Server Address Space