HP OpenVMS Systemsask the wizard |
The Question is: When the PQL_MBYTLM is set to 100000, why does a $GETJPI or F$GETJPI show the BYTLM for a process as being some value below 100000 ? (eg. 98000). The Answer is :
For all process quotas except BYTLM, there is a "xxxLM" value and a
"xxxCNT" value. The xxxLM value is a constant determined from the
system authorization file and/or the PQL SYSGEN parameters and/or
the values specified when the process was created. The corresponding
"xxxCNT" value is debited and credited as the resource is consumed
and released.
BYTLM is different. For non-paged pool, the resource controlled by
BYTLM, there are two classes of allocation: "permanent" and "transient".
For "transient" allocations, like buffered I/Os, BYTCNT is debited when
memory is allocated and credited when the I/O completes and the memory
is released.
For "permanent" (more precisely, "long term") allocations, like the
creation of mailboxes, the allocation is debited from BOTH BYTCNT and
BYTLM. When the mailbox is deleted, both values are credited.
There is a field in the JIB -- JIB$L_ORG_BYTLM -- which stores the
original value of BYTLM for the process. In your example case, the
ORG_BYTLM value will be 100000. If BYTLM is 98000, that indicates
that the process has 2000 bytes of NPAGEDYN on long term allocation.
There is no $GETJPI item to return JIB$L_ORG_BYTLM for a process. It
can be examined from SDA by formatting the JIB. For example:
$ ANALYZE/SYSTEM
SDA> READ SYSDEF
%SDA-I-READSYM, 9243 symbols read from SYS$COMMON:[SYS$LDR]SYSDEF.STB;1
SDA> SET PROCESS/INDEX=pid
SDA> FORMAT JIB
FFFFFFFF.80EBB240 JIB$L_MTLFL 80EBB240 JIB
FFFFFFFF.80EBB244 JIB$L_MTLBL 80EBB240 JIB
...
FFFFFFFF.80EBB260 JIB$L_BYTCNT 0001B880
FFFFFFFF.80EBB264 JIB$L_BYTLM 0001BB00
FFFFFFFF.80EBB268 JIB$L_PBYTCNT 00000000
...
FFFFFFFF.80EBB2B4 JIB$L_ODAYHOURS 00000000
FFFFFFFF.80EBB2B8 JIB$L_JOBTYPE 00000000
FFFFFFFF.80EBB2BC JIB$L_FLAGS 00000000
FFFFFFFF.80EBB2C0 JIB$L_ORG_BYTLM 00020000
FFFFFFFF.80EBB2C4 JIB$L_ORG_PBYTLM 00000000
FFFFFFFF.80EBB2C8 JIB$L_JTQUOTA 00000000
JIB$C_LENGTH
SDA> EVALUATE 00020000
Hex = 00000000.00020000 Decimal = 131072 CPU$M_IO_START_AFF
SDA> EVALUATE 0001BB00
Hex = 00000000.0001BB00 Decimal = 113408 CSP+1BB00
SDA> EVALUATE 0001B880
Hex = 00000000.0001B880 Decimal = 112768 CSP+1B880
In this case, the original BYTLM value is 131071, BYTLM is 113405, and
BYTCNT is 112768. This indicates that there are 640 bytes outstanding
in "short term" allocations and 17664 bytes in "long term" allocations.
|