In: Computer Science
Describe two advantages of using dynamically linked libraries in assembling executable program files.
Two advantages of using Dynamically Linked Libraries
(DLLs) in assembling executable program files:
* With respect to dynamic linking, shared code between two programs
is placed into a single, separate file.
* In the Microsoft Windows Operating System (OS) world, the
required library functions are embedded directly in a program's
executable binary file. The libraries remain saved and stored in
their own files and they are not copied into the executable.
* DLL and executable (EXE) files are independent of each other
until the output interface is changed, which means until the name,
parameters, return value type, and calling convention is changed.
Replacing a DLL file will not impact the EXE file, therefore this
improves the extensibility and maintainability.
* It acts as an "application extension", a software file
type.
* DLLs files in a system are the split, relatively independent,
incomplete executable applications. The corresponding DLL file gets
called when a program is executed. Multiple DLL files can be used
by an application and a single DLL file can be used by different
applications, so such DLL files become shared DLL files.
* Various program functions or sub-procedures implementation
process store DLL files in them, when the program wants to invoke
the function for loading the DLL, and later get the function's
address, and ultimately make the call.
* The programs need not load all the code at beginning of the run
but would need to run it when a program needs a function, for
removing it from the DLL.
* When DLL files are used, they reduce the volume of a
program.
* In general, DLLs facilitate promoting code modularization.
* DLLs helps in promoting code reuse.
* It also helps promote reduced disk space and efficient memory
usage.
* Using DLL could load OS and the programs faster, they could run
faster, and consume less memory space on the computer, thus
reducing memory requirements.
* Reduced maintenance costs and application support.
* Dynamic linking and loading are used by OSs for programming
language library functions.
* Assembly, being a collection of types and resource information,
built to work together and form a logical unit of functionality
includes- libraries (.dll files) to be used by other applications,
and executable application files, that can be run directly from
Windows without using any other programs (.exe files).