<s>
A	O
page	B-General_Concept
table	I-General_Concept
is	O
the	O
data	B-General_Concept
structure	I-General_Concept
used	O
by	O
a	O
virtual	B-Architecture
memory	I-Architecture
system	O
in	O
a	O
computer	B-General_Concept
operating	I-General_Concept
system	I-General_Concept
to	O
store	O
the	O
mapping	O
between	O
virtual	O
addresses	O
and	O
physical	O
addresses	O
.	O
</s>
<s>
Virtual	O
addresses	O
are	O
used	O
by	O
the	O
program	O
executed	O
by	O
the	O
accessing	O
process	B-Operating_System
,	O
while	O
physical	O
addresses	O
are	O
used	O
by	O
the	O
hardware	O
,	O
or	O
more	O
specifically	O
,	O
by	O
the	O
random-access	B-Architecture
memory	I-Architecture
(	O
RAM	B-Architecture
)	O
subsystem	O
.	O
</s>
<s>
The	O
page	B-General_Concept
table	I-General_Concept
is	O
a	O
key	O
component	O
of	O
virtual	B-Architecture
address	I-Architecture
translation	I-Architecture
that	O
is	O
necessary	O
to	O
access	O
data	B-General_Concept
in	O
memory	O
.	O
</s>
<s>
In	O
operating	B-General_Concept
systems	I-General_Concept
that	O
use	O
virtual	B-Architecture
memory	I-Architecture
,	O
every	O
process	B-Operating_System
is	O
given	O
the	O
impression	O
that	O
it	O
is	O
working	O
with	O
large	O
,	O
contiguous	O
sections	O
of	O
memory	O
.	O
</s>
<s>
Physically	O
,	O
the	O
memory	O
of	O
each	O
process	B-Operating_System
may	O
be	O
dispersed	O
across	O
different	O
areas	O
of	O
physical	O
memory	O
,	O
or	O
may	O
have	O
been	O
moved	O
(	O
paged	B-Architecture
out	I-Architecture
)	O
to	O
secondary	O
storage	O
,	O
typically	O
to	O
a	O
hard	B-Device
disk	I-Device
drive	I-Device
(	O
HDD	O
)	O
or	O
solid-state	B-Device
drive	I-Device
(	O
SSD	B-Device
)	O
.	O
</s>
<s>
When	O
a	O
process	B-Operating_System
requests	O
access	O
to	O
data	B-General_Concept
in	O
its	O
memory	O
,	O
it	O
is	O
the	O
responsibility	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
to	O
map	O
the	O
virtual	B-General_Concept
address	I-General_Concept
provided	O
by	O
the	O
process	B-Operating_System
to	O
the	O
physical	B-General_Concept
address	I-General_Concept
of	O
the	O
actual	O
memory	O
where	O
that	O
data	B-General_Concept
is	O
stored	O
.	O
</s>
<s>
The	O
page	B-General_Concept
table	I-General_Concept
is	O
where	O
the	O
operating	B-General_Concept
system	I-General_Concept
stores	O
its	O
mappings	O
of	O
virtual	O
addresses	O
to	O
physical	O
addresses	O
,	O
with	O
each	O
mapping	O
also	O
known	O
as	O
a	O
page	B-General_Concept
table	I-General_Concept
entry	O
(	O
PTE	O
)	O
.	O
</s>
<s>
The	O
memory	B-General_Concept
management	I-General_Concept
unit	I-General_Concept
(	O
MMU	O
)	O
inside	O
the	O
CPU	O
stores	O
a	O
cache	O
of	O
recently	O
used	O
mappings	O
from	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
page	B-General_Concept
table	I-General_Concept
.	O
</s>
<s>
This	O
is	O
called	O
the	O
translation	B-Architecture
lookaside	I-Architecture
buffer	I-Architecture
(	O
TLB	B-Architecture
)	O
,	O
which	O
is	O
an	O
associative	O
cache	O
.	O
</s>
<s>
When	O
a	O
virtual	B-General_Concept
address	I-General_Concept
needs	O
to	O
be	O
translated	O
into	O
a	O
physical	B-General_Concept
address	I-General_Concept
,	O
the	O
TLB	B-Architecture
is	O
searched	O
first	O
.	O
</s>
<s>
If	O
a	O
match	O
is	O
found	O
,	O
which	O
is	O
known	O
as	O
a	O
TLB	B-Architecture
hit	O
,	O
the	O
physical	B-General_Concept
address	I-General_Concept
is	O
returned	O
and	O
memory	O
access	O
can	O
continue	O
.	O
</s>
<s>
However	O
,	O
if	O
there	O
is	O
no	O
match	O
,	O
which	O
is	O
called	O
a	O
TLB	B-Architecture
miss	O
,	O
the	O
MMU	O
or	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
TLB	B-Architecture
miss	O
handler	O
will	O
typically	O
look	O
up	O
the	O
address	O
mapping	O
in	O
the	O
page	B-General_Concept
table	I-General_Concept
to	O
see	O
whether	O
a	O
mapping	O
exists	O
,	O
which	O
is	O
called	O
a	O
page	O
walk	O
.	O
</s>
<s>
If	O
one	O
exists	O
,	O
it	O
is	O
written	O
back	O
to	O
the	O
TLB	B-Architecture
,	O
which	O
must	O
be	O
done	O
because	O
the	O
hardware	O
accesses	O
memory	O
through	O
the	O
TLB	B-Architecture
in	O
a	O
virtual	B-Architecture
memory	I-Architecture
system	O
,	O
and	O
the	O
faulting	O
instruction	O
is	O
restarted	O
,	O
which	O
may	O
happen	O
in	O
parallel	O
as	O
well	O
.	O
</s>
<s>
The	O
subsequent	O
translation	O
will	O
result	O
in	O
a	O
TLB	B-Architecture
hit	O
,	O
and	O
the	O
memory	O
access	O
will	O
continue	O
.	O
</s>
<s>
The	O
page	B-General_Concept
table	I-General_Concept
lookup	O
may	O
fail	O
,	O
triggering	O
a	O
page	B-General_Concept
fault	I-General_Concept
,	O
for	O
two	O
reasons	O
:	O
</s>
<s>
The	O
lookup	O
may	O
fail	O
if	O
there	O
is	O
no	O
translation	O
available	O
for	O
the	O
virtual	B-General_Concept
address	I-General_Concept
,	O
meaning	O
that	O
virtual	B-General_Concept
address	I-General_Concept
is	O
invalid	O
.	O
</s>
<s>
This	O
will	O
typically	O
occur	O
because	O
of	O
a	O
programming	O
error	O
,	O
and	O
the	O
operating	B-General_Concept
system	I-General_Concept
must	O
take	O
some	O
action	O
to	O
deal	O
with	O
the	O
problem	O
.	O
</s>
<s>
On	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
,	O
it	O
will	O
cause	O
a	O
segmentation	B-Error_Name
fault	I-Error_Name
signal	O
being	O
sent	O
to	O
the	O
offending	O
program	O
.	O
</s>
<s>
This	O
will	O
occur	O
if	O
the	O
requested	O
page	O
has	O
been	O
moved	B-Architecture
out	I-Architecture
of	O
physical	O
memory	O
to	O
make	O
room	O
for	O
another	O
page	O
.	O
</s>
<s>
In	O
this	O
case	O
the	O
page	O
is	O
paged	B-Architecture
out	I-Architecture
to	O
a	O
secondary	O
store	O
located	O
on	O
a	O
medium	O
such	O
as	O
a	O
hard	B-Device
disk	I-Device
drive	I-Device
(	O
this	O
secondary	O
store	O
,	O
or	O
"	O
backing	O
store	O
"	O
,	O
is	O
often	O
called	O
a	O
swap	O
partition	O
if	O
it	O
is	O
a	O
disk	O
partition	O
,	O
or	O
a	O
swap	O
file	O
,	O
swapfile	B-Architecture
or	O
page	B-Architecture
file	I-Architecture
if	O
it	O
is	O
a	O
file	O
)	O
.	O
</s>
<s>
A	O
similar	O
mechanism	O
is	O
used	O
for	O
memory-mapped	B-General_Concept
files	I-General_Concept
,	O
which	O
are	O
mapped	O
to	O
virtual	B-Architecture
memory	I-Architecture
and	O
loaded	O
to	O
physical	O
memory	O
on	O
demand	O
.	O
</s>
<s>
When	O
physical	O
memory	O
is	O
not	O
full	O
this	O
is	O
a	O
simple	O
operation	O
;	O
the	O
page	O
is	O
written	O
back	O
into	O
physical	O
memory	O
,	O
the	O
page	B-General_Concept
table	I-General_Concept
and	O
TLB	B-Architecture
are	O
updated	O
,	O
and	O
the	O
instruction	O
is	O
restarted	O
.	O
</s>
<s>
However	O
,	O
when	O
physical	O
memory	O
is	O
full	O
,	O
one	O
or	O
more	O
pages	O
in	O
physical	O
memory	O
will	O
need	O
to	O
be	O
paged	B-Architecture
out	I-Architecture
to	O
make	O
room	O
for	O
the	O
requested	O
page	O
.	O
</s>
<s>
The	O
page	B-General_Concept
table	I-General_Concept
needs	O
to	O
be	O
updated	O
to	O
mark	O
that	O
the	O
pages	O
that	O
were	O
previously	O
in	O
physical	O
memory	O
are	O
no	O
longer	O
there	O
,	O
and	O
to	O
mark	O
that	O
the	O
page	O
that	O
was	O
on	O
disk	O
is	O
now	O
in	O
physical	O
memory	O
.	O
</s>
<s>
The	O
TLB	B-Architecture
also	O
needs	O
to	O
be	O
updated	O
,	O
including	O
removal	O
of	O
the	O
paged-out	O
page	O
from	O
it	O
,	O
and	O
the	O
instruction	O
restarted	O
.	O
</s>
<s>
Which	O
page	O
to	O
page	B-Architecture
out	I-Architecture
is	O
the	O
subject	O
of	O
page	B-General_Concept
replacement	I-General_Concept
algorithms	I-General_Concept
.	O
</s>
<s>
Some	O
MMUs	O
trigger	O
a	O
page	B-General_Concept
fault	I-General_Concept
for	O
other	O
reasons	O
,	O
whether	O
or	O
not	O
the	O
page	O
is	O
currently	O
resident	O
in	O
physical	O
memory	O
and	O
mapped	O
into	O
the	O
virtual	B-General_Concept
address	I-General_Concept
space	I-General_Concept
of	O
a	O
process	B-Operating_System
:	O
</s>
<s>
Attempting	O
to	O
write	O
when	O
the	O
page	B-General_Concept
table	I-General_Concept
has	O
the	O
read-only	O
bit	O
set	O
causes	O
a	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
This	O
is	O
a	O
normal	O
part	O
of	O
many	O
operating	B-General_Concept
system	I-General_Concept
's	O
implementation	O
of	O
copy-on-write	B-Language
;	O
it	O
may	O
also	O
occur	O
when	O
a	O
write	O
is	O
done	O
to	O
a	O
location	O
from	O
which	O
the	O
process	B-Operating_System
is	O
allowed	O
to	O
read	O
but	O
to	O
which	O
it	O
is	O
not	O
allowed	O
to	O
write	O
,	O
in	O
which	O
case	O
a	O
signal	O
is	O
delivered	O
to	O
the	O
process	B-Operating_System
.	O
</s>
<s>
Attempting	O
to	O
execute	O
code	O
when	O
the	O
page	B-General_Concept
table	I-General_Concept
has	O
the	O
NX	B-General_Concept
bit	I-General_Concept
(	O
no-execute	B-General_Concept
bit	I-General_Concept
)	O
set	O
in	O
the	O
page	B-General_Concept
table	I-General_Concept
causes	O
a	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
This	O
can	O
be	O
used	O
by	O
an	O
operating	B-General_Concept
system	I-General_Concept
,	O
in	O
combination	O
with	O
the	O
read-only	O
bit	O
,	O
to	O
provide	O
a	O
Write	O
XOR	O
Execute	O
feature	O
that	O
stops	O
some	O
kinds	O
of	O
exploits	O
.	O
</s>
<s>
The	O
simplest	O
page	B-General_Concept
table	I-General_Concept
systems	O
often	O
maintain	O
a	O
frame	B-General_Concept
table	O
and	O
a	O
page	B-General_Concept
table	I-General_Concept
.	O
</s>
<s>
The	O
frame	B-General_Concept
table	O
holds	O
information	O
about	O
which	O
frames	O
are	O
mapped	O
.	O
</s>
<s>
In	O
more	O
advanced	O
systems	O
,	O
the	O
frame	B-General_Concept
table	O
can	O
also	O
hold	O
information	O
about	O
which	O
address	O
space	O
a	O
page	O
belongs	O
to	O
,	O
statistics	O
information	O
,	O
or	O
other	O
background	O
information	O
.	O
</s>
<s>
The	O
page	B-General_Concept
table	I-General_Concept
is	O
an	O
array	O
of	O
page	B-General_Concept
table	I-General_Concept
entries	O
.	O
</s>
<s>
Each	O
page	B-General_Concept
table	I-General_Concept
entry	O
(	O
PTE	O
)	O
holds	O
the	O
mapping	O
between	O
a	O
virtual	B-General_Concept
address	I-General_Concept
of	O
a	O
page	O
and	O
the	O
address	O
of	O
a	O
physical	O
frame	B-General_Concept
.	O
</s>
<s>
There	O
is	O
also	O
auxiliary	O
information	O
about	O
the	O
page	O
such	O
as	O
a	O
present	O
bit	O
,	O
a	O
dirty	B-Operating_System
or	O
modified	O
bit	O
,	O
address	O
space	O
or	O
process	B-Operating_System
ID	O
information	O
,	O
amongst	O
others	O
.	O
</s>
<s>
Secondary	O
storage	O
,	O
such	O
as	O
a	O
hard	B-Device
disk	I-Device
drive	I-Device
,	O
can	O
be	O
used	O
to	O
augment	O
physical	O
memory	O
.	O
</s>
<s>
whether	O
to	O
load	O
a	O
page	O
from	O
disk	O
and	O
page	O
another	O
page	B-Architecture
in	I-Architecture
physical	O
memory	O
out	O
.	O
</s>
<s>
The	O
dirty	B-Operating_System
bit	I-Operating_System
allows	O
for	O
a	O
performance	O
optimization	O
.	O
</s>
<s>
A	O
page	O
on	O
disk	O
that	O
is	O
paged	O
in	O
to	O
physical	O
memory	O
,	O
then	O
read	O
from	O
,	O
and	O
subsequently	O
paged	B-Architecture
out	I-Architecture
again	O
does	O
not	O
need	O
to	O
be	O
written	O
back	O
to	O
disk	O
,	O
since	O
the	O
page	O
has	O
not	O
changed	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
page	O
was	O
written	O
to	O
after	O
it	O
is	O
paged	O
in	O
,	O
its	O
dirty	B-Operating_System
bit	I-Operating_System
will	O
be	O
set	O
,	O
indicating	O
that	O
the	O
page	O
must	O
be	O
written	O
back	O
to	O
the	O
backing	O
store	O
.	O
</s>
<s>
When	O
a	O
dirty	B-Operating_System
bit	I-Operating_System
is	O
not	O
used	O
,	O
the	O
backing	O
store	O
need	O
only	O
be	O
as	O
large	O
as	O
the	O
instantaneous	O
total	O
size	O
of	O
all	O
paged-out	O
pages	O
at	O
any	O
moment	O
.	O
</s>
<s>
When	O
a	O
dirty	B-Operating_System
bit	I-Operating_System
is	O
used	O
,	O
at	O
all	O
times	O
some	O
pages	O
will	O
exist	O
in	O
both	O
physical	O
memory	O
and	O
the	O
backing	O
store	O
.	O
</s>
<s>
In	O
operating	B-General_Concept
systems	I-General_Concept
that	O
are	O
not	O
single	B-Operating_System
address	I-Operating_System
space	I-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
address	O
space	O
or	O
process	B-Operating_System
ID	O
information	O
is	O
necessary	O
so	O
the	O
virtual	B-Architecture
memory	I-Architecture
management	O
system	O
knows	O
what	O
pages	O
to	O
associate	O
to	O
what	O
process	B-Operating_System
.	O
</s>
<s>
The	O
page	B-General_Concept
table	I-General_Concept
must	O
supply	O
different	O
virtual	B-Architecture
memory	I-Architecture
mappings	O
for	O
the	O
two	O
processes	O
.	O
</s>
<s>
This	O
can	O
be	O
done	O
by	O
assigning	O
the	O
two	O
processes	O
distinct	O
address	O
map	O
identifiers	O
,	O
or	O
by	O
using	O
process	B-Operating_System
IDs	O
.	O
</s>
<s>
Associating	O
process	B-Operating_System
IDs	O
with	O
virtual	B-General_Concept
memory	I-General_Concept
pages	I-General_Concept
can	O
also	O
aid	O
in	O
selection	O
of	O
pages	O
to	O
page	B-Architecture
out	I-Architecture
,	O
as	O
pages	O
associated	O
with	O
inactive	O
processes	O
,	O
particularly	O
processes	O
whose	O
code	O
pages	O
have	O
been	O
paged	B-Architecture
out	I-Architecture
,	O
are	O
less	O
likely	O
to	O
be	O
needed	O
immediately	O
than	O
pages	O
belonging	O
to	O
active	O
processes	O
.	O
</s>
<s>
As	O
an	O
alternative	O
to	O
tagging	O
page	B-General_Concept
table	I-General_Concept
entries	O
with	O
process-unique	O
identifiers	O
,	O
the	O
page	B-General_Concept
table	I-General_Concept
itself	O
may	O
occupy	O
a	O
different	O
virtual-memory	O
page	O
for	O
each	O
process	B-Operating_System
so	O
that	O
the	O
page	B-General_Concept
table	I-General_Concept
becomes	O
a	O
part	O
of	O
the	O
process	B-Operating_System
context	O
.	O
</s>
<s>
In	O
such	O
an	O
implementation	O
,	O
the	O
process	B-Operating_System
's	O
page	B-General_Concept
table	I-General_Concept
can	O
be	O
paged	B-Architecture
out	I-Architecture
whenever	O
the	O
process	B-Operating_System
is	O
no	O
longer	O
resident	O
in	O
memory	O
.	O
</s>
<s>
There	O
are	O
several	O
types	O
of	O
page	B-General_Concept
tables	I-General_Concept
,	O
which	O
are	O
optimized	O
for	O
different	O
requirements	O
.	O
</s>
<s>
Essentially	O
,	O
a	O
bare-bones	O
page	B-General_Concept
table	I-General_Concept
must	O
store	O
the	O
virtual	B-General_Concept
address	I-General_Concept
,	O
the	O
physical	B-General_Concept
address	I-General_Concept
that	O
is	O
"	O
under	O
"	O
this	O
virtual	B-General_Concept
address	I-General_Concept
,	O
and	O
possibly	O
some	O
address	O
space	O
information	O
.	O
</s>
<s>
An	O
inverted	O
page	B-General_Concept
table	I-General_Concept
(	O
IPT	O
)	O
is	O
best	O
thought	O
of	O
as	O
an	O
off-chip	O
extension	O
of	O
the	O
TLB	B-Architecture
which	O
uses	O
normal	O
system	O
RAM	B-Architecture
.	O
</s>
<s>
Unlike	O
a	O
true	O
page	B-General_Concept
table	I-General_Concept
,	O
it	O
is	O
not	O
necessarily	O
able	O
to	O
hold	O
all	O
current	O
mappings	O
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
must	O
be	O
prepared	O
to	O
handle	O
misses	O
,	O
just	O
as	O
it	O
would	O
with	O
a	O
MIPS-style	O
software-filled	O
TLB	B-Architecture
.	O
</s>
<s>
The	O
IPT	O
combines	O
a	O
page	B-General_Concept
table	I-General_Concept
and	O
a	O
frame	B-General_Concept
table	O
into	O
one	O
data	B-General_Concept
structure	I-General_Concept
.	O
</s>
<s>
If	O
there	O
are	O
4,000	O
frames	O
,	O
the	O
inverted	O
page	B-General_Concept
table	I-General_Concept
has	O
4,000	O
rows	O
.	O
</s>
<s>
For	O
each	O
row	O
there	O
is	O
an	O
entry	O
for	O
the	O
virtual	B-General_Concept
page	I-General_Concept
number	O
(	O
VPN	O
)	O
,	O
the	O
physical	O
page	O
number	O
(	O
not	O
the	O
physical	B-General_Concept
address	I-General_Concept
)	O
,	O
some	O
other	O
data	B-General_Concept
and	O
a	O
means	O
for	O
creating	O
a	O
collision	B-Algorithm
chain	O
,	O
as	O
we	O
will	O
see	O
later	O
.	O
</s>
<s>
To	O
search	O
through	O
all	O
entries	O
of	O
the	O
core	O
IPT	O
structure	O
is	O
inefficient	O
,	O
and	O
a	O
hash	B-Algorithm
table	I-Algorithm
may	O
be	O
used	O
to	O
map	O
virtual	O
addresses	O
(	O
and	O
address	O
space/PID	O
information	O
if	O
need	O
be	O
)	O
to	O
an	O
index	O
in	O
the	O
IPT	O
-	O
this	O
is	O
where	O
the	O
collision	B-Algorithm
chain	O
is	O
used	O
.	O
</s>
<s>
This	O
hash	B-Algorithm
table	I-Algorithm
is	O
known	O
as	O
a	O
hash	B-Error_Name
anchor	O
table	O
.	O
</s>
<s>
The	O
hashing	B-Error_Name
function	I-Error_Name
is	O
not	O
generally	O
optimized	O
for	O
coverage	O
-	O
raw	O
speed	O
is	O
more	O
desirable	O
.	O
</s>
<s>
Of	O
course	O
,	O
hash	B-Algorithm
tables	I-Algorithm
experience	O
collisions	O
.	O
</s>
<s>
Due	O
to	O
this	O
chosen	O
hashing	B-Error_Name
function	I-Error_Name
,	O
we	O
may	O
experience	O
a	O
lot	O
of	O
collisions	O
in	O
usage	O
,	O
so	O
for	O
each	O
entry	O
in	O
the	O
table	O
the	O
VPN	O
is	O
provided	O
to	O
check	O
if	O
it	O
is	O
the	O
searched	O
entry	O
or	O
a	O
collision	B-Algorithm
.	O
</s>
<s>
In	O
searching	O
for	O
a	O
mapping	O
,	O
the	O
hash	B-Error_Name
anchor	O
table	O
is	O
used	O
.	O
</s>
<s>
If	O
no	O
entry	O
exists	O
,	O
a	O
page	B-General_Concept
fault	I-General_Concept
occurs	O
.	O
</s>
<s>
Depending	O
on	O
the	O
architecture	O
,	O
the	O
entry	O
may	O
be	O
placed	O
in	O
the	O
TLB	B-Architecture
again	O
and	O
the	O
memory	O
reference	O
is	O
restarted	O
,	O
or	O
the	O
collision	B-Algorithm
chain	O
may	O
be	O
followed	O
until	O
it	O
has	O
been	O
exhausted	O
and	O
a	O
page	B-General_Concept
fault	I-General_Concept
occurs	O
.	O
</s>
<s>
A	O
virtual	B-General_Concept
address	I-General_Concept
in	O
this	O
schema	O
could	O
be	O
split	O
into	O
two	O
,	O
the	O
first	O
half	O
being	O
a	O
virtual	B-General_Concept
page	I-General_Concept
number	O
and	O
the	O
second	O
half	O
being	O
the	O
offset	O
in	O
that	O
page	O
.	O
</s>
<s>
A	O
major	O
problem	O
with	O
this	O
design	O
is	O
poor	O
cache	B-General_Concept
locality	I-General_Concept
caused	O
by	O
the	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
Tree-based	O
designs	O
avoid	O
this	O
by	O
placing	O
the	O
page	B-General_Concept
table	I-General_Concept
entries	O
for	O
adjacent	O
pages	O
in	O
adjacent	O
locations	O
,	O
but	O
an	O
inverted	O
page	B-General_Concept
table	I-General_Concept
destroys	O
spatial	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
by	O
scattering	O
entries	O
all	O
over	O
.	O
</s>
<s>
An	O
operating	B-General_Concept
system	I-General_Concept
may	O
minimize	O
the	O
size	O
of	O
the	O
hash	B-Algorithm
table	I-Algorithm
to	O
reduce	O
this	O
problem	O
,	O
with	O
the	O
trade-off	O
being	O
an	O
increased	O
miss	O
rate	O
.	O
</s>
<s>
There	O
is	O
normally	O
one	O
hash	B-Algorithm
table	I-Algorithm
,	O
contiguous	O
in	O
physical	O
memory	O
,	O
shared	O
by	O
all	O
processes	O
.	O
</s>
<s>
A	O
per-process	O
identifier	O
is	O
used	O
to	O
disambiguate	O
the	O
pages	O
of	O
different	O
processes	O
from	O
each	O
other	O
.	O
</s>
<s>
It	O
is	O
somewhat	O
slow	O
to	O
remove	O
the	O
page	B-General_Concept
table	I-General_Concept
entries	O
of	O
a	O
given	O
process	B-Operating_System
;	O
the	O
OS	O
may	O
avoid	O
reusing	O
per-process	O
identifier	O
values	O
to	O
delay	O
facing	O
this	O
.	O
</s>
<s>
Alternatively	O
,	O
per-process	O
hash	B-Algorithm
tables	I-Algorithm
may	O
be	O
used	O
,	O
but	O
they	O
are	O
impractical	O
because	O
of	O
memory	B-Architecture
fragmentation	I-Architecture
,	O
which	O
requires	O
the	O
tables	O
to	O
be	O
pre-allocated	O
.	O
</s>
<s>
Inverted	O
page	B-General_Concept
tables	I-General_Concept
are	O
used	O
for	O
example	O
on	O
the	O
PowerPC	B-Architecture
,	O
the	O
UltraSPARC	B-General_Concept
and	O
the	O
IA-64	B-General_Concept
architecture	O
.	O
</s>
<s>
The	O
inverted	O
page	B-General_Concept
table	I-General_Concept
keeps	O
a	O
listing	O
of	O
mappings	O
installed	O
for	O
all	O
frames	O
in	O
physical	O
memory	O
.	O
</s>
<s>
Instead	O
of	O
doing	O
so	O
,	O
we	O
could	O
create	O
a	O
page	B-General_Concept
table	I-General_Concept
structure	O
that	O
contains	O
mappings	O
for	O
virtual	B-General_Concept
pages	I-General_Concept
.	O
</s>
<s>
It	O
is	O
done	O
by	O
keeping	O
several	O
page	B-General_Concept
tables	I-General_Concept
that	O
cover	O
a	O
certain	O
block	O
of	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
For	O
example	O
,	O
we	O
can	O
create	O
smaller	O
1024-entry	O
4KB	O
pages	O
that	O
cover	O
4MB	O
of	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
This	O
is	O
useful	O
since	O
often	O
the	O
top-most	O
parts	O
and	O
bottom-most	O
parts	O
of	O
virtual	B-Architecture
memory	I-Architecture
are	O
used	O
in	O
running	O
a	O
process	B-Operating_System
-	O
the	O
top	O
is	O
often	O
used	O
for	O
text	O
and	O
data	B-General_Concept
segments	O
while	O
the	O
bottom	O
for	O
stack	O
,	O
with	O
free	O
memory	O
in	O
between	O
.	O
</s>
<s>
The	O
multilevel	O
page	B-General_Concept
table	I-General_Concept
may	O
keep	O
a	O
few	O
of	O
the	O
smaller	O
page	B-General_Concept
tables	I-General_Concept
to	O
cover	O
just	O
the	O
top	O
and	O
bottom	O
parts	O
of	O
memory	O
and	O
create	O
new	O
ones	O
only	O
when	O
strictly	O
necessary	O
.	O
</s>
<s>
Now	O
,	O
each	O
of	O
these	O
smaller	O
page	B-General_Concept
tables	I-General_Concept
are	O
linked	O
together	O
by	O
a	O
master	O
page	B-General_Concept
table	I-General_Concept
,	O
effectively	O
creating	O
a	O
tree	B-Application
data	I-Application
structure	I-Application
.	O
</s>
<s>
For	O
example	O
,	O
a	O
virtual	B-General_Concept
address	I-General_Concept
in	O
this	O
schema	O
could	O
be	O
split	O
into	O
three	O
parts	O
:	O
the	O
index	O
in	O
the	O
root	O
page	B-General_Concept
table	I-General_Concept
,	O
the	O
index	O
in	O
the	O
sub-page	O
table	O
,	O
and	O
the	O
offset	O
in	O
that	O
page	O
.	O
</s>
<s>
Multilevel	O
page	B-General_Concept
tables	I-General_Concept
are	O
also	O
referred	O
to	O
as	O
"	O
hierarchical	O
page	B-General_Concept
tables	I-General_Concept
"	O
.	O
</s>
<s>
It	O
was	O
mentioned	O
that	O
creating	O
a	O
page	B-General_Concept
table	I-General_Concept
structure	O
that	O
contained	O
mappings	O
for	O
every	O
virtual	B-General_Concept
page	I-General_Concept
in	O
the	O
virtual	B-General_Concept
address	I-General_Concept
space	I-General_Concept
could	O
end	O
up	O
being	O
wasteful	O
.	O
</s>
<s>
But	O
,	O
we	O
can	O
get	O
around	O
the	O
excessive	O
space	O
concerns	O
by	O
putting	O
the	O
page	B-General_Concept
table	I-General_Concept
in	O
virtual	B-Architecture
memory	I-Architecture
,	O
and	O
letting	O
the	O
virtual	B-Architecture
memory	I-Architecture
system	O
manage	O
the	O
memory	O
for	O
the	O
page	B-General_Concept
table	I-General_Concept
.	O
</s>
<s>
However	O
,	O
part	O
of	O
this	O
linear	O
page	B-General_Concept
table	I-General_Concept
structure	O
must	O
always	O
stay	O
resident	O
in	O
physical	O
memory	O
in	O
order	O
to	O
prevent	O
circular	O
page	B-General_Concept
faults	I-General_Concept
and	O
look	O
for	O
a	O
key	O
part	O
of	O
the	O
page	B-General_Concept
table	I-General_Concept
that	O
is	O
not	O
present	O
in	O
the	O
page	B-General_Concept
table	I-General_Concept
.	O
</s>
<s>
Nested	O
page	B-General_Concept
tables	I-General_Concept
can	O
be	O
implemented	O
to	O
increase	O
the	O
performance	O
of	O
hardware	B-General_Concept
virtualization	I-General_Concept
.	O
</s>
<s>
For	O
x86	B-General_Concept
virtualization	I-General_Concept
the	O
current	O
choices	O
are	O
Intel	O
's	O
Extended	O
Page	B-General_Concept
Table	I-General_Concept
feature	O
and	O
AMD	O
's	O
Rapid	O
Virtualization	O
Indexing	O
feature	O
.	O
</s>
