<s>
In	O
a	O
computer	B-General_Concept
operating	I-General_Concept
system	I-General_Concept
that	O
uses	O
paging	B-Architecture
for	O
virtual	B-Architecture
memory	I-Architecture
management	B-General_Concept
,	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
decide	O
which	O
memory	B-General_Concept
pages	I-General_Concept
to	O
page	B-Architecture
out	I-Architecture
,	O
sometimes	O
called	O
swap	O
out	O
,	O
or	O
write	O
to	O
disk	O
,	O
when	O
a	O
page	B-General_Concept
of	O
memory	O
needs	O
to	O
be	O
allocated	O
.	O
</s>
<s>
Page	B-Architecture
replacement	I-Architecture
happens	O
when	O
a	O
requested	O
page	B-General_Concept
is	O
not	O
in	O
memory	O
(	O
page	B-General_Concept
fault	I-General_Concept
)	O
and	O
a	O
free	O
page	B-General_Concept
cannot	O
be	O
used	O
to	O
satisfy	O
the	O
allocation	O
,	O
either	O
because	O
there	O
are	O
none	O
,	O
or	O
because	O
the	O
number	O
of	O
free	O
pages	O
is	O
lower	O
than	O
some	O
threshold	O
.	O
</s>
<s>
When	O
the	O
page	B-General_Concept
that	O
was	O
selected	O
for	O
replacement	O
and	O
paged	O
out	O
is	O
referenced	O
again	O
it	O
has	O
to	O
be	O
paged	O
in	O
(	O
read	O
in	O
from	O
disk	O
)	O
,	O
and	O
this	O
involves	O
waiting	O
for	O
I/O	O
completion	O
.	O
</s>
<s>
This	O
determines	O
the	O
quality	O
of	O
the	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
:	O
the	O
less	O
time	O
waiting	O
for	O
page-ins	O
,	O
the	O
better	O
the	O
algorithm	O
.	O
</s>
<s>
A	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
looks	O
at	O
the	O
limited	O
information	O
about	O
accesses	O
to	O
the	O
pages	O
provided	O
by	O
hardware	O
,	O
and	O
tries	O
to	O
guess	O
which	O
pages	O
should	O
be	O
replaced	O
to	O
minimize	O
the	O
total	O
number	O
of	O
page	B-General_Concept
misses	O
,	O
while	O
balancing	O
this	O
with	O
the	O
costs	O
(	O
primary	O
storage	O
and	O
processor	O
time	O
)	O
of	O
the	O
algorithm	O
itself	O
.	O
</s>
<s>
The	O
page	B-General_Concept
replacing	O
problem	O
is	O
a	O
typical	O
online	O
problem	O
from	O
the	O
competitive	O
analysis	O
perspective	O
in	O
the	O
sense	O
that	O
the	O
optimal	O
deterministic	O
algorithm	O
is	O
known	O
.	O
</s>
<s>
Page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
were	O
a	O
hot	O
topic	O
of	O
research	O
and	O
debate	O
in	O
the	O
1960s	O
and	O
1970s	O
.	O
</s>
<s>
That	O
mostly	O
ended	O
with	O
the	O
development	O
of	O
sophisticated	O
LRU	O
(	O
least	O
recently	O
used	O
)	O
approximations	O
and	O
working	B-General_Concept
set	I-General_Concept
algorithms	O
.	O
</s>
<s>
Since	O
then	O
,	O
some	O
basic	O
assumptions	O
made	O
by	O
the	O
traditional	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
were	O
invalidated	O
,	O
resulting	O
in	O
a	O
revival	O
of	O
research	O
.	O
</s>
<s>
In	O
particular	O
,	O
the	O
following	O
trends	O
in	O
the	O
behavior	O
of	O
underlying	O
hardware	O
and	O
user-level	B-Operating_System
software	O
have	O
affected	O
the	O
performance	O
of	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
:	O
</s>
<s>
The	O
cost	O
of	O
a	O
CPU	B-General_Concept
cache	I-General_Concept
miss	O
is	O
far	O
more	O
expensive	O
.	O
</s>
<s>
Locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
of	O
user	O
software	O
has	O
weakened	O
.	O
</s>
<s>
This	O
is	O
mostly	O
attributed	O
to	O
the	O
spread	O
of	O
object-oriented	B-Language
programming	I-Language
techniques	O
that	O
favor	O
large	O
numbers	O
of	O
small	O
functions	O
,	O
use	O
of	O
sophisticated	O
data	O
structures	O
like	O
trees	B-Application
and	O
hash	B-Algorithm
tables	I-Algorithm
that	O
tend	O
to	O
result	O
in	O
chaotic	O
memory	O
reference	O
patterns	O
,	O
and	O
the	O
advent	O
of	O
garbage	B-General_Concept
collection	I-General_Concept
that	O
drastically	O
changed	O
memory	O
access	O
behavior	O
of	O
applications	O
.	O
</s>
<s>
Requirements	O
for	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
have	O
changed	O
due	O
to	O
differences	O
in	O
operating	B-Operating_System
system	I-Operating_System
kernel	I-Operating_System
architectures	O
.	O
</s>
<s>
In	O
particular	O
,	O
most	O
modern	O
OS	B-Operating_System
kernels	I-Operating_System
have	O
unified	O
virtual	B-Architecture
memory	I-Architecture
and	O
file	O
system	O
caches	O
,	O
requiring	O
the	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
to	O
select	O
a	O
page	B-General_Concept
from	O
among	O
the	O
pages	O
of	O
both	O
user	O
program	O
virtual	O
address	O
spaces	O
and	O
cached	O
files	O
.	O
</s>
<s>
For	O
example	O
,	O
they	O
can	O
be	O
locked	O
,	O
or	O
can	O
have	O
write	O
ordering	O
requirements	O
imposed	O
by	O
journaling	B-Application
.	O
</s>
<s>
Moreover	O
,	O
as	O
the	O
goal	O
of	O
page	B-Architecture
replacement	I-Architecture
is	O
to	O
minimize	O
total	O
time	O
waiting	O
for	O
memory	O
,	O
it	O
has	O
to	O
take	O
into	O
account	O
memory	O
requirements	O
imposed	O
by	O
other	O
kernel	B-Operating_System
sub-systems	O
that	O
allocate	O
memory	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
page	B-Architecture
replacement	I-Architecture
in	O
modern	O
kernels	B-Operating_System
(	O
Linux	B-Operating_System
,	O
FreeBSD	B-Operating_System
,	O
and	O
Solaris	B-Application
)	O
tends	O
to	O
work	O
at	O
the	O
level	O
of	O
a	O
general	O
purpose	O
kernel	B-Operating_System
memory	B-General_Concept
allocator	I-General_Concept
,	O
rather	O
than	O
at	O
the	O
higher	O
level	O
of	O
a	O
virtual	B-Architecture
memory	I-Architecture
subsystem	O
.	O
</s>
<s>
When	O
a	O
process	O
incurs	O
a	O
page	B-General_Concept
fault	I-General_Concept
,	O
a	O
local	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
selects	O
for	O
replacement	O
some	O
page	B-General_Concept
that	O
belongs	O
to	O
that	O
same	O
process	O
(	O
or	O
a	O
group	O
of	O
processes	O
sharing	O
a	O
memory	O
partition	O
)	O
.	O
</s>
<s>
A	O
global	O
replacement	O
algorithm	O
is	O
free	O
to	O
select	O
any	O
page	B-Architecture
in	I-Architecture
memory	O
.	O
</s>
<s>
Local	O
page	B-Architecture
replacement	I-Architecture
assumes	O
some	O
form	O
of	O
memory	O
partitioning	O
that	O
determines	O
how	O
many	O
pages	O
are	O
to	O
be	O
assigned	O
to	O
a	O
given	O
process	O
or	O
a	O
group	O
of	O
processes	O
.	O
</s>
<s>
Most	O
popular	O
forms	O
of	O
partitioning	O
are	O
fixed	O
partitioning	O
and	O
balanced	O
set	O
algorithms	O
based	O
on	O
the	O
working	B-General_Concept
set	I-General_Concept
model	I-General_Concept
.	O
</s>
<s>
The	O
advantage	O
of	O
local	O
page	B-Architecture
replacement	I-Architecture
is	O
its	O
scalability	O
:	O
each	O
process	O
can	O
handle	O
its	O
page	B-General_Concept
faults	I-General_Concept
independently	O
,	O
leading	O
to	O
more	O
consistent	O
performance	O
for	O
that	O
process	O
.	O
</s>
<s>
However	O
global	O
page	B-Architecture
replacement	I-Architecture
is	O
more	O
efficient	O
on	O
an	O
overall	O
system	O
basis	O
.	O
</s>
<s>
Modern	O
general	O
purpose	O
computers	O
and	O
some	O
embedded	O
processors	O
have	O
support	O
for	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
A	O
page	B-General_Concept
table	I-General_Concept
maps	O
a	O
subset	O
of	O
the	O
process	O
virtual	O
addresses	O
to	O
physical	O
addresses	O
.	O
</s>
<s>
In	O
addition	O
,	O
in	O
most	O
architectures	O
the	O
page	B-General_Concept
table	I-General_Concept
holds	O
an	O
"	O
access	O
"	O
bit	O
and	O
a	O
"	O
dirty	O
"	O
bit	O
for	O
each	O
page	B-Architecture
in	I-Architecture
the	O
page	B-General_Concept
table	I-General_Concept
.	O
</s>
<s>
The	O
CPU	O
sets	O
the	O
access	O
bit	O
when	O
the	O
process	O
reads	O
or	O
writes	O
memory	O
in	O
that	O
page	B-General_Concept
.	O
</s>
<s>
The	O
CPU	O
sets	O
the	O
dirty	B-Operating_System
bit	I-Operating_System
when	O
the	O
process	O
writes	O
memory	O
in	O
that	O
page	B-General_Concept
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
can	O
modify	O
the	O
access	O
and	O
dirty	B-Operating_System
bits	I-Operating_System
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
can	O
detect	O
accesses	O
to	O
memory	O
and	O
files	O
through	O
the	O
following	O
means	O
:	O
</s>
<s>
By	O
clearing	O
the	O
access	O
bit	O
in	O
pages	O
present	O
in	O
the	O
process	O
 '	O
