In an absolute loading scheme, which loader function is accomplished by the…

2009

In an absolute loading scheme, which loader function is accomplished by the assembler?

  1. A.

    Relocation

  2. B.

    Allocation

  3. C.

    Linking

  4. D.

    Loading

Show answer & explanation

Correct answer: A

Concept: A general loader/linker system that turns assembled or compiled modules into a running program in memory performs four distinct functions:

  • Allocation - deciding which area of memory the program will occupy.

  • Linking - combining separately assembled or compiled modules and resolving the references between them.

  • Relocation - converting address-dependent references in the object code into a form tied to actual memory locations.

  • Loading - physically copying the machine instructions and data into the reserved memory locations.

Application: An absolute loading scheme always loads the object program at one fixed, pre-agreed memory area, and the programmer writes the source assuming that one specific area - so allocation and linking are settled manually, by the programmer, before assembly even begins. What is left for the assembler is to translate every symbolic or relative address reference in the source into its final absolute machine address, since that address is already fixed - and that address substitution is exactly the relocation function. Once relocation is already done at assembly time, the loader's remaining job at run time is only to place the resulting bytes into those fixed memory cells:

Loader function

Performed by, in an absolute loading scheme

Allocation

Fixed by the programmer in advance - the program is written for one specific, predetermined memory area, so there is no allocation decision left for the assembler or loader to make.

Linking

Settled by the programmer in advance as well - any references to other parts of the program are resolved manually before assembly, rather than being deferred to a separate step.

Relocation

Performed by the assembler, which converts every symbolic or relative address reference in the source into its final absolute machine address.

Loading

Left to the loader, which only copies the already-absolute machine code into memory.

Cross-check: In a relocating loader, the same program can be loaded at a different memory address on each run, so its addresses cannot be fixed to one absolute value in advance - relocation must instead be deferred and performed at run time by the loader itself. This contrast confirms that relocation is precisely the function that shifts from assembler to loader when moving from an absolute to a relocating scheme - which is why relocation is the loader function the assembler performs under absolute loading.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…