Which of the following is NOT an advantage of using shared, dynamicall...
In Non-Shared (static) libraries, since library code is connected at compile time, the final executable has no dependencies on the the library at run time i.e. no additional run-time loading costs, it means that you don’t need to carry along a copy of the library that is being used and you have everything under your control and there is no dependency.
View all questions of this test
Which of the following is NOT an advantage of using shared, dynamicall...
Advantage of using shared, dynamically linked libraries:
Advantages of using shared, dynamically linked libraries over statically linked libraries include:
Smaller sizes of executable files:
- Shared libraries are loaded into memory only once, regardless of how many programs are using them, leading to smaller executable file sizes.
- This reduces disk space and memory usage, which can be beneficial for systems with limited resources.
Lesser overall page fault rate in the system:
- Shared libraries allow multiple programs to share the same code in memory, reducing the overall page fault rate in the system.
- This is because the code is loaded once and shared among multiple processes, reducing the number of page faults and improving system performance.
Existing programs need not be re-linked to take advantage of newer versions of libraries:
- One of the advantages of shared libraries is that existing programs do not need to be re-linked to take advantage of newer versions of libraries.
- This allows for easier maintenance and updates, as new versions of libraries can be installed without requiring changes to existing programs.
Explanation for the NOT advantage:
Faster program startup:
- One disadvantage of using shared, dynamically linked libraries is that they can lead to slower program startup times compared to statically linked libraries.
- This is because the dynamic linker needs to resolve and load the shared libraries at runtime, which can introduce overhead and increase startup time.
- In contrast, statically linked libraries are included in the executable file, leading to faster program startup times as all the required code is already present in the executable.