Thursday, June 16, 2011

Loader

Let's start with the definetion of loader.

"A loader is software or program that loads the compiled or assembled program into main memory and initiates the execution"

If you are a computer science student, you must have already come across Von Neumann's architecture, if not, here's the def

"The von Neumann architecture is a design model for a stored-program digital computer that uses a central processing unit (CPU) and a single separate storage structure ("memory") to hold both instructions and data " (source:Wikipedia)

For those of you who couldn't grasp it, it simply states that a program must be stored in primary memory or RAM, that is seperate from secondary memory or harddisk, inorder to be executed.



This thought revolutionarised the computer industry, and to this date, computers are built based on this architecture.Also this is an important interview question often tossed by interviewers, but the candidates are always strike out for this.So keep this thing in your memory.

Although today's computers made more complex architectures for their own purpose, the base of all these is the Von Neumann architecture.

I think you already grasped the need of a loader by now.Since the program originally is stored on hard disk and need to be transferred to RAM as per our architecture, loader helps in doing so.

Is my desk calculator a computer ?
Yes, definitely, but the important contrast between it and your computer is the architecture.Your computer uses Von Neumann architecture, while your calculator uses fixed program architecture (a program can be run from with in hard disk)

If a program can be run directly from harddisk, then you may ask, why this Von Neumann architecture, what is the need for loaders and why are you trying to teach us all these..

Well,  the answer comes from history.The first computer ever that was built is ENIAC in 1949. It used fixed program concept.Fixed program in the sense, it's harddisk is prepared in such a way, that it can run only one type of program.If you want to run a different program, you need to rewire, restructure and change the design.It took atleast three weeks gap to run two different programs in ENIAC.

That is the reason, why your computer can be both calculator and wordprocessor or browser or anything, but a calculator can only be a calculator.

Tommorrow, let's go some what deep into the loaders and learn about different types of loaders and their uses.

No comments:

Post a Comment