Dynamic Loader
While executing a process, the entire program and the required process data should be present in the physical memory which in terms limits the process size with the size of physical memory. For proper utilization of physical memory, dynamic loader comes in picture.
- The dynamic loader is a program that loads the program into the main memory on demand.
- Dynamic loader loads only the required code an data by the program and leaves the rest part in the executable file.
- Dynamic loader resolves all the external dependencies and the entire process is known as dynamic linking.
- Dynamic loader is very useful when a large amount of data need to handled in the efficient manner.
Features of Dynamic Loader
- On-demand Loading: Dynamic loaders load program modules into memory as they’re needed throughout runtime. This means that best the important modules are loaded into memory when required.
- Runtime Linking: The method of linking external dependencies takes place in the course of runtime.
- Reduced Memory Footprint: Dynamic loaders can reduce memory usage by using loading most effective the required modules into memory.
- Dynamic Updates: Dynamic loaders help dynamic updates to this system throughout runtime. New modules or variations of modules can be loaded and related with out restarting this system.
- Support for Shared Libraries: Dynamic loaders are generally used in structures with shared libraries, allowing a couple of packages to proportion code in memory.
Advantages of Dynamic Loader
- Dynamic loader is very much memory efficient as it loads only the necessary data and code for the execution.
- Dynamic loader is very much flexible because it can adapt the changes in the program’s requirement at dynamic environment.
- Dynamic loader can reduce the executable file size by excluding the libraries and dependencies from the binary.
Disadvantages of Dynamic Loader
- Dynamic loader is more complex and it is difficult to implement.
- Dynamic loader is having high overhead as it resolves all the external dependencies at run time.
- Dynamic loader takes longer time to load the program in the memory.
- Dynamic loader is portable as it is not platform independent. It may not work in all the platform because of dynamic linking mechanism.
- Dynamic loader is less reliable because it resolves the external dependencies in runtime which may sometimes lead to error.
Static and Dynamic Loader in Operating System
An Operating system is the critical component for managing the various memory resources in the computer system. One of the essential tasks of the operating system is to manage the executable programs or applications in the computer system. A program needs to be loaded into the memory for the purpose of execution. For the execution context, the loader comes into the picture.
Contact Us