Skip to content
Official PYQ · 1996

GATE CS 1996 Q2.17 — Runtime Environments

Explain with AI

The correct matching for the following pairs is
(A)Activation record(1)Linking loader(B)Location counter(2)Garbage collection(C)Reference counts(3)Subroutine call(D)Address relocation(4)Assembler\begin{array}{|ll|ll|} \hline \text{(A)}&\text{Activation record} & \text{(1)} &\text{Linking loader} \\ \hline \text{(B)} &\text{Location counter} & \text{(2)} &\text{Garbage collection} \\ \hline \text{(C)}& \text{Reference counts} & \text{(3)} &\text{Subroutine call} \\ \hline \text{(D)}& \text{Address relocation} & \text{(4)}& \text{Assembler} \\ \hline \end{array}

Choose one option
View worked solution

Answer: D

To find the correct match, let us analyze each term on the left with its corresponding concept on the right:

  • (A) Activation record → (3) Subroutine call: An activation record (or stack frame) is allocated on the run-time stack whenever a subroutine (procedure or function) is called. It stores parameters, local variables, return addresses, and saved registers.
  • (B) Location counter → (4) Assembler: The location counter is a pointer/variable maintained by the assembler to keep track of the relative memory addresses assigned to instructions and data during the assembly process.
  • (C) Reference counts → (2) Garbage collection: Reference counting is a classic dynamic memory management technique used in garbage collection. It tracks the number of references/pointers to each allocated block of memory to determine when it can be safely deallocated (when the count drops to zero).
  • (D) Address relocation → (1) Linking loader: Address relocation is the process of mapping program-relative (or logical) addresses to actual physical memory addresses. This task is performed by the linking loader (or relocating loader) when the program is loaded into memory for execution.

Thus, the correct mapping is A-3, B-4, C-2, D-1, which corresponds to Option D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Runtime Environments questions