Monday, November 28, 2011

Linking vs. loading

Linking vs. loading:- 1.)Program loading: Copy a program from secondary storage into main memory so it's ready to run.
Loading just involves copying the data from disk to memory, or it involves allocating storage, setting protection bits, or arranging for virtual memory to map virtual addresses to disk pages.
2.) Relocation:-Relocation is the process of assigning load addresses to the various parts of the program, adjusting the code and data in the program to reflect the assigned addresses.
If a program is created from multiple subprograms, all the subprograms have to be loaded at non-overlapping addresses.
Linker creates a program from multiple subprograms, and create one linked output program that starts at zero, with the various subprograms relocated to locations within the big program.
#)Linker is a program that takes one or more objects generated by a compiler and combines them into a single executable program.

#)Loader is the part of an operating system that is responsible for loading programs from executables (i.e., executable files) into memory, preparing them for execution and then executing them.

No comments:

Post a Comment