Initialization overview
The program model describes three major constructs of a program structure. The constructs are:
- Process
- A collection of resources (code and data)
- Enclave
- A collection of program units consisting of at least one main and zero or more subroutines
- Thread
- The basic unit of execution and owner of a condition handler, a stack, and the machine state
Initialization provides services, which support the construction of the entities described in
this model. Brief descriptions of process, enclave, and thread initialization follow.
- Process Initialization
- Process initialization sets up the framework to manage enclaves and initializes those resources that can be shared among enclaves. It is during process initialization that the anchor vector is obtained and initialized. For more information, see Anchor support.
- Enclave Initialization
- Enclave initialization creates the framework to manage enclave-related resources and the threads that run within the enclave. For more information about enclaves, see Enclaves in z/OS Language Environment Programming Guide.
- Thread Initialization
- Thread initialization consists of the acquisition of a stack and the enablement of the condition manager for the thread.
Language Environment provides an interface under batch that establishes the three levels of the Language Environment program model. This interface is CEEINT. For the complete interface description of CEEINT, see CEEINT interface.
The first user routine to gain control within the enclave is designated as the main routine. If
user parameters are passed from the host system/subsystem, the user parameters are made available to
the main routine. By the time the main routine receives control, the following resources are
available:
- Stack storage
- Heap storage
- Condition handling
- Message services
- Math library