Friday, June 17, 2011

Loaders - 2

Well, let's go into the boring facts of loader, which you need to learn even if you are unwilling.I'll try to make them interesting though



There are three main types of loaders.Their names and definetions are as follows :

Absolute Loader : As the name itself says, it does nothing other than loading

Relocating Loader : This loader, helps in the relocation of program in main memory (just in case a program needs to be moved up and down in memory)

Generally this task is performed by Assembler, but here relocating loader takes care of that



Direct Linking Loader : This loader, helps in loading the linked subroutines dynamically.It means that if a program is made from a lot of sub routines, each subroutine is treated as a separate program that needs to be loaded as and when linked or needed.

Also remember, there are four main tasks of a loader


Allocation - Allocate space in main memory for program

Linking - Join the linked subroutines to the program

Relocation - Change the mnemonics, that change with their location

Loading -Loading the program to main memory in the allocated space


Let's take a quick look of our three loaders absolute loader, relocating loader and direct linking loader respectively for the above four functions


Allocation - Programmer, Programmer, Programmer
Linking - Programmer, Programmer, Loader
Relocation - Assembler, Loader, Assembler
Loading - Loader, Loader, Loader

Let's take a look into the linkers tommorrow and from the next monday, you will be starting to learn to build system softwares

No comments:

Post a Comment