Skip to content

ISRO Scientist/Engineer CSE 2023Operating Systems › Memory Management and Virtual Memory

ISRO Scientist/Engineer CSE 2023 PYQ: Which of the following heap memory $E$ allocation strategies is likely to exploit spatial locality of memory…

Which of the following heap memory $E$ allocation strategies is likely to exploit spatial locality of memory accesses in a program, the most?

  1. A
    Best Fit
  2. B
    First Fit
  3. C
    Next Fit
    Correct answer
  4. D
    Last Fit

Answer

(C) Next Fit

Approach

Spatial locality means a program tends to access memory locations close to recently accessed ones. In heap allocation, this translates to allocating new blocks near the previously allocated block. Among the given strategies, Next Fit is the only one that resumes its search from the position of the last allocation, making it more likely to place the next block adjacent to the previous one.

Reviewed by ISRO IQ Editorial Team.