What Is A System Library

Table of contents:

What Is A System Library
What Is A System Library

Video: What Is A System Library

Video: What Is A System Library
Video: What are libraries | Linux 2024, May
Anonim

In a general sense, a system library is a repository of data used by operating systems or application software during operation or compilation.

DLL - dynamic system library
DLL - dynamic system library

System libraries contain commonly used subroutines and functions. With regard to programming, libraries store common classes for working with graphics, arrays, dialogs, and more.

The concept of a system library applies both to individual programs and to operating systems as a whole, and this applies to families of both Windows, UNIX, and Mac.

The definition of "library" first appeared in 1951 in the book by M. Wilkes, D. Wheeler and S. Gill "Programming for electronic calculating machines"

According to the principle of operation, system libraries are divided into dynamic and static.

Dynamic libraries

Dynamic link libraries are a component that is loaded into memory when requested by a running program. Thus, there is no need to copy the subroutine code into each application - the most common functions are stored as a library.

In addition, the library loaded into RAM can be used simultaneously by several applications, which saves system resources. This was especially true in the early days of computing.

Dynamic Link Library files in Windows OC have the extension.dll (Dynamic Link Library) and are stored in the system32 directory. Similar components in UNIX-like systems are called shared objects and have the extension.so, in Mac OS -.dlyb.

Maurice Wilkes et al. Gave the following definition of a library - a short, pre-prepared program for individual, frequently encountered (standard) computational operations.

It was not possible to obtain all the advantages of a modular approach to program execution. This is due to the phenomenon known as DLL hell, in which the program requests simultaneously different versions of the same library (DLL). This leads to failures and reduced reliability of the OS.

In modern operating systems of the Windows family, in order to avoid conflicts, the use of different versions of libraries is allowed, which increases reliability, but contradicts the very principle of modularity.

Static libraries

Static libraries also store subroutine and function codes, but unlike dynamic ones, they are used when compiling programs. That is, the entire required code is included in the program. The application becomes standalone, independent of dynamic libraries, but grows in size.

As a rule, on Windows, files of such libraries have the.lib extension, on UNIX-like systems -.a.

Working with most compiled languages, for example, C, C ++, Pascal, is impossible without static libraries.

Recommended: