Operating Systems - (Native) Libraries


libary in an OS application are called native library.

There is two types of OS library:

See shared vs static

Shared vs Static

Memory Footprint

  • Shared libraries can be used by any application software on the system without loading multiple copies into memory.
  • Static libraries copy the code directly into the application therefore growing every application by the size of all the libraries they use.

In most modern Unix-like systems, including Linux, programs are by default compiled to use shared library (so, dll)

Code versioning

  • Shared libraries have no built-in mechanism for backward compatibility. Minor changes may cause the application to crash.
  • Static libraries avoid this problem because the version that was used to build the application is included inside it, so even if a newer version exists elsewhere on the system, this does not affect the application.

Powered by ComboStrap