Task Resource Usage
Control Blocks that Manage Resources
Control Blocks that Manage Resources
The DC/UCF system uses control blocks to manage task usage of resources:
- Thetask control element (TCE)represents an active task. The TCE includes timer information for the task and serves as an anchor for all resources used by the task while it is running.
- Theresource control element (RCE)represents a resource in use by one or more tasks. The RCE contains the id of the task for which the RCE was created, indicates the number of tasks currently using the resource, and identifies the resource.
- Theresource link element (RLE)links a task to a resource. One RLE exists for each resource in use by a given task. The RLE contains a pointer to the next RLE used by the task.
The DC/UCF system allocates all TCEs, RCEs, and RLEs at startup using specifications stored by the system generation compiler. The compiler calculates the number of each type of element to be allocated, as follows:
Calculating the Number of TCEs
At startup, the system calculates the maximum number of tasks of all types that will be allowed to be active at any one given time. The system allocates that number of TCEs.
The number of TCEs is calculated to be equal to:
- The MAXIMUM TASKS value specified on the system generation SYSTEM statement.
- Plus the value specified by the MAXIMUM ERUS parameter of the system generation SYSTEM statement. If a value greater than 255 is entered, only 255 corresponding TCEs are included in the calculation. This prevents over-allocating memory below the 16 Mb line.
- Plus a value calculated for various system tasks. This value includes the following:
- Plus 1 for each line included in the system definition.
- Plus 2 for the system control tasks, MASTER and DBRC.
- Minus 1 for each line defined as an operator's console.
- Plus 1 for each pre-defined run unit included in the RUN UNIT clause of the SYSTEM statement.
- Plus 1 for the Deadlock Detection task.
- Plus 1 for the Printer task.
- Plus 1 (3 if running multi-tasking) if the LOG DATABASE clause of the SYSTEM statement as specified.
- Plus 3 if running as a member of a data sharing group.
- Plus 2 if Performance Monitor is active.
- Plus an indeterminate number which may be reserved for other miscellaneous system functions.
The maximum number of active TCEs can be modified at run time by using the DCMT VARY ACTIVE TASKS MAX TASK command.
For more information see the section "DCMT VARY ACTIVE TASK" in the
System Tasks and Operator Commands section.
Specifying RCEs and RLEs
The numbers of
RCEs and RLEsare specified by the RCE COUNT and RLE COUNT parameters of the system generation SYSTEM statement. You can specify explicit values in these parameters, or you can allow the compiler to calculate the values for you:
- The compiler calculates the number ofRCEsto equal 25 times the number of TCEs.
- The compiler calculates the number ofRLEsto equal 40 times the number of TCEs.
At startup, the system allocates the specified number of RLEs and RCEs above the 16 Mb line. When an executing CA IDMS system exhausts its primary allocation of RCEs and/or RLEs, it creates a secondary allocation in XA storage. The size of the secondary allocation is 25% of the value defined in the SYSTEM statement.
The following considerations apply to specifying the RCE COUNT and the RLE COUNT values:
- The number of RCEs and RLEs required to satisfy processing needs varies with the applications in use.
- For performance, secondary allocations of RCEs and RLEs should be avoided.
- Specifying too high a value for the RCE COUNT or RLE COUNT parameter results in wasted space.
For more information about the SYSTEM statement, see SYSTEM Statement.
The following figure illustrates the control blocks used to manage task resource usage.
Resource Management Control Blocks