Multi-threading in the administrative task scheduler

The administrative task scheduler uses a pool of execution threads that allow it to execute many tasks simultaneously.

The administrative task scheduler is multi-threaded. The administrative task scheduler starts the execution of scheduled tasks, and waits for the tasks to complete. The execution of a task is delegated by the administrative task scheduler to one of its sub-threads that starts the execution, waits until the execution completes, and gathers the execution status. Each sub-thread can be used for any type of task.

The maximum number of sub-threads is determined by the MAXTHD parameter of the started task, which by default is 99. Therefore, the administrative task scheduler can execute up to 99 tasks simultaneously. To reduce the memory usage of the administrative task scheduler, reduce the number of sub-threads by specifying a lower value for the MAXTHD parameter. You specify this parameter in the JCL of the started task. The JCL has the same name as the administrative task scheduler, as defined in job DSNTIJMV.

Figure 1. Multi-threading in the administrative task scheduler
Begin figure description. The administrative task scheduler uses multi-threading to simultaneously execute up to 99 different tasks. End figure description.

The minimum permitted value for the MAXTHD parameter is 1, but this value should not be lower than the maximum number of tasks that you expect to execute simultaneously. If there are more tasks to be executed simultaneously than there are available sub-threads, some tasks will not start executing immediately. The administrative task scheduler tries to find an available sub-thread within one minute of when the task is scheduled for execution. As a result, multiple short tasks might be serialized in the same sub-thread, provided that their total execution time does not go over this minute.

The parameters of the started task are not positional. Place parameters in a single string separated by blank spaces.

If the execution of a task still cannot start one minute after it should have started, the execution is skipped, and the last execution status of this task is set to the NOTRUN state. The following message displays on the operator's console.

DSNA678I csect-name THE NUMBER OF TASKS TO BE CONCURRENTLY 
EXECUTED BY THE ADMIN SCHEDULER proc-name EXCEEDS max-threads

If you receive this message, increase the MAXTHD parameter value and restart the administrative task scheduler.