Open System Services Programmer's Guide
Process Resources
All resources of a process—for example, open files or memory—are either global or private, as
shown in Table 66. Private resources can be accessed only by a specific thread. Global resources
can be accessed by all threads. Access to global resources by threads should be synchronized
using mutex or condition variables.
Table 66 Process Resources
DescriptionTypeResource
The memory where all thread-local variables are storedPrivateThread stack
The address of the instruction that the thread is about to executePrivateThread program counter
The data maintained by the threads library on behalf of a thread;
contains the per-thread signal mask, which is used by the
pthread_kill() function
PrivateThread context
Includes process and module global resourcesGlobalAll external data
GlobalAll static internal variables
GlobalHeap
Includes file and record locksGlobalFile descriptors and file
state
GlobalSQL cursors
GlobalEnvironment variables
The per-thread signal mask, used by the pthread_kill(),
sigaction(), sigwait(), sigmask(), and sigsuspend()
functions
PrivateSignal mask
The stack that is used to run the signal handlerGlobalSignal stack
Numerical Limits in the POSIX User Thread Model Library
Protected Stack Limits
The PUT Model library uses a protected stack for signals (see “The Protected Thread Stack for
Signals” (page 387)) and defines these symbolic constants related to the protected and unprotected
stacks:
ValueDescriptionSymbolic Constant
33554432Maximum number of bytes available for
the (unprotected) thread stack.
PTHREAD_STACK_MAX_NP
16777216Maximum number of bytes available for
the protected stack.
PTHREAD_STACK_MAX_PROTECTED_STACK
49152Minimum number of bytes available for the
protected stack.
PTHREAD_STACK_MIN_PROTECTED_STACK
Limits Imposed by the Standard
Table 67 lists numerical limits imposed by the standard implementation. The symbolic constants
listed in the table are defined in limits.h with the values shown in the table. These symbolic
constants refer to the most restrictive value for each feature.
Process Resources 383