Which of the following can be accessed by transfer vector approach of linking?

2011

Which of the following can be accessed by transfer vector approach of linking?

Answer: B. External subroutineConcept — A transfer vector is a linking scheme in which a module’s references to names defined outside it are routed through a table of branch instructions…

  1. A.

    External data segments

  2. B.

    External subroutine

  3. C.

    Data located in other procedure

  4. D.

    All of the above

Attempted by 121 students.

Show answer & explanation

Correct answer: B

Concept — A transfer vector is a linking scheme in which a module’s references to names defined outside it are routed through a table of branch instructions kept inside that module. The linker fills each slot of the table with the resolved address of the corresponding external name, and the module reaches that name by branching to its own slot. Because every slot holds a branch instruction, a slot can bind only a name that a program reaches by transferring control to it.

Application — A routine defined in a separately compiled module is entered by a call, and a call is exactly a transfer of control. The call site targets its vector slot, the linker has already stored the routine’s entry-point address in that slot, and the branch there carries control into the routine. So the transfer vector approach of linking gives access to an external subroutine.

Cross-check — The remaining choices are data references, and a table of branch instructions cannot serve them:

  • An external data segment is read or written by a load or store whose operand must hold the segment’s address. That address has to be substituted into the operand; it cannot be jumped to.

  • Data located in another procedure is reached the same way, through an address constant that points into that procedure’s storage area, so it too needs address substitution rather than a control transfer.

  • Because both data cases fall outside what a table of branch instructions can bind, the combined choice “All of the above” fails along with them.

Result — Linking through a transfer vector resolves control-transfer references only, so what it gives access to is an external subroutine. References to data in other modules are handled instead by relocation and address-constant mechanisms, that is, by external data linking. This inability to load or store external data is a documented disadvantage of the transfer vector scheme, and it is the reason the direct linking loader — which lets a program refer freely to both instructions and data held in other segments — replaced it as the general scheme.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…