The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+21 votes

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

  1. LRU page replacement algorithm is used

  2. FIFO page replacement algorithm is used

  3. LFU page replacement algorithm is used

  4. None of the above

asked in Operating System by Veteran (59.8k points)
edited by | 2.1k views

1 Answer

+25 votes
Best answer
FIFO replaces a page which was brought into memory first will be removed first so since variable was initialized very early. it is in the set of first in pages. so it will be removed answer: (B) if you use LRU - since it is used constantly it is a recently used item always. so cannot be removed. If you use LFU - the frequency of the page is more since it is in constant use. So cannot be replaced
answered by Boss (11.6k points)
edited by
wht is the meaning of constant use in this question ?
it means the variable is used in almost every instruction, example a loop variable

 sushmita does heavily refers to this or not ?

a variable that used most of the time

yes exactly...

@Arjun why "None of the above" is not the correct answer, because "Most Frequently Used (MFU)" can also be the page replacement algorithm. right?

@Arjun FIFO doesn't need any count variable assigned to a page. I am sure the page replacement aglorithm used is MFU as mentioned in my previous comment.
@Manu Thakur,

The line that it is initialized earlier supported FIFO. And we have FIFO in the option.

The line that it is in constant use decrease the support for LRU.

Similary, the line that it is heavily used decrese the support for LFU. But it also support MFU, but we don't have MFU in the option.
I am not able to understand given answer.Is is supporting FIFO?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,126 questions
53,251 answers
70,502 users