Benefits of dynamic linkage of libraries, Operating System

Assignment Help:

Q. What are three benefits of dynamic (shared) linkage of libraries compared to static linkage? What are two situations where static linkage is preferable?

Answer: The primary benefits of shared libraries are that they decrease the memory and disk space used by a system and they enhance maintainability.

When shared libraries are being utilized by all running programs there is only one instance of every system library routine on disk and at most one instance in physical memory. When the library in question is one utilized by many applications and programs then the disk as well as memory savings can be quite substantial. Additionally the start-up time for running new programs can be summary since numerous of the common functions needed by that program are likely to be previously loaded into physical memory.

Maintainability is as well a most important advantage of dynamic linkage over static. If all running programs utilize a shared library to access their system library routines then upgrading those routines whichever to add new functionality or to fix bugs can be complete simply by replacing that shared library. There is no requirement to recompile or re-link any applications several programs loaded subsequent to the upgrade is complete will automatically pick up the new versions of the libraries.

There are other benefits too. A program that uses shared libraries can frequently be adapted for specific purposes merely by replacing one or more of its libraries or even (if the system allows it and most UNIXs including Linux do) adding a new one at run time. For instance a debugging library can be substituted for a normal one to trace a problem in an application. Shared libraries as well allow program binaries to be linked against commercial proprietary library code without essentially including any of that code in the program's final executable file. This is significant because on most UNIX systems several of the standards shared libraries are proprietary as well as licensing issues may prevent including that code in executable files to be distributed to third parties.

In some places nevertheless static linkage is appropriate. One example is in rescue environments for system administrators. If a system administrator makes a fault while installing any new libraries or if hardware develops problems it is quite probable for the existing shared libraries to become corrupt. Consequently frequently a basic set of rescue utilities are linked statically therefore that there is an opportunity to correct the fault without having to rely on the shared libraries functioning correctly.

There are as well performance advantages that sometimes make static linkage preferable in special cases. For a start dynamic linkage does raise the start up time for a program as the linking should now be done at run time rather than at compile time. Dynamic linkage can as well sometimes raise the maximum working set size of a program (the total number of physical pages of memory necessary to run the program).

In the shared library the user has no control over where in the library binary file the variety of functions reside. Since most functions don't precisely fill a full page or pages of the library loading a function will frequently result in loading in parts of the surrounding functions too. With static linkage absolutely no functions that aren't referenced (directly or indirectly) by the application require to be loaded into memory.

Other issues surrounding static linkage comprise ease of distribution: it is simpler to distribute an executable file with static linkage than with dynamic linkage if the distributor isn't certain whether the recipient will have the correct libraries installed in advance. There may as well be commercial restrictions alongside redistributing some binaries as shared libraries. For instance the license for the UNIX Motif graphical environment allows binaries using Motif to be distributed freely as long as they are statically linked however the shared libraries may not be utilized without a license.


Related Discussions:- Benefits of dynamic linkage of libraries

Explain the threadswitchwithdelay function used in netware, Explain the Thr...

Explain the ThreadSwitchWithDelay Function used in Netware ThreadSwitchWithDelay( )   This command is used when threads are waiting for an event or resource but don't want t

Explain the circumstances under which os use mutexes, Q. Give the reasons ...

Q. Give the reasons why Windows XP, Solaris and Linux implement multiple locking mechanisms. Explain the circumstances under which they use mutexes, spinlocks, semaphores, adaptiv

Comparison of disk scheduling algorithms, COMPARISON OF DISK SCHEDULING ALG...

COMPARISON OF DISK SCHEDULING ALGORITHMS Name      Description                  Remarks      (Selection according to requestor)   RSS        Random scheduling     fo

Write a brief note on demand paging, Write a brief note on demand paging. ...

Write a brief note on demand paging. A demand paging is alike to a paging system with swapping. The Processes reside on the secondary memory while we want to implement a proces

Information system can be divided into three task areas, From hardware pers...

From hardware perspective, every information system can be divided into three task areas Presentation, Application Logic and Data Storage. The R/3 Basis software is extremely s

List post-installation procedures that need to be performed, Problem: (...

Problem: (a) Based on your experience in setting up Windows 2003 Server operating system, briefly describe the twelve different steps in which the installation is conducted du

Explain the beginthread function used in the netware, Explain the BeginThre...

Explain the BeginThread Function used in the NetWare example code BeginThread(MyThread Function, stack,size, arg) BeginThread creates a thread and places it on the NetWar

FUNDAMENTAL OF OS, WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVI...

WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVICES PROVIDE BY OS

Perl script, Write a Perl script assignGrades.pl to assign letter grades to...

Write a Perl script assignGrades.pl to assign letter grades to the students.

Define the features to implement top down parsing, Define the features are ...

Define the features are needed to implement top down parsing                      Source string marker, Prediction making mechanism and Matching and Backtracking mechanism

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd