in Operating System
679 views
1 vote
1 vote

Which page will LRU replace?

in Operating System
679 views

1 Answer

1 vote
1 vote
page 1 will be replaced ..it was last refered at 270

4 Comments

Good question. and @sudsho a genuine doubt.

But as we are using LRU(replace the page that has not been refrenced for a long time), i think decision will be taken on the basis of refrence and modified bit.

Here page $2$ and $3$ are modified, so they will not be replaced. now, $r = 1$ in page $1$ means it is refrenced in last clock cycle while page-$0$ is not refrenced in last clock cycle. So, Page-$0$ will be replaced.
0
0
yes ur right..page 2 and 3 are definitly not in seen..

but i think page 1 will be replaced because LRU says as u said replace the page not referred for a long time..it will be page 1 as it was referred last at 270

why they have again shown R=1 for page 1 is m nt getting...there must be something wrong in the question
1
1
Reference bit is 1 for the page which was referred in the last clock clock.
So in the page table for only one page, reference bit would be 1 and for all other pages it will be 0??
0
0