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

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.5k points)
edited by | 1.6k views

1 Answer

+22 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.5k points)
edited by
0
wht is the meaning of constant use in this question ?
+5
it means the variable is used in almost every instruction, example a loop variable
+1

 sushmita does heavily refers to this or not ?

a variable that used most of the time

+1
yes exactly...
0

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

+1
@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.
+1
@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.
0
I am not able to understand given answer.Is is supporting FIFO?


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

39,512 questions
46,664 answers
139,703 comments
57,481 users