Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 32
Specifying Process Attributes and Resources
OUTPUT_LIST:$LEN(OUTPUT_LIST),
OUTPUT_LIST_LEN);
Sizing the TNS User Data Area
If you are creating a TNS process, you can use any of the following methods to specify
the number of pages of user data area that your new process can occupy:
The DATAPAGES compiler directive or pragma; see the appropriate compiler
manual for details.
The Binder program; see the Binder Manual for details.
The RUN command MEM option; see the TACL Reference Manual for details.
The MEMORY_PAGES field of the input parameter structure of the
PROCESS_LAUNCH_ procedure.
The compiler or Binder value sets the minimum number of data pages. You can
increase this number using the RUN command or the PROCESS_LAUNCH_
procedure, but you cannot reduce this number. The number that you supply is in disk
pages, which are 2048 bytes each. The actual amount of memory allotted to the user
data area is rounded up to the nearest multiple of the memory page size for your
system, which is 4 KB (or two disk pages) for NSR-L CPUs, and 16 KB (or eight disk
pages) for all other CPU types.
The following example uses the PROCESS_LAUNCH_ procedure to create a process
with five user data pages:
.
.
PARAM_LIST.MEMORY_PAGES := 5;
ERROR := PROCESS_LAUNCH_( PARAM_LIST,
ERROR_DETAIL,
OUTPUT_LIST:$LEN(OUTPUT_LIST),
OUTPUT_LIST_LEN);
On an NSR-L CPU (such as a K1000 system), 6*2048 bytes (or three memory pages)
will be allocated. For other CPUs, the memory page size is 16 KB, so 8*2048 bytes (or
one memory page) will be allocated.
The maximum number of data pages allowed is 64.
Sizing the Process File Segment
Another memory dimension you can set using the PROCESS_LAUNCH_ procedure is
the size of the PFS. You specify the PFS size in bytes using the PFS_SIZE field of the
input parameter structure.
One of the functions of the PFS is to provide space for managing files and DEFINEs.
The larger the PFS is, the more files the process can have open. The default PFS size
of 256 KB is enough for most processes. However, if you get a file system error 31 or