Library (computing): Difference between revisions

Content deleted Content added
m removed circular link
m remove self-link
Line 32:
Other operating systems resolve dependencies at runtime. For these systems, the executable calls an operating system API, passing it the name of a library file, a function number within the library and the function's parameters. The operating system resolves the import immediately and calls the appropriate function on behalf of the application. This type of dynamic linking is called ''runtime linking''. Because of the overhead added to each call, runtime linking is incredibly slow and negatively affects an executable's performance. As a result, runtime linking is rarely used by modern operating systems.
 
In dynamic linking the library, commonly referred to as a ''[[dynamic link library]]'' (DLL) or ''shared library'', is a pre-compiled and linked executable file which is stored separately on the computer's [[hard disk]]. It is loaded only when needed by an application. In most cases, multiple applications can use the same copy of the library at the same time and there is no need for the operating system to load multiple ''instances'' of the library into memory concurrently. In these cases, the libraries are stateless.
That is, any data which must be stored by the library is stored by the application(s) it is serving. For this reason, these dynamic libraries are considered ''in-process''.