LOADER




Loading is the process of bringing a program from secondary memory into main memory so it can run. The system software responsible for it is known as loader. The simplest type of loader is absolute loader which places the program into memory at the location prescribed by the assembler. Bootstrap loader is an absolute loader which is executed when computer is switched on or restarted to load the operating system. In most of the cases, when a compiler translates a source code program into object code, it has no idea where the code will be placed in main memory at the time of its execution. In fact, each time it is executed, it would likely be assigned a different area of main memory depending on the availability of primary storage area at the time of loading. That is why, compilers create a special type of object code which can be loaded into any location of the main memory. When the program is loaded into memory to run, all the addresses and references are adjusted to reflect the actual location of the program in memory. This address adjustment is known as relocation. Relocation is performed before or during the loading of the program into main memory



Frequently Asked Questions

+
Ans: There are three types of translators, namely Assembler, Compiler and Interpreter. Assembler converts one assembly language statement into a single machine language instruction. . Depending on its implementation, a high-level language employs a compiler or an interpreter or both for translation. One statement in a high-level programming language will be translated into several machine language instructions. Both compiler and interpreter translate a program written in high-level language into machine language but in different fashion. Compiler translates the entire source program into object program at once and then the object files are linked to produce a single executable file. Unlike compiler, an interpreter translates one line of source code at a time—then executes it—before translating the next one and it does this every time the program executes. BASIC is a language that is usually implemented with an interpreter. Translation using an interpreter is slower than that using a compiler. The interpreter translates each line of source code to machine code each time the program is executed. With respect to debugging, an interpreted language is better than the compiled language. In an interpreter, syntax error is brought to the attention of the programmer immediately so that the programmer can make necessary corrections during program development. The Java language uses both a compiler and an interpreter. view more..
+
Ans: Most of the high-level languages provide libraries of subroutines or functions so that certain common operations may be reused by system-supplied routines without explicit coding. Hence, the machine language program produced by the translator must normally be combined with other machine language programs residing within the library to form a useful execution unit. This process of program combination is called linking and the software that performs this operation is variously known as a linker. The features of a programming language influence the linking requirements of a program. In languages like FORTRAN, COBOL, C, all program units are translated separately. Hence, all subprogram calls and common variable references require linking. Linking makes the addresses of programs known to each other so that transfer of control from one subprogram to another or a main program takes place during execution. view more..
+
Ans: Code generation This is the final phase of a standard compilation which converts every statement of the optimized intermediate code into target code using predefined target language template. The target language template depends on the machine instructions of the processor, addressing modes and number of registers, etc. view more..
+
Ans: Loading is the process of bringing a program from secondary memory into main memory so it can run. The system software responsible for it is known as loader. The simplest type of loader is absolute loader which places the program into memory at the location prescribed by the assembler. Bootstrap loader is an absolute loader which is executed when computer is switched on or restarted to load the operating system. In most of the cases, when a compiler translates a source code program into object code, it has no idea where the code will be placed in main memory at the time of its execution. In fact, each time it is executed, it would likely be assigned a different area of main memory depending on the availability of primary storage area at the time of loading. That is why, compilers create a special type of object code which can be loaded into any location of the main memory. When the program is loaded into memory to run, all the addresses and references are adjusted to reflect the actual location of the program in memory. This address adjustment is known as relocation. Relocation is performed before or during the loading of the program into main memory view more..
+
Ans: Importance of Computer Programming Today view more..




Rating - 3/5
468 views

Advertisements