##### 8.5.4.25 Partition Attribute Task_Pool

When multiple remote subprogram calls occur on the same partition, they are handled by several anonymous tasks. These tasks can be allocated dynamically or re-used from a pool of (preallocated) tasks. When a remote subprogram call is completed, the anonymous task can be deallocated or queued in a pool in order to be re-used for further remote subprogram calls. The number of tasks in the anonymous tasks pool can be configured by means of three independent parameters.

- The task pool minimum size indicates the number of anonymous tasks preallocated and always available in the PCS. Preallocating anonymous tasks can be useful in real-time systems to prevent task dynamic allocation.
- The task pool high size is a ceiling. When a remote subprogram call is completed, its anonymous task is deallocated if the number of tasks already in the pool is greater than the ceiling. If not, then the task is queued in the pool.
- The task pool maximum size indicates the maximum number of anonymous tasks in the PCS. In other words, it provides a way to limit the number of remote calls in the PCS. When a RPC request is received, if the number of active remote calls is greater than the task pool maximum size, then the request is kept pending until an anonymous task completes its own remote call and becomes available.

         REPRESENTATION_CLAUSE ::=
            for PARTITION_IDENTIFIER'Task_Pool use TASK_POOL_SIZE_ARRAY;

         TASK_POOL_SIZE_ARRAY ::=
           (NATURAL_LITERAL,  --  Task Pool Minimum Size
            NATURAL_LITERAL,  --  Task Pool High Size
            NATURAL_LITERAL); --  Task Pool Maximum Size

In order to have only one active remote call at a time, the task pool configuration is declared as follows:

         for Partition'Task_Pool use (0, 0, 1);