Availability Guide for Application Design
What Is Application Availability?
Availability Guide for Application Design—525637-004
1-13
Support For Dynamic Linked Libraries
•
A DLL can appear in different virtual addresses in different processes.
•
Multiple processes can use different versions of the same DLL simultaneously.
•
The same program can run simultaneously in different processes with different
DLLs.
•
A new version of a DLL can be introduced without altering a program or DLL that
references it. In the case of an SRL the same entry points in the same order would
be required. In the case of a DLL you may add functions anywhere as long as you
continued to supply the existing set of functions as well.
•
A program and DLLs can reference each others functions and data by simply
referencing the symbols that represent them.
•
The obvious dynamic advantage; a running program can dynamically load a DLL
and reference it.
Position-independent code (PIC) is required before you can construct a DLL. All parts
of your program, all libraries and DLLs must be PIC. At minimum, this means you must
recompile all source code using the new PIC option of nmc (the native mode TNS/R
compiler) in NSK, or use the ETK cross-compiler if operating in a PC environment.
TNS/E operates solely on PIC so all programs must be PIC to run on H-series
systems. TNS/E systems use a different compiler and linker than TNS/R systems do.
Further detailed information about DLLs and PIC can be found in the Programmer’s
Guide to DLLs on TNS/R Systems or the Programmer’s Guide to DLLs on TNS/E
Systems.
Dynamic Loading of Libraries is Not Compatible With
Passive Backup.
“Passive backup” refers to the paradigm in which the backup process runs inside the
Guardian procedure CHECKMONITOR, applying changes specified by actions in the
primary. Guardian functions CHECKPOINTX and CHECKMANYX cause transfer of
specific areas of memory, and optionally of stack frames and a program's global data.
Other functions (such as FILE_OPEN_CHKPT_ and
SEGMENT_ALLOCATE_CHKPT_ ) cause CHECKMONITOR to perform actions (such
as open a file or create a segment) equivalent to those already done in the primary by
calling the corresponding function (FILE_OPEN or SEGMENT_ALLOCATE). There are
no analogous facilities to call dlopen() or dlclose() in the primary and have the backup
follow suit.
By contrast, “active backup” has user-written code running in the backup, receiving
updates from the primary and performing appropriate actions. A program could convey
the necessary information to its backup to have the backup perform dynamic loading
and unloading.
This is no regression for DLLs on TNS/R because there has never been dynamic
loading before. The position is consistent with others taken in the past, most notably