The time to load a POSIX program depends mainly on the size of the program. Loading usually accounts for at least 35% (approx.) of the total processing time. For the most part this is due to the library accesses in DMS/PLAM which are run at the request of BLS. Program loading times can be considerably reduced by using DAB but only when all the libraries involved in the loading process are actually included in the process.
The POSIX loader was developed as an alternative to the DAB method. It does not use libraries but instead ready-to-run core images in the memory once loading has been completed. The core images are saved in program caches and copied to the memory for any further processing. In comparison with BLS without DAB, POSIX decreases loading times by up to 80%; in comparison with BLS with DAB, loading times are decreased by up to 65%.
The figure below shows the standardized loading times of the example program snet in POSIX in comparison with the other methods.
The POSIX loader offers the additional advantage of being able to buffer programs of the UFS file system to specific needs, i.e. they can be temporarily stored as system global, user-specific or session-specific.
The POSIX loader is a component of the POSIX subsystem and consists of two parts:
Privileged part
This part can be administered by the super user only. This is a global program cache, scaled and designed to store ready-to-run core images of POSIX programs. These core images are either stored automatically into the program cache during the first call of a POSIX program from one of the defined libraries („implicit linker process“) or can be stored explicitly by a super user using the posdbl -b command. The global program cache is available to all users for loading a stored program.
Non-privileged part
This part can be used by any user. It can be used to create user-specific program caches administered by users themselves. The scope of a user-specific program cache is either
USERWIDE all processes of an user ID are connected, or SESSIONWIDE
all processes of a session are connected.
Core images are saved in user-specific program cache with the aid of the pdbl command. The user-specific program caches are given priority in the loading of saved programs. If none of the caches contains a core image corresponding to a program, the program will be loaded in the usual way via BLS.
Use of the POSIX loader consists of the following steps:
Initialization (setting up a program cache)
The global program cache can be set up in two ways:
When the value of the DBLPOOL parameter in the POSIX information file is greater than 0, the global program cache is set up automatically with the relevant size (in MB) when the subsystem is started.
When DBLPOOL value is 0, the global program cache can be set up using the posdbl command and with the size defined beforehand in the usp command.
The user-specific program caches are set up by the current user with the aid of the pdbl command.
Linker process (creating a core image)
The program is loaded and the core image is copied to the program cache with the aid of the posdbl command or the pdbl command. For the global program cache, an implicit linker process is triggered by the POSIX kernel via the system call exec().
Loader process (loading and starting a core image)
Program caches are searched for a core image. The core image is copied and stored to memory when the system call exec() is run by the POSIX kernel.
Administration (administering program caches)
Program caches are activated and deactivated with the posdbl and pdbl commands. These commands can also be used to query the status, to list and delete core images and to delete complete program caches. User-specific program caches are resolved with the pdbl command.
A core image loaded from the program cache will not necessarily function correctly if it makes an attempt during the loading to dynamically reload a program segment.