General
Application area: | Starting, interrupting and terminating; see "Starting, interrupting and terminating" |
Macro type: | Type S, MF format 1: standard/E/L form; see "S-type macros" |
Macro description
By means of the TINF macro the user can read or modify
the run priority of the task
the task attribute
the parameters for deactivation prohibition on the task
in accordance with the values laid down in the user catalog.
It is also possible for the calling task to join or to leave an affinity task group.
Tasks which frequently require write access to the same data are said to be affined to one another. This common data can be located either in the system address space (which is used by all tasks) or in the user address space within common memory pools. Such tasks can be grouped together to form an affinity task group.
However, a task can only ever be assigned to a single task group (or to no task group). The functionality of affined task groups is implemented by the TANGRAM subsystem (see also the “Introduction to System Administration” [10 (Related publications)]).
Macro format and description of operands
TINF |
ACCESS=R / W [,DEACT=Y / N] [,DWTR=Y / N] [,DSSR=Y / N] [,TPRYAD=addr / (r)] [,TTYPAD=addr / (r)] [,TGAFF=Y / N,TGIDAD=addr / (r)] [,PROCNAD=addr / (r)] [,PARMOD=24 / 31] [,MF=L / (E,..)] |
ACCESS=
Controls the read/write function of the operands TPRYAD and TTYPAD.
R
The data is transferred to the specified fields.
W
The data is transferred from the specified fields to the TCB.
DEACT=
Specifies whether or not a task can be deactivated in the following cases:
the utilization of system capacity (CPU, memory, paging rate) is very high.
the task assumes particular wait states or remains in these (see the DWTR operand). If the DWTR operand is also specified, its setting has priority.
because of the system services it has used so far the task is available for deactivation (see the DSSR operand). If the DSSR operand is also specified, its setting has priority.
Y
The task can be deactivated.N
The task is not to be deactivated. It can still be deactivated for other reasons (e.g. VPASS macro with a wait time of over 500 ms).
DWTR=
Specifies whether a task can be deactivated in the following cases:
It assumes particular, longer-lasting wait states, e.g. because of a PASS.
It remains longer in an active wait state, e.g. after a SOLSIG with COND=UNCOD or after a MSG7X/TYPIO with REPLY.
Y
The task may be deactivated.N
The task is not to be deactivated.
DSSR=
Specifies whether a task can be deactivated after having used a certain amount of system services (e.g. CPU time).
Y
The task may be deactivated.
N
The task is not to be deactivated.
TPRYAD=
Indicates the run priority of the task.
addr
Address of a one-byte field containing the run priority value.
For ACCESS=R the run priority of the task is transferred from the TCB into the specified field. For ACCESS=W the run priority is transferred from the specified field into the TCB.
(r)
Register containing the address value “addr”.
TTYPAD=
Specifies the task attribute.
Values for the task attribute:
TTYPTP EQU X'81' transaction job TTYPIACT EQU X'40' interactive job TTYPPB EQU X'20' batch job
With ACCESS=R the job type is transferred to the specified field. With ACCESS=W the task attribute is transferred from the specified field to the TCB.
addr
Address of a one-byte field containing the value for the task attribute.
(r)
Register containing the address value “addr”.
TGAFF=
Specifies whether the calling task wishes to join or leave an affinity task group.This operand must be specified in conjunction with TGIDAD.
Y
The task joins the task group whose task group ID is in the field addressed by TGIDAD or, if the field contains zero, a new task group. If a new task group is set up, the new task group ID is returned in the field addressed by TGIDAD.
N
The task leaves the group whose task group ID is in the field addressed by TGIDAD. If the task leaving is the last in its task group, that task group is deleted and the task group ID is set to zero in the field addressed by TGIDAD.
TGIDAD=
Designates the task group ID address for the calling task.
This operand may only be specified in conjunction with TGAFF.
addr
Symbolic address of a 4 byte field containing the task group ID.
(r)
Register containing the address value of addr.
PROCNAD=
Provides the following information:
Is the calling task assigned to an affinity task group?
If so, how many CPUs are currently assigned to this task?
How many CPUs is the system currently using?
addr
Symbolic address of a 4 byte field.
The first 2 bytes contain the number of CPUs on which the task may currently run.The second 2 bytes contain the total number of CPUs currently available.If the calling task is not assigned to a task group or if the TANGRAM subsystem is not loaded, both sub-fields contain the same figures.(r)
Register containing the address value of addr.
MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see section “S-type macros”. The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
PARMOD=
Controls macro expansion. Either the 24-bit or the 31-bit interface is generated.
If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default setting for the assembler (= 24-bit interface).
24
The 24-bit interface is generated. Data lists and instructions use 24-bit addresses (address space <= 16 Mb).
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses (address space <= 2 Gb). Data lists start with the standard header.
Notes for affinity task groups
When a task joins a task group, a memory pool must already have been set up so that the field designated with TGIDAD can be placed in an area accessible to all the tasks in the application. This field must be initialized with zero. The first task then sets up the group on joining, and all the other tasks just join the existing group.
BS2000 takes over when it comes to synchronizing joining procedures.The second task to join (chronologically speaking) is only processed when the first has been successfully joined and the new group ID has been returned.
Return information and error flags
During macro processing, register R1 contains the operand list address.
R15:
+---------------+ | | | | | | | | | | | |a|a| +---------------+
A return code relating to the execution of the TINF macro is transferred in the rightmost byte of register R15.
X'aa' | Meaning |
X'00' | The macro was executed successfully. |
X'04' | Invalid operands have been specified. At least one required function has not been |
X'08' | The field designated with TGIDAD does not contain a valid group ID for the task. |
X'10' | For at least one function there is no authorization. |
X'0C' | The task wishing to join a task group already belongs to another task group. |
X'14' | The task wishing to leave (TGAFF=N operand) does not belong to a group. |
X'18' 1 | Up to 65535 task groups can be joined. This limit has been exceeded. |
X'1C' 1 | Internal TANGRAM error. Function has not been fully executed. |
X'20' 1 | Internal TANGRAM administration function (TANGBAS subsystem) unavailable. |
1When this return code occurs, applications (e.g. database retrieval) can be continued
Example
The TINF macro transfers run priority, task attribute and information to an area in the user program:
TINF START PRINT NOGEN TINF AMODE ANY BALR 3,0 USING *,3 CHKOUT1 TINF TPRYAD=PRI,TTYPAD=TYPE,PROCNAD=INFO, * TGAFF=N,TGIDAD=AFFINI,PARMOD=31 —————————————————————— (1) CHKIN TINF TGAFF=Y,TGIDAD=AFFINI,PARMOD=31 —————————————————————— (2) CHKOUT2 TINF TGAFF=N,TGIDAD=FALSE,PARMOD=31 ——————————————————————— (3) CHKOUT3 TINF TGAFF=N,TGIDAD=AFFINI,PARMOD=31 —————————————————————— (4) END TERM * **** Definitions **** PRI DS L1 TYPE DS L1 INFO DS F AFFINI DC X'00000000' FALSE DC X'08150815' END
Runtime log:
/start-assembh % BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED % ASS6010 <ver> OF BS2000 ASSEMBH READY //compile source=*library-element(macexmp.lib,tinf), - // compiler-action=module-generation(module-format=llm), - // module-library=macexmp.lib, - // listing=parameters(output=*library-element(macexmp.lib,tinf)), - // test-support=*aid % ASS6011 ASSEMBLY TIME: 283 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS % ASS6006 LISTING GENERATOR TIME: 79 MSEC //end % ASS6012 END OF ASSEMBH /load-executable-program library=macexmp.lib,element-or-symbol=tinf, - / test-options=*aid % BLS0523 ELEMENT 'TINF', VERSION '@' FROM LIBRARY ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS % BLS0524 LLM 'TINF', VERSION ' ' OF '<date> <time>' LOADED /%in chkin /%in chkout2 /%in chkout3 /%in end /%r STOPPED AT LABEL: CHKIN , SRC_REF: 40, SOURCE: TINF , PROC: TINF /%d %15 %xl, pri %xl1, type %xl1, affini %xl;%r ——————————————————————— (1) *** TID: 00AF0265 *** TSN: 6WPP ********************************************* CURRENT PC: 00000024 CSECT: TINF **************************************** %15 = 00000014 .... V‘0000007A‘ = PRI + #‘00000000‘ 0000007A (00000000) D2 K V‘0000007B‘ = TYPE + #‘00000000‘ 0000007B (00000000) 40 V‘00000080‘ = AFFINI + #‘00000000‘ 00000080 (00000000) 00000000 .... STOPPED AT LABEL: CHKOUT2 , SRC_REF: 59, SOURCE: TINF , PROC: TINF /%d %15 %xl, affini %xl;%r ———————————————————————————————————————————— (2) CURRENT PC: 00000038 CSECT: TINF **************************************** %15 = 00000000 .... V‘00000080‘ = AFFINI + #‘00000000‘ 00000080 (00000000) E3C70021 TG.. STOPPED AT LABEL: CHKOUT3 , SRC_REF: 78, SOURCE: TINF , PROC: TINF /%d %15 %xl, false %xl;%r ————————————————————————————————————————————— (3) CURRENT PC: 0000004C CSECT: TINF **************************************** %15 = 00000008 .... V‘00000084‘ = FALSE + #‘00000000‘
00000084 (00000000) 08150815 .... STOPPED AT LABEL: END , SRC_REF: 96, SOURCE: TINF , PROC: TINF /%d %15 %xl, affini %xl;%r ———————————————————————————————————————————— (4) CURRENT PC: 00000060 CSECT: TINF **************************************** %15 = 00000000 .... V‘00000080‘ = AFFINI + #‘00000000‘ 00000080 (00000000) 00000000 ....
(1) | The task should be logged off from the affinity task group with the task group ID (X'00000000') in the |
(2) | The task logs on to a newly set up affinity task group (field |
(3) | The task is to be logged off from the affinity task group with the task group ID (X'08150815') located in the |
(4) | The task is to be logged off from the affinity task group with the task group ID (X'E3C70021') in the |