Although the z/OS operating system has the ability to dispatch multiple threads of execution, it is different from the POSIX definition. To compare the two, you must first understand the meaning of some key C and POSIX constructs.
-
Heap
- The area of memory from which dynamic storage is allocated using the ANSI memory allocation routines like malloc(), calloc(), free(), and so on. Static Area
- The area of memory where global variables (variables declared outside the scope of the main() program or outside the scope of any subroutines) and string constants (string values that appear within double quotation marks within a program) are stored. Variables that are declared static within the scope of a subroutine are also stored in this area. Stack
- The area of memory used for parameter passing and for storing automatic variables (variables defined within the scope of main() program or any subroutine). Process
- A single program that consists of one main() program and any number of subroutines. Each process has its own heap and static area. Thread
- A subroutine dispatched as a separate executable entity from the main() program (which itself is also a thread). task
-
A TASK (in z/OS) is a unit of execution. POSIX threads, as used by DCE, are mapped to z/OS tasks (TCBs). These mappings occur in two flavors:
- heavy weight pthread creation is the same as task creation, and pthread deletion is the same as task deletion (TCB DETACH). z/OS resource managers are run.
- medium weight pthread creation is an association of a thread with an existing z/OS TCB on a one-for-one basis. pthreaddeletion ends this association; the z/OS task is not DETACHed and z/OS resource managers are not run.