GATE - 1994 | OS | A memory page containing a heavily used variable that was initialized

GATE - 1994 | OS | A memory page containing a heavily used variable that was initialized
Posted on 03-03-2022

GATE - 1994 [Operating System]

Question:

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

A

LRU page replacement algorithm is used

B

FIFO page replacement algorithm is used

C

LFU page replacement algorithm is used

D

None of the above

Solution:

Option (B) is Correct.

In FIFO, whichever comes first that can be removed first.

If the variable was initialized very early, it is in set of first pages. So it was removed.


In LRU which can eliminate (or) removed which is least recently used.
In LFU the frequency of the page is more.

So it is in constant use so cannot be replaced.

 

Thank You