Using MAXTASKS and MAX ERUS
search cancel

Using MAXTASKS and MAX ERUS

book

Article ID: 367616

calendar_today

Updated On:

Products

IDMS

Issue/Introduction

This article is an explanation of how the MAXIMUM TASKS (a.k.a. MAXTASKS) and MAX ERUS parameters in the System Generation SYSTEM statement are used.

Environment

Component: IDMS/DC
Environment: All supported releases.

Resolution

The confusion surrounding these two parameters is that they both have two meanings.

MAXIMUM TASKS as specified in the SYSTEM statement is a measure of how many online user tasks the system should be able to service at any one time. At run time, various other aspects of the system configuration result in this figure being increased to what is generally referred to as the "runtime MAXTASKS".

The value in MAX ERUS serves two purposes. It determines how many EREs the CV will allocate at startup for the servicing of external run-units. It is also one of the parameters added to the sysgen MAXIMUM TASKS value when calculating runtime MAXTASKS. MAX ERUS has a valid range of 0 to 1000, however, if it exceeds 255, then it contributes only 255 to the runtime MAXTASKS.

For example, an IDMS CV is generated with MAXIMUM TASKS 50 and MAXIMUM ERUS 200.

MOD SYS 1
    MAXIMUM   ERUS IS 200
    MAXIMUM TASKS IS 50.
GEN.

The command DCMT D ACT TASK shows this:

   D ACT TASK
             Current max tasks        295
            Times at max tasks          0
             Allocated DCE/TCE        295

The remaining 45 allocated DCE/TCE pairs are for system tasks for the various line drivers, one each for RHDCMSTR and RHDCDBRC, run-unit service drivers, and deadlock detection service drivers.

Although MAX TASKS and MAX ERUS are specified independently as far as the allocated DCE/TCE pairs are concerned, it is just a total amount and therefore online and external tasks can use any of the allocated pairs. For example, any of the 250 MAX TASKS + MAX ERUS can be used for online tasks.

Any IDMS task requires a DCE/TCE pair. If one is not available when a task is ready to start, it will wait until a currently running task ends, freeing up a pair for the new task to use.

External tasks also require an ERE. If one is not available when an external task is ready to start, an error-status of 1473 will be returned to the application program.

Avoiding 1473 abends

By increasing MAX ERUS and dynamically varying MAXTASKS down after startup, clients can ensure that there are always enough EREs available without increasing the overall workload. For example:

MOD SYS 1
    MAXIMUM   ERUS IS 300.
GEN.

After cycling the CV:

      D ACT TASK
             Current max tasks        350
            Times at max tasks          0
             Allocated DCE/TCE        350

Note that it is 350, and not the 50 + 300 + 45 = 395 that might be expected. This is because MAX ERUS can only contribute a maximum of 255 to the runtime MAXTASKS, even though the ERE total will be all 300.

Once the CV is up, vary it back down to the 295 that it was originally.

      VARY ACTIVE TASK MAX TASK 295
IDMS DC261007 V1 USER:XXXXXXX  MAX TASKS VARIED FROM 00350 TO 00295

And now:

      D ACT TASK
             Current max tasks        295
            Times at max tasks          0
             Allocated DCE/TCE        350

What this means is that the servicing of external run-units is limited only by MAXTASKS, not the number of EREs, and therefore 1473 abends should not be possible.