Skip to content
Official PYQ · 1994

GATE CS 1994 Q1.13 — Memory Management and Virtual Memory

Explain with AI

A memory page containing a heavily used variable that was initialized very early and is in constant use is removed then

Choose one option
View worked solution

Answer: B

To determine which page replacement algorithm is being used, let's analyze the characteristics of the page being removed and how different algorithms behave:

  • FIFO (First-In, First-Out): This algorithm replaces the page that has been in memory the longest (i.e., the oldest page), completely ignoring how frequently or how recently the page has been accessed.
  • LRU (Least Recently Used): This algorithm replaces the page that has not been accessed for the longest duration of time.
  • LFU (Least Frequently Used): This algorithm replaces the page with the lowest access frequency count.

Analyzing the given scenario:

  • The page contains a variable that is "in constant use" and is "heavily used". This implies the page is both recently accessed and has a high frequency of access.
  • Therefore, neither LRU nor LFU would select this page for replacement.
  • However, the page was "initialized very early", meaning it has been in memory for a very long time (it is the oldest page).
  • Since this heavily and recently used page is still removed, the replacement decision must be based solely on its load time. This is the classic drawback of the FIFO page replacement algorithm.

Thus, the FIFO page replacement algorithm is being used.

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

Published
Report a correction
Keep exploringMore Memory Management and Virtual Memory questions