page	B-General_Concept
table	I-General_Concept
.	O
</s>
<s>
After	O
some	O
time	O
,	O
the	O
OS	O
scans	O
the	O
page	B-General_Concept
table	I-General_Concept
looking	O
for	O
pages	O
that	O
had	O
the	O
access	O
bit	O
set	O
by	O
the	O
CPU	O
.	O
</s>
<s>
By	O
removing	O
pages	O
from	O
the	O
process	O
 '	O
page	B-General_Concept
table	I-General_Concept
without	O
necessarily	O
removing	O
them	O
from	O
physical	O
memory	O
.	O
</s>
<s>
The	O
next	O
access	O
to	O
that	O
page	B-General_Concept
is	O
detected	O
immediately	O
because	O
it	O
causes	O
a	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
This	O
is	O
slow	O
because	O
a	O
page	B-General_Concept
fault	I-General_Concept
involves	O
a	O
context	O
switch	O
to	O
the	O
OS	O
,	O
software	O
lookup	O
for	O
the	O
corresponding	O
physical	O
address	O
,	O
modification	O
of	O
the	O
page	B-General_Concept
table	I-General_Concept
and	O
a	O
context	O
switch	O
back	O
to	O
the	O
process	O
and	O
accurate	O
because	O
the	O
access	O
is	O
detected	O
immediately	O
after	O
it	O
occurs	O
.	O
</s>
<s>
Directly	O
when	O
the	O
process	O
makes	O
system	O
calls	O
that	O
potentially	O
access	O
the	O
page	B-General_Concept
cache	O
like	O
read	O
and	O
write	O
in	O
POSIX	O
.	O
</s>
<s>
Most	O
replacement	O
algorithms	O
simply	O
return	O
the	O
target	O
page	B-General_Concept
as	O
their	O
result	O
.	O
</s>
<s>
This	O
means	O
that	O
if	O
target	O
page	B-General_Concept
is	O
dirty	O
(	O
that	O
is	O
,	O
contains	O
data	O
that	O
have	O
to	O
be	O
written	O
to	O
the	O
stable	O
storage	O
before	O
page	B-General_Concept
can	O
be	O
reclaimed	O
)	O
,	O
I/O	O
has	O
to	O
be	O
initiated	O
to	O
send	O
that	O
page	B-General_Concept
to	O
the	O
stable	O
storage	O
(	O
to	O
clean	O
the	O
page	B-General_Concept
)	O
.	O
</s>
<s>
In	O
the	O
early	O
days	O
of	O
virtual	B-Architecture
memory	I-Architecture
,	O
time	O
spent	O
on	O
cleaning	O
was	O
not	O
of	O
much	O
concern	O
,	O
because	O
virtual	B-Architecture
memory	I-Architecture
was	O
first	O
implemented	O
on	O
systems	O
with	O
full	O
duplex	O
channels	O
to	O
the	O
stable	O
storage	O
,	O
and	O
cleaning	O
was	O
customarily	O
overlapped	O
with	O
paging	B-Architecture
.	O
</s>
<s>
The	O
idea	O
is	O
that	O
by	O
the	O
time	O
the	O
precleaned	O
page	B-General_Concept
is	O
actually	O
selected	O
for	O
the	O
replacement	O
,	O
the	O
I/O	O
will	O
complete	O
and	O
the	O
page	B-General_Concept
will	O
be	O
clean	O
.	O
</s>
<s>
Some	O
systems	O
use	O
demand	B-General_Concept
paging	I-General_Concept
—	O
waiting	O
until	O
a	O
page	B-General_Concept
is	O
actually	O
requested	O
before	O
loading	O
it	O
into	O
RAM	O
.	O
</s>
<s>
Other	O
systems	O
attempt	O
to	O
reduce	O
latency	O
by	O
guessing	O
which	O
pages	O
not	O
in	O
RAM	O
are	O
likely	O
to	O
be	O
needed	O
soon	O
,	O
and	O
pre-loading	O
such	O
pages	O
into	O
RAM	O
,	O
before	O
that	O
page	B-General_Concept
is	O
requested	O
.	O
</s>
<s>
When	O
a	O
page	B-General_Concept
fault	I-General_Concept
occurs	O
,	O
"	O
anticipatory	O
paging	B-Architecture
"	O
systems	O
will	O
not	O
only	O
bring	O
in	O
the	O
referenced	O
page	B-General_Concept
,	O
but	O
also	O
the	O
next	O
few	O
consecutive	O
pages	O
(	O
analogous	O
to	O
a	O
prefetch	B-General_Concept
input	I-General_Concept
queue	I-General_Concept
in	O
a	O
CPU	O
)	O
.	O
</s>
<s>
The	O
(	O
h	O
,	O
k	O
)	O
-paging	O
problem	O
is	O
a	O
generalization	O
of	O
the	O
model	O
of	O
paging	B-Architecture
problem	O
:	O
Let	O
h	O
,	O
k	O
be	O
positive	O
integers	O
such	O
that	O
.	O
</s>
<s>
We	O
measure	O
the	O
performance	O
of	O
an	O
algorithm	O
with	O
cache	O
of	O
size	O
relative	O
to	O
the	O
theoretically	O
optimal	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
If	O
,	O
we	O
provide	O
the	O
optimal	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
with	O
strictly	O
less	O
resource	O
.	O
</s>
<s>
The	O
(	O
h	O
,	O
k	O
)	O
-paging	O
problem	O
is	O
a	O
way	O
to	O
measure	O
how	O
an	O
online	B-Algorithm
algorithm	I-Algorithm
performs	O
by	O
comparing	O
it	O
with	O
the	O
performance	O
of	O
the	O
optimal	O
algorithm	O
,	O
specifically	O
,	O
separately	O
parameterizing	O
the	O
cache	O
size	O
of	O
the	O
online	B-Algorithm
algorithm	I-Algorithm
and	O
optimal	O
algorithm	O
.	O
</s>
<s>
Marking	O
algorithms	O
is	O
a	O
general	O
class	O
of	O
paging	B-Architecture
algorithms	O
.	O
</s>
<s>
For	O
each	O
page	B-General_Concept
,	O
we	O
associate	O
it	O
with	O
a	O
bit	O
called	O
its	O
mark	O
.	O
</s>
<s>
During	O
a	O
stage	O
of	O
page	B-General_Concept
requests	O
,	O
we	O
mark	O
a	O
page	B-General_Concept
when	O
it	O
is	O
first	O
requested	O
in	O
this	O
stage	O
.	O
</s>
<s>
A	O
marking	O
algorithm	O
is	O
such	O
an	O
algorithm	O
that	O
never	O
pages	O
out	O
a	O
marked	O
page	B-General_Concept
.	O
</s>
<s>
An	O
algorithm	O
is	O
conservative	O
,	O
if	O
on	O
any	O
consecutive	O
request	O
sequence	O
containing	O
k	O
or	O
fewer	O
distinct	O
page	B-General_Concept
references	O
,	O
the	O
algorithm	O
will	O
incur	O
k	O
or	O
fewer	O
page	B-General_Concept
faults	I-General_Concept
.	O
</s>
<s>
There	O
are	O
a	O
variety	O
of	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
:	O
</s>
<s>
The	O
theoretically	O
optimal	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
(	O
also	O
known	O
as	O
OPT	O
,	O
clairvoyant	O
replacement	O
algorithm	O
,	O
or	O
Bélády	O
's	O
optimal	O
page	B-Architecture
replacement	I-Architecture
policy	O
)	O
is	O
an	O
algorithm	O
that	O
works	O
as	O
follows	O
:	O
when	O
a	O
page	B-General_Concept
needs	O
to	O
be	O
swapped	O
in	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
swaps	O
out	O
the	O
page	B-General_Concept
whose	O
next	O
use	O
will	O
occur	O
farthest	O
in	O
the	O
future	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
page	B-General_Concept
that	O
is	O
not	O
going	O
to	O
be	O
used	O
for	O
the	O
next	O
6	O
seconds	O
will	O
be	O
swapped	O
out	O
over	O
a	O
page	B-General_Concept
that	O
is	O
going	O
to	O
be	O
used	O
within	O
the	O
next	O
0.4	O
seconds	O
.	O
</s>
<s>
This	O
algorithm	O
cannot	O
be	O
implemented	O
in	O
a	O
general	O
purpose	O
operating	B-General_Concept
system	I-General_Concept
because	O
it	O
is	O
impossible	O
to	O
compute	O
reliably	O
how	O
long	O
it	O
will	O
be	O
before	O
a	O
page	B-General_Concept
is	O
going	O
to	O
be	O
used	O
,	O
except	O
when	O
all	O
software	O
that	O
will	O
run	O
on	O
a	O
system	O
is	O
either	O
known	O
beforehand	O
and	O
is	O
amenable	O
to	O
static	O
analysis	O
of	O
its	O
memory	O
reference	O
patterns	O
,	O
or	O
only	O
a	O
class	O
of	O
applications	O
allowing	O
run-time	O
analysis	O
.	O
</s>
<s>
Despite	O
this	O
limitation	O
,	O
algorithms	O
exist	O
that	O
can	O
offer	O
near-optimal	O
performance	O
—	O
the	O
operating	B-General_Concept
system	I-General_Concept
keeps	O
track	O
of	O
all	O
pages	O
referenced	O
by	O
the	O
program	O
,	O
and	O
it	O
uses	O
those	O
data	O
to	O
decide	O
which	O
pages	O
to	O
swap	O
in	O
and	O
out	O
on	O
subsequent	O
runs	O
.	O
</s>
<s>
Analysis	O
of	O
the	O
paging	B-Architecture
problem	O
has	O
also	O
been	O
done	O
in	O
the	O
field	O
of	O
online	B-Algorithm
algorithms	I-Algorithm
.	O
</s>
<s>
Efficiency	O
of	O
randomized	O
online	B-Algorithm
algorithms	I-Algorithm
for	O
the	O
paging	B-Architecture
problem	O
is	O
measured	O
using	O
amortized	B-General_Concept
analysis	I-General_Concept
.	O
</s>
<s>
The	O
not	B-General_Concept
recently	I-General_Concept
used	I-General_Concept
(	O
NRU	O
)	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
is	O
an	O
algorithm	O
that	O
favours	O
keeping	O
pages	O
in	O
memory	O
that	O
have	O
been	O
recently	O
used	O
.	O
</s>
<s>
This	O
algorithm	O
works	O
on	O
the	O
following	O
principle	O
:	O
when	O
a	O
page	B-General_Concept
is	O
referenced	O
,	O
a	O
referenced	O
bit	O
is	O
set	O
for	O
that	O
page	B-General_Concept
,	O
marking	O
it	O
as	O
referenced	O
.	O
</s>
<s>
Similarly	O
,	O
when	O
a	O
page	B-General_Concept
is	O
modified	O
(	O
written	O
to	O
)	O
,	O
a	O
modified	O
bit	O
is	O
set	O
.	O
</s>
<s>
When	O
a	O
page	B-General_Concept
needs	O
to	O
be	O
replaced	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
divides	O
the	O
pages	O
into	O
four	O
classes	O
:	O
</s>
<s>
Although	O
it	O
does	O
not	O
seem	O
possible	O
for	O
a	O
page	B-General_Concept
to	O
be	O
modified	O
yet	O
not	O
referenced	O
,	O
this	O
happens	O
when	O
a	O
class	O
3	O
page	B-General_Concept
has	O
its	O
referenced	O
bit	O
cleared	O
by	O
the	O
timer	O
interrupt	O
.	O
</s>
<s>
The	O
NRU	O
algorithm	O
picks	O
a	O
random	O
page	B-General_Concept
from	O
the	O
lowest	O
category	O
for	O
removal	O
.	O
</s>
<s>
So	O
out	O
of	O
the	O
above	O
four	O
page	B-General_Concept
categories	O
,	O
the	O
NRU	O
algorithm	O
will	O
replace	O
a	O
not-referenced	O
,	O
not-modified	O
page	B-General_Concept
if	O
such	O
a	O
page	B-General_Concept
exists	O
.	O
</s>
<s>
Note	O
that	O
this	O
algorithm	O
implies	O
that	O
a	O
modified	O
but	O
not-referenced	O
(	O
within	O
the	O
last	O
timer	O
interval	O
)	O
page	B-General_Concept
is	O
less	O
important	O
than	O
a	O
not-modified	O
page	B-General_Concept
that	O
is	O
intensely	O
referenced	O
.	O
</s>
<s>
The	O
simplest	O
page-replacement	O
algorithm	O
is	O
a	O
FIFO	O
algorithm	O
.	O
</s>
<s>
The	O
first-in	O
,	O
first-out	O
(	O
FIFO	O
)	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
is	O
a	O
low-overhead	O
algorithm	O
that	O
requires	O
little	O
bookkeeping	O
on	O
the	O
part	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
The	O
idea	O
is	O
obvious	O
from	O
the	O
name	O
–	O
the	O
operating	B-General_Concept
system	I-General_Concept
keeps	O
track	O
of	O
all	O
the	O
pages	O
in	O
memory	O
in	O
a	O
queue	O
,	O
with	O
the	O
most	O
recent	O
arrival	O
at	O
the	O
back	O
,	O
and	O
the	O
oldest	O
arrival	O
in	O
front	O
.	O
</s>
<s>
When	O
a	O
page	B-General_Concept
needs	O
to	O
be	O
replaced	O
,	O
the	O
page	B-General_Concept
at	O
the	O
front	O
of	O
the	O
queue	O
(	O
the	O
oldest	O
page	B-General_Concept
)	O
is	O
selected	O
.	O
</s>
<s>
This	O
algorithm	O
experiences	O
Bélády	B-General_Concept
's	I-General_Concept
anomaly	I-General_Concept
.	O
</s>
<s>
In	O
simple	O
words	O
,	O
on	O
a	O
page	B-General_Concept
fault	I-General_Concept
,	O
the	O
frame	O
that	O
has	O
been	O
in	O
memory	O
the	O
longest	O
is	O
replaced	O
.	O
</s>
<s>
FIFO	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
is	O
used	O
by	O
the	O
OpenVMS	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
,	O
with	O
some	O
modifications	O
.	O
</s>
<s>
Partial	O
second	O
chance	O
is	O
provided	O
by	O
skipping	O
a	O
limited	O
number	O
of	O
entries	O
with	O
valid	O
translation	O
table	O
references	O
,	O
and	O
additionally	O
,	O
pages	O
are	O
displaced	O
from	O
process	O
working	B-General_Concept
set	I-General_Concept
to	O
a	O
systemwide	O
pool	O
from	O
which	O
they	O
can	O
be	O
recovered	O
if	O
not	O
already	O
re-used	O
.	O
</s>
<s>
A	O
modified	O
form	O
of	O
the	O
FIFO	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
,	O
known	O
as	O
the	O
Second-chance	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
,	O
fares	O
relatively	O
better	O
than	O
FIFO	O
at	O
little	O
cost	O
for	O
the	O
improvement	O
.	O
</s>
<s>
It	O
works	O
by	O
looking	O
at	O
the	O
front	O
of	O
the	O
queue	O
as	O
FIFO	O
does	O
,	O
but	O
instead	O
of	O
immediately	O
paging	B-Architecture
out	O
that	O
page	B-General_Concept
,	O
it	O
checks	O
to	O
see	O
if	O
its	O
referenced	O
bit	O
is	O
set	O
.	O
</s>
<s>
If	O
it	O
is	O
not	O
set	O
,	O
the	O
page	B-General_Concept
is	O
swapped	O
out	O
.	O
</s>
<s>
Otherwise	O
,	O
the	O
referenced	O
bit	O
is	O
cleared	O
,	O
the	O
page	B-General_Concept
is	O
inserted	O
at	O
the	O
back	O
of	O
the	O
queue	O
(	O
as	O
if	O
it	O
were	O
a	O
new	O
page	B-General_Concept
)	O
and	O
this	O
process	O
is	O
repeated	O
.	O
</s>
<s>
If	O
all	O
the	O
pages	O
have	O
their	O
referenced	O
bit	O
set	O
,	O
on	O
the	O
second	O
encounter	O
of	O
the	O
first	O
page	B-Architecture
in	I-Architecture
the	O
list	O
,	O
that	O
page	B-General_Concept
will	O
be	O
swapped	O
out	O
,	O
as	O
it	O
now	O
has	O
its	O
referenced	O
bit	O
cleared	O
.	O
</s>
<s>
As	O
its	O
name	O
suggests	O
,	O
Second-chance	O
gives	O
every	O
page	B-General_Concept
a	O
"	O
second-chance	O
"	O
–	O
an	O
old	O
page	B-General_Concept
that	O
has	O
been	O
referenced	O
is	O
probably	O
in	O
use	O
,	O
and	O
should	O
not	O
be	O
swapped	O
out	O
over	O
a	O
new	O
page	B-General_Concept
that	O
has	O
not	O
been	O
referenced	O
.	O
</s>
<s>
The	O
clock	O
algorithm	O
keeps	O
a	O
circular	O
list	O
of	O
pages	O
in	O
memory	O
,	O
with	O
the	O
"	O
hand	O
"	O
(	O
iterator	O
)	O
pointing	O
to	O
the	O
last	O
examined	O
page	B-General_Concept
frame	I-General_Concept
in	O
the	O
list	O
.	O
</s>
<s>
When	O
a	O
page	B-General_Concept
fault	I-General_Concept
occurs	O
and	O
no	O
empty	O
frames	O
exist	O
,	O
then	O
the	O
R	O
(	O
referenced	O
)	O
bit	O
is	O
inspected	O
at	O
the	O
hand	O
's	O
location	O
.	O
</s>
<s>
If	O
R	O
is	O
0	O
,	O
the	O
new	O
page	B-General_Concept
is	O
put	O
in	O
place	O
of	O
the	O
page	B-General_Concept
the	O
"	O
hand	O
"	O
points	O
to	O
,	O
and	O
the	O
hand	O
is	O
advanced	O
one	O
position	O
.	O
</s>
<s>
Otherwise	O
,	O
the	O
R	O
bit	O
is	O
cleared	O
,	O
then	O
the	O
clock	O
hand	O
is	O
incremented	O
and	O
the	O
process	O
is	O
repeated	O
until	O
a	O
page	B-General_Concept
is	O
replaced	O
.	O
</s>
<s>
GCLOCK	O
:	O
Generalized	O
clock	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
This	O
extra	O
information	O
on	O
paged-out	O
pages	O
,	O
like	O
the	O
similar	O
information	O
maintained	O
by	O
ARC	B-General_Concept
,	O
helps	O
it	O
work	O
better	O
than	O
LRU	O
on	O
large	O
loops	O
and	O
one-time	O
scans	O
.	O
</s>
<s>
By	O
combining	O
the	O
Clock	O
algorithm	O
with	O
the	O
concept	O
of	O
a	O
working	B-General_Concept
set	I-General_Concept
(	O
i.e.	O
,	O
the	O
set	O
of	O
pages	O
expected	O
to	O
be	O
used	O
by	O
that	O
process	O
during	O
some	O
time	O
interval	O
)	O
,	O
the	O
performance	O
of	O
the	O
algorithm	O
can	O
be	O
improved	O
.	O
</s>
<s>
In	O
practice	O
,	O
the	O
"	O
aging	O
"	O
algorithm	O
and	O
the	O
"	O
WSClock	O
"	O
algorithm	O
are	O
probably	O
the	O
most	O
important	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
.	O
</s>
<s>
Clock	O
with	O
Adaptive	O
Replacement	O
(	O
CAR	O
)	O
is	O
a	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
that	O
has	O
performance	O
comparable	O
to	O
ARC	B-General_Concept
,	O
and	O
substantially	O
outperforms	O
both	O
LRU	O
and	O
CLOCK	O
.	O
</s>
<s>
The	O
least	O
recently	O
used	O
(	O
LRU	O
)	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
,	O
though	O
similar	O
in	O
name	O
to	O
NRU	O
,	O
differs	O
in	O
the	O
fact	O
that	O
LRU	O
keeps	O
track	O
of	O
page	B-General_Concept
usage	O
over	O
a	O
short	O
period	O
of	O
time	O
,	O
while	O
NRU	O
just	O
looks	O
at	O
the	O
usage	O
in	O
the	O
last	O
clock	O
interval	O
.	O
</s>
<s>
While	O
LRU	O
can	O
provide	O
near-optimal	O
performance	O
in	O
theory	O
(	O
almost	O
as	O
good	O
as	O
adaptive	B-General_Concept
replacement	I-General_Concept
cache	I-General_Concept
)	O
,	O
it	O
is	O
rather	O
expensive	O
to	O
implement	O
in	O
practice	O
.	O
</s>
<s>
At	O
the	O
back	O
of	O
this	O
list	O
is	O
the	O
least	O
recently	O
used	O
page	B-General_Concept
,	O
and	O
at	O
the	O
front	O
is	O
the	O
most	O
recently	O
used	O
page	B-General_Concept
.	O
</s>
<s>
Whenever	O
a	O
page	B-General_Concept
is	O
accessed	O
,	O
it	O
acquires	O
the	O
value	O
equal	O
to	O
the	O
counter	O
at	O
the	O
time	O
of	O
page	B-General_Concept
access	O
.	O
</s>
<s>
Whenever	O
a	O
page	B-General_Concept
needs	O
to	O
be	O
replaced	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
selects	O
the	O
page	B-General_Concept
with	O
the	O
lowest	O
counter	O
and	O
swaps	O
it	O
out	O
.	O
</s>
<s>
It	O
has	O
been	O
proven	O
,	O
for	O
example	O
,	O
that	O
LRU	O
can	O
never	O
result	O
in	O
more	O
than	O
N-times	O
more	O
page	B-General_Concept
faults	I-General_Concept
than	O
OPT	O
algorithm	O
,	O
where	O
N	O
is	O
proportional	O
to	O
the	O
number	O
of	O
pages	O
in	O
the	O
managed	O
pool	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
there	O
are	O
N	O
pages	O
in	O
the	O
LRU	O
pool	O
,	O
an	O
application	O
executing	O
a	O
loop	O
over	O
array	O
of	O
N	O
+	O
1	O
pages	O
will	O
cause	O
a	O
page	B-General_Concept
fault	I-General_Concept
on	O
each	O
and	O
every	O
access	O
.	O
</s>
<s>
LRU-K	O
evicts	O
the	O
page	B-General_Concept
whose	O
K-th	O
most	O
recent	O
access	O
is	O
furthest	O
in	O
the	O
past	O
.	O
</s>
<s>
The	O
ARC	B-General_Concept
algorithm	O
extends	O
LRU	O
by	O
maintaining	O
a	O
history	O
of	O
recently	O
evicted	O
pages	O
and	O
uses	O
this	O
to	O
change	O
preference	O
to	O
recent	O
or	O
frequent	O
access	O
.	O
</s>
<s>
A	O
comparison	O
of	O
ARC	B-General_Concept
with	O
other	O
algorithms	O
(	O
LRU	O
,	O
MQ	O
,	O
2Q	O
,	O
LRU-2	O
,	O
LRFU	O
,	O
LIRS	B-General_Concept
)	O
can	O
be	O
found	O
in	O
Megiddo	O
&	O
Modha	O
2004	O
.	O
</s>
<s>
Random	O
replacement	O
algorithm	O
replaces	O
a	O
random	O
page	B-Architecture
in	I-Architecture
memory	O
.	O
</s>
<s>
This	O
eliminates	O
the	O
overhead	O
cost	O
of	O
tracking	O
page	B-General_Concept
references	O
.	O
</s>
<s>
OS/390	B-Application
uses	O
global	O
LRU	O
approximation	O
and	O
falls	O
back	O
to	O
random	O
replacement	O
when	O
LRU	O
performance	O
degenerates	O
,	O
and	O
the	O
Intel	B-General_Concept
i860	I-General_Concept
processor	O
used	O
a	O
random	O
replacement	O
policy	O
(	O
Rhodehamel	O
1989	O
)	O
.	O
</s>
<s>
The	O
not	O
frequently	O
used	O
(	O
NFU	O
)	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
requires	O
a	O
counter	O
,	O
and	O
every	O
page	B-General_Concept
has	O
one	O
counter	O
of	O
its	O
own	O
which	O
is	O
initially	O
set	O
to	O
0	O
.	O
</s>
<s>
In	O
effect	O
,	O
the	O
counters	O
keep	O
track	O
of	O
how	O
frequently	O
a	O
page	B-General_Concept
has	O
been	O
used	O
.	O
</s>
<s>
Thus	O
,	O
the	O
page	B-General_Concept
with	O
the	O
lowest	O
counter	O
can	O
be	O
swapped	O
out	O
when	O
necessary	O
.	O
</s>
<s>
The	O
not	O
frequently	O
used	O
page-replacement	O
algorithm	O
generates	O
fewer	O
page	B-General_Concept
faults	I-General_Concept
than	O
the	O
least	O
recently	O
used	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
when	O
the	O
page	B-General_Concept
table	I-General_Concept
contains	O
null	O
pointer	O
values	O
.	O
</s>
<s>
Instead	O
of	O
just	O
incrementing	O
the	O
counters	O
of	O
pages	O
referenced	O
,	O
putting	O
equal	O
emphasis	O
on	O
page	B-General_Concept
references	O
regardless	O
of	O
the	O
time	O
,	O
the	O
reference	O
counter	O
on	O
a	O
page	B-General_Concept
is	O
first	O
shifted	O
right	O
(	O
divided	O
by	O
2	O
)	O
,	O
before	O
adding	O
the	O
referenced	O
bit	O
to	O
the	O
left	O
of	O
that	O
binary	O
number	O
.	O
</s>
<s>
For	O
instance	O
,	O
if	O
a	O
page	B-General_Concept
has	O
referenced	O
bits	O
1	O
,	O
0	O
,	O
0	O
,	O
1	O
,	O
1	O
,	O
0	O
in	O
the	O
past	O
6	O
clock	O
ticks	O
,	O
its	O
referenced	O
counter	O
will	O
look	O
like	O
this	O
:	O
10000000	O
,	O
01000000	O
,	O
00100000	O
,	O
10010000	O
,	O
11001000	O
,	O
01100100	O
.	O
</s>
<s>
Page	B-General_Concept
references	O
closer	O
to	O
the	O
present	O
time	O
have	O
more	O
impact	O
than	O
page	B-General_Concept
references	O
long	O
ago	O
.	O
</s>
<s>
Thus	O
,	O
when	O
a	O
page	B-General_Concept
needs	O
to	O
be	O
swapped	O
out	O
,	O
the	O
page	B-General_Concept
with	O
the	O
lowest	O
counter	O
will	O
be	O
chosen	O
.	O
</s>
<s>
The	O
following	O
Python	B-Language
code	I-Language
simulates	O
the	O
aging	O
algorithm	O
.	O
</s>
<s>
In	O
the	O
given	O
example	O
of	O
R-bits	O
for	O
6	O
pages	O
over	O
5	O
clock	O
ticks	O
,	O
the	O
function	O
prints	O
the	O
following	O
output	O
,	O
which	O
lists	O
the	O
R-bits	O
for	O
each	O
clock	O
tick	O
and	O
the	O
individual	O
counter	O
values	O
for	O
each	O
page	B-Architecture
in	I-Architecture
binary	O
representation	O
.	O
</s>
<s>
Consequently	O
,	O
two	O
pages	O
may	O
have	O
referenced	O
counters	O
of	O
00000000	O
,	O
even	O
though	O
one	O
page	B-General_Concept
was	O
referenced	O
9	O
intervals	O
ago	O
and	O
the	O
other	O
1000	O
intervals	O
ago	O
.	O
</s>
<s>
Generally	O
speaking	O
,	O
knowing	O
the	O
usage	O
within	O
the	O
past	O
16	O
intervals	O
is	O
sufficient	O
for	O
making	O
a	O
good	O
decision	O
as	O
to	O
which	O
page	B-General_Concept
to	O
swap	O
out	O
.	O
</s>
<s>
The	O
basic	O
idea	O
behind	O
this	O
algorithm	O
is	O
Locality	B-General_Concept
of	I-General_Concept
Reference	I-General_Concept
as	O
used	O
in	O
LRU	O
but	O
the	O
difference	O
is	O
that	O
in	O
LDF	O
,	O
locality	O
is	O
based	O
on	O
distance	O
not	O
on	O
the	O
used	O
references	O
.	O
</s>
<s>
In	O
the	O
LDF	O
,	O
replace	O
the	O
page	B-General_Concept
which	O
is	O
on	O
longest	O
distance	O
from	O
the	O
current	O
page	B-General_Concept
.	O
</s>
<s>
If	O
two	O
pages	O
are	O
on	O
same	O
distance	O
then	O
the	O
page	B-General_Concept
which	O
is	O
next	O
to	O
current	O
page	B-Architecture
in	I-Architecture
anti-clock	O
rotation	O
will	O
get	O
replaced	O
.	O
</s>
<s>
Many	O
of	O
the	O
techniques	O
discussed	O
above	O
assume	O
the	O
presence	O
of	O
a	O
reference	O
bit	O
associated	O
with	O
each	O
page	B-General_Concept
.	O
</s>
<s>
One	O
notable	O
example	O
is	O
VAX	B-Device
hardware	O
running	O
OpenVMS	B-Operating_System
.	O
</s>
<s>
This	O
system	O
knows	O
if	O
a	O
page	B-General_Concept
has	O
been	O
modified	O
,	O
but	O
not	O
necessarily	O
if	O
a	O
page	B-General_Concept
has	O
been	O
read	O
.	O
</s>
<s>
Its	O
approach	O
is	O
known	O
as	O
Secondary	O
Page	B-General_Concept
Caching	O
.	O
</s>
<s>
Pages	O
removed	O
from	O
working	B-General_Concept
sets	I-General_Concept
(	O
process-private	O
memory	O
,	O
generally	O
)	O
are	O
placed	O
on	O
special-purpose	O
lists	O
while	O
remaining	O
in	O
physical	O
memory	O
for	O
some	O
time	O
.	O
</s>
<s>
Removing	O
a	O
page	B-General_Concept
from	O
a	O
working	B-General_Concept
set	I-General_Concept
is	O
not	O
technically	O
a	O
page-replacement	O
operation	O
,	O
but	O
effectively	O
identifies	O
that	O
page	B-General_Concept
as	O
a	O
candidate	O
.	O
</s>
<s>
A	O
page	B-General_Concept
whose	O
backing	O
store	O
is	O
still	O
valid	O
(	O
whose	O
contents	O
are	O
not	O
dirty	O
,	O
or	O
otherwise	O
do	O
not	O
need	O
to	O
be	O
preserved	O
)	O
is	O
placed	O
on	O
the	O
tail	O
of	O
the	O
Free	O
Page	B-General_Concept
List	O
.	O
</s>
<s>
A	O
page	B-General_Concept
that	O
requires	O
writing	O
to	O
backing	O
store	O
will	O
be	O
placed	O
on	O
the	O
Modified	O
Page	B-General_Concept
List	O
.	O
</s>
<s>
These	O
actions	O
are	O
typically	O
triggered	O
when	O
the	O
size	O
of	O
the	O
Free	O
Page	B-General_Concept
List	O
falls	O
below	O
an	O
adjustable	O
threshold	O
.	O
</s>
<s>
Pages	O
may	O
be	O
selected	O
for	O
working	B-General_Concept
set	I-General_Concept
removal	O
in	O
an	O
essentially	O
random	O
fashion	O
,	O
with	O
the	O
expectation	O
that	O
if	O
a	O
poor	O
choice	O
is	O
made	O
,	O
a	O
future	O
reference	O
may	O
retrieve	O
that	O
page	B-General_Concept
from	O
the	O
Free	O
or	O
Modified	O
list	O
before	O
it	O
is	O
removed	O
from	O
physical	O
memory	O
.	O
</s>
<s>
A	O
page	B-General_Concept
referenced	O
this	O
way	O
will	O
be	O
removed	O
from	O
the	O
Free	O
or	O
Modified	O
list	O
and	O
placed	O
back	O
into	O
a	O
process	O
working	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
The	O
Modified	O
Page	B-General_Concept
List	O
additionally	O
provides	O
an	O
opportunity	O
to	O
write	O
pages	O
out	O
to	O
backing	O
store	O
in	O
groups	O
of	O
more	O
than	O
one	O
page	B-General_Concept
,	O
increasing	O
efficiency	O
.	O
</s>
<s>
These	O
pages	O
can	O
then	O
be	O
placed	O
on	O
the	O
Free	O
Page	B-General_Concept
List	O
.	O
</s>
<s>
The	O
sequence	O
of	O
pages	O
that	O
works	O
its	O
way	O
to	O
the	O
head	O
of	O
the	O
Free	O
Page	B-General_Concept
List	O
resembles	O
the	O
results	O
of	O
a	O
LRU	O
or	O
NRU	O
mechanism	O
and	O
the	O
overall	O
effect	O
has	O
similarities	O
to	O
the	O
Second-Chance	O
algorithm	O
described	O
earlier	O
.	O
</s>
<s>
Another	O
example	O
is	O
used	O
by	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
on	O
ARM	B-Architecture
.	O
</s>
<s>
The	O
lack	O
of	O
hardware	O
functionality	O
is	O
made	O
up	O
for	O
by	O
providing	O
two	O
page	B-General_Concept
tables	I-General_Concept
–	O
the	O
processor-native	O
page	B-General_Concept
tables	I-General_Concept
,	O
with	O
neither	O
referenced	O
bits	O
nor	O
dirty	B-Operating_System
bits	I-Operating_System
,	O
and	O
software-maintained	O
page	B-General_Concept
tables	I-General_Concept
with	O
the	O
required	O
bits	O
present	O
.	O
</s>
<s>
The	O
emulated	O
bits	O
in	O
the	O
software-maintained	O
table	O
are	O
set	O
by	O
page	B-General_Concept
faults	I-General_Concept
.	O
</s>
<s>
In	O
order	O
to	O
get	O
the	O
page	B-General_Concept
faults	I-General_Concept
,	O
clearing	O
emulated	O
bits	O
in	O
the	O
second	O
table	O
revokes	O
some	O
of	O
the	O
access	O
rights	O
to	O
the	O
corresponding	O
page	B-General_Concept
,	O
which	O
is	O
implemented	O
by	O
altering	O
the	O
native	O
table	O
.	O
</s>
<s>
This	O
includes	O
the	O
heap	O
and	O
stack	B-General_Concept
of	O
user-space	B-Operating_System
programs	O
.	O
</s>
<s>
If	O
present	O
in	O
memory	O
and	O
not	O
privately	O
modified	O
the	O
physical	O
page	B-General_Concept
is	O
shared	O
with	O
file	O
cache	O
or	O
buffer	O
.	O
</s>
<s>
The	O
tmpfs	B-Application
in-memory	O
filesystem	O
;	O
written	O
to	O
swap	O
when	O
paged	O
out	O
.	O
</s>
<s>
The	O
cache	O
of	O
block	O
devices	O
,	O
called	O
the	O
"	O
buffer	O
"	O
by	O
Linux	B-Operating_System
(	O
not	O
to	O
be	O
confused	O
with	O
other	O
structures	O
also	O
called	O
buffers	O
like	O
those	O
use	O
for	O
pipes	B-Operating_System
and	O
buffers	O
used	O
internally	O
in	O
Linux	B-Operating_System
)	O
;	O
written	O
to	O
the	O
underlying	O
storage	O
when	O
paged	O
out	O
.	O
</s>
<s>
The	O
unified	O
page	B-General_Concept
cache	O
operates	O
on	O
units	O
of	O
the	O
smallest	O
page	B-General_Concept
size	I-General_Concept
supported	O
by	O
the	O
CPU	O
(	O
4KiB	O
in	O
ARMv8	O
,	O
x86	B-Operating_System
and	O
x86-64	B-Device
)	O
with	O
some	O
pages	O
of	O
the	O
next	O
larger	O
size	O
(	O
2	O
MiB	O
in	O
x86-64	B-Device
)	O
called	O
"	O
huge	O
pages	O
"	O
by	O
Linux	B-Operating_System
.	O
</s>
<s>
The	O
pages	O
in	O
the	O
page	B-General_Concept
cache	O
are	O
divided	O
in	O
an	O
"	O
active	O
"	O
set	O
and	O
an	O
"	O
inactive	O
"	O
set	O
.	O
</s>
<s>
In	O
the	O
basic	O
case	O
,	O
when	O
a	O
page	B-General_Concept
is	O
accessed	O
by	O
a	O
user-space	B-Operating_System
program	O
it	O
is	O
put	O
in	O
the	O
head	O
of	O
the	O
inactive	O
set	O
.	O
</s>
<s>
Linux	B-Operating_System
moves	O
the	O
pages	O
from	O
the	O
active	O
set	O
to	O
the	O
inactive	O
set	O
as	O
needed	O
so	O
that	O
the	O
active	O
set	O
is	O
smaller	O
than	O
the	O
inactive	O
set	O
.	O
</s>
<s>
When	O
a	O
page	B-General_Concept
is	O
moved	O
to	O
the	O
inactive	O
set	O
it	O
is	O
removed	O
from	O
the	O
page	B-General_Concept
table	I-General_Concept
of	O
any	O
process	O
address	O
space	O
,	O
without	O
being	O
paged	O
out	O
of	O
physical	O
memory	O
.	O
</s>
<s>
When	O
a	O
page	B-General_Concept
is	O
removed	O
from	O
the	O
inactive	O
set	O
,	O
it	O
is	O
paged	O
out	O
of	O
physical	O
memory	O
.	O
</s>
<s>
The	O
working	B-General_Concept
set	I-General_Concept
of	O
a	O
process	O
is	O
the	O
set	O
of	O
pages	O
expected	O
to	O
be	O
used	O
by	O
that	O
process	O
during	O
some	O
time	O
interval	O
.	O
</s>
