Thread program models

There are different models for creating multithread programs.

One of the key differences between i5/OS™ and other platforms is the ability of i5/OS to support a call-return program model. On other platforms, if one program wants to call another, it must start a second process to run the second program, or replace the first program with the second. Starting another process to call a program is expensive in terms of startup time and system resources. To avoid this expense, programmers group commonly used functions into dynamically linked libraries (DLLs). Whenever a program needs a service that a DLL provides, the program loads the DLL and calls the function that provides the needed service.

Although the i5/OS call-return program model is supported for multithreaded programs, you are strongly encouraged to use service programs or DLLs that run in the caller's activation group. If you perform ports of multithreaded programs from other platforms, you will naturally employ service programs in their port.

Although it is not a requirement, all programs used in a multithreaded application should be Integrated Language Environment® (ILE) programs. The use of the original program model (OPM) in multithreaded programs requires special considerations. You must evaluate the thread safety of existing ILE or OPM programs if multithreaded programs call them.

Related reference
Threads considerations for OPM language