<s>
In	O
computer	B-General_Concept
operating	I-General_Concept
systems	I-General_Concept
,	O
memory	B-Architecture
paging	I-Architecture
(	O
or	O
swapping	O
on	O
some	O
Unix-like	B-Operating_System
systems	I-Operating_System
)	O
is	O
a	O
memory	B-General_Concept
management	I-General_Concept
scheme	O
by	O
which	O
a	O
computer	O
stores	O
and	O
retrieves	O
data	O
from	O
secondary	O
storage	O
for	O
use	O
in	O
main	O
memory	O
.	O
</s>
<s>
In	O
this	O
scheme	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
retrieves	O
data	O
from	O
secondary	O
storage	O
in	O
same-size	O
blocks	B-General_Concept
called	O
pages	B-General_Concept
.	O
</s>
<s>
Paging	B-Architecture
is	O
an	O
important	O
part	O
of	O
virtual	B-Architecture
memory	I-Architecture
implementations	O
in	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
,	O
using	O
secondary	O
storage	O
to	O
let	O
programs	O
exceed	O
the	O
size	O
of	O
available	O
physical	O
memory	O
.	O
</s>
<s>
For	O
simplicity	O
,	O
main	O
memory	O
is	O
called	O
"	O
RAM	B-Architecture
"	O
(	O
an	O
acronym	O
of	O
random-access	B-Architecture
memory	I-Architecture
)	O
and	O
secondary	O
storage	O
is	O
called	O
"	O
disk	O
"	O
(	O
a	O
shorthand	O
for	O
hard	B-Device
disk	I-Device
drive	I-Device
,	O
drum	B-General_Concept
memory	I-General_Concept
or	O
solid-state	B-Device
drive	I-Device
,	O
etc	O
.	O
</s>
<s>
Depending	O
on	O
the	O
memory	O
model	O
,	O
paged	B-Architecture
memory	I-Architecture
functionality	O
is	O
usually	O
hardwired	O
into	O
a	O
CPU/MCU	O
by	O
using	O
a	O
Memory	B-General_Concept
Management	I-General_Concept
Unit	I-General_Concept
(	O
MMU	O
)	O
or	O
Memory	B-General_Concept
Protection	I-General_Concept
Unit	I-General_Concept
(	O
MPU	O
)	O
and	O
separately	O
enabled	O
by	O
privileged	O
system	O
code	O
in	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
kernel	B-Operating_System
.	O
</s>
<s>
In	O
CPUs	O
implementing	O
the	O
x86	B-Operating_System
instruction	B-General_Concept
set	I-General_Concept
architecture	I-General_Concept
(	O
ISA	O
)	O
for	O
instance	O
,	O
the	O
memory	B-Architecture
paging	I-Architecture
is	O
enabled	O
via	O
the	O
CR0	B-Operating_System
control	B-Operating_System
register	I-Operating_System
.	O
</s>
<s>
In	O
the	O
1960s	O
,	O
swapping	O
was	O
an	O
early	O
virtual	B-Architecture
memory	I-Architecture
technique	O
.	O
</s>
<s>
An	O
entire	O
program	O
or	O
entire	O
segment	B-General_Concept
would	O
be	O
"	O
swapped	O
out	O
"	O
(	O
or	O
"	O
rolled	O
out	O
"	O
)	O
from	O
RAM	B-Architecture
to	O
disk	O
or	O
drum	O
,	O
and	O
another	O
one	O
would	O
be	O
swapped	O
in	O
(	O
or	O
rolled	O
in	O
)	O
.	O
</s>
<s>
A	O
swapped-out	O
program	O
would	O
be	O
current	O
but	O
its	O
execution	O
would	O
be	O
suspended	O
while	O
its	O
RAM	B-Architecture
was	O
in	O
use	O
by	O
another	O
program	O
;	O
a	O
program	O
with	O
a	O
swapped-out	O
segment	B-General_Concept
could	O
continue	O
running	O
until	O
it	O
needed	O
that	O
segment	B-General_Concept
,	O
at	O
which	O
point	O
it	O
would	O
be	O
suspended	O
until	O
the	O
segment	B-General_Concept
was	O
swapped	O
in	O
.	O
</s>
<s>
A	O
program	O
might	O
include	O
multiple	O
overlays	B-General_Concept
that	O
occupy	O
the	O
same	O
memory	O
at	O
different	O
times	O
.	O
</s>
<s>
Overlays	B-General_Concept
are	O
not	O
a	O
method	O
of	O
paging	B-Architecture
RAM	B-Architecture
to	O
disk	O
but	O
merely	O
of	O
minimizing	O
the	O
program	O
's	O
RAM	B-Architecture
use	O
.	O
</s>
<s>
Subsequent	O
architectures	O
used	O
memory	B-General_Concept
segmentation	I-General_Concept
,	O
and	O
individual	O
program	O
segments	O
became	O
the	O
units	O
exchanged	O
between	O
disk	O
and	O
RAM	B-Architecture
.	O
</s>
<s>
A	O
segment	B-General_Concept
was	O
the	O
program	O
's	O
entire	O
code	O
segment	B-General_Concept
or	O
data	O
segment	B-General_Concept
,	O
or	O
sometimes	O
other	O
large	O
data	O
structures	O
.	O
</s>
<s>
These	O
segments	O
had	O
to	O
be	O
contiguous	B-Architecture
when	O
resident	O
in	O
RAM	B-Architecture
,	O
requiring	O
additional	O
computation	O
and	O
movement	O
to	O
remedy	O
fragmentation	B-Application
.	O
</s>
<s>
Ferranti	O
's	O
Atlas	B-Device
,	O
and	O
the	O
Atlas	B-Application
Supervisor	I-Application
developed	O
at	O
the	O
University	O
of	O
Manchester	O
,	O
(	O
1962	O
)	O
,	O
was	O
the	O
first	O
system	O
to	O
implement	O
memory	B-Architecture
paging	I-Architecture
.	O
</s>
<s>
Subsequent	O
early	O
machines	O
,	O
and	O
their	O
operating	B-General_Concept
systems	I-General_Concept
,	O
supporting	O
paging	B-Architecture
include	O
the	O
IBM	B-Device
M44/44X	I-Device
and	O
its	O
MOS	O
operating	B-General_Concept
system	I-General_Concept
(	O
1964	O
)	O
,,	O
the	O
SDS	B-Device
940	I-Device
and	O
the	O
Berkeley	B-General_Concept
Timesharing	I-General_Concept
System	I-General_Concept
(	O
1966	O
)	O
,	O
a	O
modified	O
IBM	B-Device
System/360	I-Device
Model	I-Device
40	I-Device
and	O
the	O
CP-40	B-Application
operating	B-General_Concept
system	I-General_Concept
(	O
1967	O
)	O
,	O
the	O
IBM	B-Device
System/360	I-Device
Model	I-Device
67	I-Device
and	O
operating	B-General_Concept
systems	I-General_Concept
such	O
as	O
TSS/360	B-Application
and	O
CP/CMS	B-Application
(	O
1967	O
)	O
,	O
the	O
RCA	O
70/46	O
and	O
the	O
Time	B-Operating_System
Sharing	I-Operating_System
Operating	I-Operating_System
System	I-Operating_System
(	O
1967	O
)	O
,	O
the	O
GE	B-Device
645	I-Device
and	O
Multics	B-Application
(	O
1969	O
)	O
,	O
and	O
the	O
PDP-10	B-Device
with	O
added	O
BBN-designed	O
paging	B-Architecture
hardware	O
and	O
the	O
TENEX	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
(	O
1969	O
)	O
.	O
</s>
<s>
Those	O
machines	O
,	O
and	O
subsequent	O
machines	O
supporting	O
memory	B-Architecture
paging	I-Architecture
,	O
use	O
either	O
a	O
set	O
of	O
page	B-General_Concept
address	I-General_Concept
registers	I-General_Concept
or	O
in-memory	O
page	O
tables	O
to	O
allow	O
the	O
processor	O
to	O
operate	O
on	O
arbitrary	O
pages	B-General_Concept
anywhere	O
in	O
RAM	B-Architecture
as	O
a	O
seemingly	O
contiguous	B-Architecture
logical	B-General_Concept
address	I-General_Concept
space	O
.	O
</s>
<s>
These	O
pages	B-General_Concept
became	O
the	O
units	O
exchanged	O
between	O
disk	O
and	O
RAM	B-Architecture
.	O
</s>
<s>
When	O
a	O
process	O
tries	O
to	O
reference	O
a	O
page	O
not	O
currently	O
present	O
in	O
RAM	B-Architecture
,	O
the	O
processor	O
treats	O
this	O
invalid	O
memory	O
reference	O
as	O
a	O
page	B-General_Concept
fault	I-General_Concept
and	O
transfers	O
control	O
from	O
the	O
program	O
to	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
must	O
:	O
</s>
<s>
Obtain	O
an	O
empty	O
page	B-General_Concept
frame	I-General_Concept
in	O
RAM	B-Architecture
to	O
use	O
as	O
a	O
container	O
for	O
the	O
data	O
.	O
</s>
<s>
Load	O
the	O
requested	O
data	O
into	O
the	O
available	O
page	B-General_Concept
frame	I-General_Concept
.	O
</s>
<s>
Update	O
the	O
page	B-General_Concept
table	I-General_Concept
to	O
refer	O
to	O
the	O
new	O
page	B-General_Concept
frame	I-General_Concept
.	O
</s>
<s>
Return	O
control	O
to	O
the	O
program	O
,	O
transparently	O
retrying	O
the	O
instruction	O
that	O
caused	O
the	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
When	O
all	O
page	B-General_Concept
frames	I-General_Concept
are	O
in	O
use	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
must	O
select	O
a	O
page	B-General_Concept
frame	I-General_Concept
to	O
reuse	O
for	O
the	O
page	O
the	O
program	O
now	O
needs	O
.	O
</s>
<s>
If	O
the	O
evicted	O
page	B-General_Concept
frame	I-General_Concept
was	O
dynamically	B-Application
allocated	I-Application
by	O
a	O
program	O
to	O
hold	O
data	O
,	O
or	O
if	O
a	O
program	O
modified	O
it	O
since	O
it	O
was	O
read	O
into	O
RAM	B-Architecture
(	O
in	O
other	O
words	O
,	O
if	O
it	O
has	O
become	O
"	O
dirty	O
"	O
)	O
,	O
it	O
must	O
be	O
written	O
out	O
to	O
disk	O
before	O
being	O
freed	O
.	O
</s>
<s>
If	O
a	O
program	O
later	O
references	O
the	O
evicted	O
page	O
,	O
another	O
page	B-General_Concept
fault	I-General_Concept
occurs	O
and	O
the	O
page	O
must	O
be	O
read	O
back	O
into	O
RAM	B-Architecture
.	O
</s>
<s>
The	O
method	O
the	O
operating	B-General_Concept
system	I-General_Concept
uses	O
to	O
select	O
the	O
page	B-General_Concept
frame	I-General_Concept
to	O
reuse	O
,	O
which	O
is	O
its	O
page	B-General_Concept
replacement	I-General_Concept
algorithm	I-General_Concept
,	O
is	O
important	O
to	O
efficiency	O
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
predicts	O
the	O
page	B-General_Concept
frame	I-General_Concept
least	O
likely	O
to	O
be	O
needed	O
soon	O
,	O
often	O
through	O
the	O
least	O
recently	O
used	O
(	O
LRU	O
)	O
algorithm	O
or	O
an	O
algorithm	O
based	O
on	O
the	O
program	O
's	O
working	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
To	O
further	O
increase	O
responsiveness	O
,	O
paging	B-Architecture
systems	O
may	O
predict	O
which	O
pages	B-General_Concept
will	O
be	O
needed	O
soon	O
,	O
preemptively	O
loading	O
them	O
into	O
RAM	B-Architecture
before	O
a	O
program	O
references	O
them	O
.	O
</s>
<s>
When	O
pure	O
demand	B-General_Concept
paging	I-General_Concept
is	O
used	O
,	O
pages	B-General_Concept
are	O
loaded	O
only	O
when	O
they	O
are	O
referenced	O
.	O
</s>
<s>
A	O
program	O
from	O
a	O
memory	B-General_Concept
mapped	I-General_Concept
file	I-General_Concept
begins	O
execution	O
with	O
none	O
of	O
its	O
pages	B-General_Concept
in	O
RAM	B-Architecture
.	O
</s>
<s>
As	O
the	O
program	O
commits	O
page	B-General_Concept
faults	I-General_Concept
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
copies	O
the	O
needed	O
pages	B-General_Concept
from	O
a	O
file	O
,	O
e.g.	O
,	O
memory-mapped	B-General_Concept
file	I-General_Concept
,	O
paging	B-Architecture
file	I-Architecture
,	O
or	O
a	O
swap	O
partition	O
containing	O
the	O
page	O
data	O
into	O
RAM	B-Architecture
.	O
</s>
<s>
This	O
technique	O
,	O
sometimes	O
also	O
called	O
swap	O
prefetch	O
,	O
predicts	O
which	O
pages	B-General_Concept
will	O
be	O
referenced	O
soon	O
,	O
to	O
minimize	O
future	O
page	B-General_Concept
faults	I-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
after	O
reading	O
a	O
page	O
to	O
service	O
a	O
page	B-General_Concept
fault	I-General_Concept
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
may	O
also	O
read	O
the	O
next	O
few	O
pages	B-General_Concept
even	O
though	O
they	O
are	O
not	O
yet	O
needed	O
(	O
a	O
prediction	O
using	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
)	O
.	O
</s>
<s>
If	O
a	O
program	O
ends	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
may	O
delay	B-General_Concept
freeing	O
its	O
pages	B-General_Concept
,	O
in	O
case	O
the	O
user	O
runs	O
the	O
same	O
program	O
again	O
.	O
</s>
<s>
The	O
free	O
page	O
queue	O
is	O
a	O
list	O
of	O
page	B-General_Concept
frames	I-General_Concept
that	O
are	O
available	O
for	O
assignment	O
.	O
</s>
<s>
Preventing	O
this	O
queue	O
from	O
being	O
empty	O
minimizes	O
the	O
computing	O
necessary	O
to	O
service	O
a	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
Some	O
operating	B-General_Concept
systems	I-General_Concept
periodically	O
look	O
for	O
pages	B-General_Concept
that	O
have	O
not	O
been	O
recently	O
referenced	O
and	O
then	O
free	O
the	O
page	B-General_Concept
frame	I-General_Concept
and	O
add	O
it	O
to	O
the	O
free	O
page	O
queue	O
,	O
a	O
process	O
known	O
as	O
"	O
page	O
stealing	O
"	O
.	O
</s>
<s>
Some	O
operating	B-General_Concept
systems	I-General_Concept
support	O
page	O
reclamation	O
;	O
if	O
a	O
program	O
commits	O
a	O
page	B-General_Concept
fault	I-General_Concept
by	O
referencing	O
a	O
page	O
that	O
was	O
stolen	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
detects	O
this	O
and	O
restores	O
the	O
page	B-General_Concept
frame	I-General_Concept
without	O
having	O
to	O
read	O
the	O
contents	O
back	O
into	O
RAM	B-Architecture
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
may	O
periodically	O
pre-clean	O
dirty	O
pages	B-General_Concept
:	O
write	O
modified	O
pages	B-General_Concept
back	O
to	O
disk	O
even	O
though	O
they	O
might	O
be	O
further	O
modified	O
.	O
</s>
<s>
This	O
minimizes	O
the	O
amount	O
of	O
cleaning	O
needed	O
to	O
obtain	O
new	O
page	B-General_Concept
frames	I-General_Concept
at	O
the	O
moment	O
a	O
new	O
program	O
starts	O
or	O
a	O
new	O
data	O
file	O
is	O
opened	O
,	O
and	O
improves	O
responsiveness	O
.	O
</s>
<s>
(	O
Unix	B-Application
operating	I-Application
systems	I-Application
periodically	O
use	O
sync	B-Language
to	O
pre-clean	O
all	O
dirty	O
pages	B-General_Concept
;	O
Windows	B-Application
operating	I-Application
systems	I-Application
use	O
"	O
modified	O
page	O
writer	O
"	O
threads	O
.	O
)	O
</s>
<s>
After	O
completing	O
initialization	O
,	O
most	O
programs	O
operate	O
on	O
a	O
small	O
number	O
of	O
code	O
and	O
data	O
pages	B-General_Concept
compared	O
to	O
the	O
total	O
memory	O
the	O
program	O
requires	O
.	O
</s>
<s>
The	O
pages	B-General_Concept
most	O
frequently	O
accessed	O
are	O
called	O
the	O
working	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
When	O
the	O
working	B-General_Concept
set	I-General_Concept
is	O
a	O
small	O
percentage	O
of	O
the	O
system	O
's	O
total	O
number	O
of	O
pages	B-General_Concept
,	O
virtual	B-Architecture
memory	I-Architecture
systems	O
work	O
most	O
efficiently	O
and	O
an	O
insignificant	O
amount	O
of	O
computing	O
is	O
spent	O
resolving	O
page	B-General_Concept
faults	I-General_Concept
.	O
</s>
<s>
As	O
the	O
working	B-General_Concept
set	I-General_Concept
grows	O
,	O
resolving	O
page	B-General_Concept
faults	I-General_Concept
remains	O
manageable	O
until	O
the	O
growth	O
reaches	O
a	O
critical	O
point	O
.	O
</s>
<s>
This	O
condition	O
is	O
referred	O
to	O
as	O
thrashing	B-General_Concept
.	O
</s>
<s>
Thrashing	B-General_Concept
occurs	O
on	O
a	O
program	O
that	O
works	O
with	O
huge	O
data	O
structures	O
,	O
as	O
its	O
large	O
working	B-General_Concept
set	I-General_Concept
causes	O
continual	O
page	B-General_Concept
faults	I-General_Concept
that	O
drastically	O
slow	O
down	O
the	O
system	O
.	O
</s>
<s>
Satisfying	O
page	B-General_Concept
faults	I-General_Concept
may	O
require	O
freeing	O
pages	B-General_Concept
that	O
will	O
soon	O
have	O
to	O
be	O
re-read	O
from	O
disk	O
.	O
</s>
<s>
"	O
Thrashing	B-General_Concept
"	O
is	O
also	O
used	O
in	O
contexts	O
other	O
than	O
virtual	B-Architecture
memory	I-Architecture
systems	O
;	O
for	O
example	O
,	O
to	O
describe	O
cache	B-General_Concept
issues	O
in	O
computing	O
or	O
silly	B-Protocol
window	I-Protocol
syndrome	I-Protocol
in	O
networking	O
.	O
</s>
<s>
A	O
worst	O
case	O
might	O
occur	O
on	O
VAX	B-Device
processors	O
.	O
</s>
<s>
This	O
single	O
instruction	O
references	O
ten	O
pages	B-General_Concept
;	O
if	O
not	O
all	O
are	O
in	O
RAM	B-Architecture
,	O
each	O
will	O
cause	O
a	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
As	O
each	O
fault	O
occurs	O
the	O
operating	B-General_Concept
system	I-General_Concept
needs	O
to	O
go	O
through	O
the	O
extensive	O
memory	B-General_Concept
management	I-General_Concept
routines	O
perhaps	O
causing	O
multiple	O
I/Os	O
which	O
might	O
include	O
writing	O
other	O
process	O
pages	B-General_Concept
to	O
disk	O
and	O
reading	O
pages	B-General_Concept
of	O
the	O
active	O
process	O
from	O
disk	O
.	O
</s>
<s>
If	O
the	O
operating	B-General_Concept
system	I-General_Concept
could	O
not	O
allocate	O
ten	O
pages	B-General_Concept
to	O
this	O
program	O
,	O
then	O
remedying	O
the	O
page	B-General_Concept
fault	I-General_Concept
would	O
discard	O
another	O
page	O
the	O
instruction	O
needs	O
,	O
and	O
any	O
restart	O
of	O
the	O
instruction	O
would	O
fault	O
again	O
.	O
</s>
<s>
To	O
decrease	O
excessive	O
paging	B-Architecture
and	O
resolve	O
thrashing	B-General_Concept
problems	O
,	O
a	O
user	O
can	O
increase	O
the	O
number	O
of	O
pages	B-General_Concept
available	O
per	O
program	O
,	O
either	O
by	O
running	O
fewer	O
programs	O
concurrently	O
or	O
increasing	O
the	O
amount	O
of	O
RAM	B-Architecture
in	O
the	O
computer	O
.	O
</s>
<s>
In	O
multi-programming	B-Operating_System
or	O
in	O
a	O
multi-user	B-Operating_System
environment	O
,	O
many	O
users	O
may	O
execute	O
the	O
same	O
program	O
,	O
written	O
so	O
that	O
its	O
code	O
and	O
data	O
are	O
in	O
separate	O
pages	B-General_Concept
.	O
</s>
<s>
To	O
minimize	O
RAM	B-Architecture
use	O
,	O
all	O
users	O
share	O
a	O
single	O
copy	O
of	O
the	O
program	O
.	O
</s>
<s>
Each	O
process	O
's	O
page	B-General_Concept
table	I-General_Concept
is	O
set	O
up	O
so	O
that	O
the	O
pages	B-General_Concept
that	O
address	O
code	O
point	O
to	O
the	O
single	O
shared	O
copy	O
,	O
while	O
the	O
pages	B-General_Concept
that	O
address	O
data	O
point	O
to	O
different	O
physical	O
pages	B-General_Concept
for	O
each	O
process	O
.	O
</s>
<s>
Programs	O
which	O
use	O
the	O
same	O
library	O
have	O
virtual	O
addresses	O
that	O
map	O
to	O
the	O
same	O
pages	B-General_Concept
(	O
which	O
contain	O
the	O
library	O
's	O
code	O
and	O
data	O
)	O
.	O
</s>
<s>
When	O
programs	O
want	O
to	O
modify	O
the	O
library	O
's	O
code	O
,	O
they	O
use	O
copy-on-write	B-Language
,	O
so	O
memory	O
is	O
only	O
allocated	O
when	O
needed	O
.	O
</s>
<s>
Programs	O
can	O
share	O
pages	B-General_Concept
in	O
memory	O
,	O
and	O
then	O
write	O
and	O
read	O
to	O
exchange	O
data	O
.	O
</s>
<s>
The	O
first	O
computer	O
to	O
support	O
paging	B-Architecture
was	O
the	O
supercomputer	O
Atlas	B-Device
,	O
jointly	O
developed	O
by	O
Ferranti	O
,	O
the	O
University	O
of	O
Manchester	O
and	O
Plessey	O
in	O
1963	O
.	O
</s>
<s>
The	O
machine	O
had	O
an	O
associative	O
(	O
content-addressable	B-Data_Structure
)	O
memory	O
with	O
one	O
entry	O
for	O
each	O
512	O
word	O
page	O
.	O
</s>
<s>
The	O
Supervisor	O
handled	O
non-equivalence	O
interruptions	O
and	O
managed	O
the	O
transfer	O
of	O
pages	B-General_Concept
between	O
core	O
and	O
drum	O
in	O
order	O
to	O
provide	O
a	O
one-level	O
store	O
to	O
programs	O
.	O
</s>
<s>
Paging	B-Architecture
has	O
been	O
a	O
feature	O
of	O
Microsoft	B-Application
Windows	I-Application
since	O
Windows	B-Application
3.0	I-Application
in	O
1990	O
.	O
</s>
<s>
Windows	O
3.x	O
creates	O
a	O
hidden	B-Application
file	I-Application
named	O
386SPART.PAR	B-Architecture
or	O
WIN386.SWP	B-Architecture
for	O
use	O
as	O
a	O
swap	O
file	O
.	O
</s>
<s>
It	O
is	O
generally	O
found	O
in	O
the	O
root	B-Application
directory	I-Application
,	O
but	O
it	O
may	O
appear	O
elsewhere	O
(	O
typically	O
in	O
the	O
WINDOWS	O
directory	O
)	O
.	O
</s>
<s>
Its	O
size	O
depends	O
on	O
how	O
much	O
swap	O
space	O
the	O
system	O
has	O
(	O
a	O
setting	O
selected	O
by	O
the	O
user	O
under	O
Control	O
Panel	O
→	O
Enhanced	O
under	O
"	O
Virtual	B-Architecture
Memory	I-Architecture
"	O
)	O
.	O
</s>
<s>
If	O
the	O
user	O
moves	O
or	O
deletes	O
this	O
file	O
,	O
a	O
blue	O
screen	O
will	O
appear	O
the	O
next	O
time	O
Windows	O
is	O
started	O
,	O
with	O
the	O
error	B-Error_Name
message	I-Error_Name
"	O
The	O
permanent	O
swap	O
file	O
is	O
corrupt	O
"	O
.	O
</s>
<s>
Windows	B-Application
95	I-Application
,	O
Windows	B-Device
98	I-Device
and	O
Windows	B-Device
Me	I-Device
use	O
a	O
similar	O
file	O
,	O
and	O
the	O
settings	O
for	O
it	O
are	O
located	O
under	O
Control	O
Panel	O
→	O
System	O
→	O
Performance	O
tab	O
→	O
Virtual	B-Architecture
Memory	I-Architecture
.	O
</s>
<s>
Windows	O
automatically	O
sets	O
the	O
size	O
of	O
the	O
page	B-Architecture
file	I-Architecture
to	O
start	O
at	O
1.5	O
×	O
the	O
size	O
of	O
physical	O
memory	O
,	O
and	O
expand	O
up	O
to	O
3×	O
physical	O
memory	O
if	O
necessary	O
.	O
</s>
<s>
The	O
file	O
used	O
for	O
paging	B-Architecture
in	O
the	O
Windows	B-Device
NT	I-Device
family	I-Device
is	O
pagefile.sys	O
.	O
</s>
<s>
The	O
default	O
location	O
of	O
the	O
page	B-Architecture
file	I-Architecture
is	O
in	O
the	O
root	B-Application
directory	I-Application
of	O
the	O
partition	O
where	O
Windows	O
is	O
installed	O
.	O
</s>
<s>
Windows	O
can	O
be	O
configured	O
to	O
use	O
free	O
space	O
on	O
any	O
available	O
drives	O
for	O
page	B-Architecture
files	I-Architecture
.	O
</s>
<s>
It	O
is	O
required	O
,	O
however	O
,	O
for	O
the	O
boot	O
partition	O
(	O
i.e.	O
,	O
the	O
drive	O
containing	O
the	O
Windows	O
directory	O
)	O
to	O
have	O
a	O
page	B-Architecture
file	I-Architecture
on	O
it	O
if	O
the	O
system	O
is	O
configured	O
to	O
write	O
either	O
kernel	B-Operating_System
or	O
full	O
memory	O
dumps	O
after	O
a	O
Blue	O
Screen	O
of	O
Death	O
.	O
</s>
<s>
Windows	O
uses	O
the	O
paging	B-Architecture
file	I-Architecture
as	O
temporary	O
storage	O
for	O
the	O
memory	O
dump	O
.	O
</s>
<s>
When	O
the	O
system	O
is	O
rebooted	O
,	O
Windows	O
copies	O
the	O
memory	O
dump	O
from	O
the	O
page	B-Architecture
file	I-Architecture
to	O
a	O
separate	O
file	O
and	O
frees	O
the	O
space	O
that	O
was	O
used	O
in	O
the	O
page	B-Architecture
file	I-Architecture
.	O
</s>
<s>
In	O
the	O
default	B-General_Concept
configuration	I-General_Concept
of	O
Windows	O
,	O
the	O
page	B-Architecture
file	I-Architecture
is	O
allowed	O
to	O
expand	O
beyond	O
its	O
initial	O
allocation	O
when	O
necessary	O
.	O
</s>
<s>
If	O
this	O
happens	O
gradually	O
,	O
it	O
can	O
become	O
heavily	O
fragmented	B-Application
which	O
can	O
potentially	O
cause	O
performance	O
problems	O
.	O
</s>
<s>
The	O
common	O
advice	O
given	O
to	O
avoid	O
this	O
is	O
to	O
set	O
a	O
single	O
"	O
locked	O
"	O
page	B-Architecture
file	I-Architecture
size	O
so	O
that	O
Windows	O
will	O
not	O
expand	O
it	O
.	O
</s>
<s>
However	O
,	O
the	O
page	B-Architecture
file	I-Architecture
only	O
expands	O
when	O
it	O
has	O
been	O
filled	O
,	O
which	O
,	O
in	O
its	O
default	B-General_Concept
configuration	I-General_Concept
,	O
is	O
150%	O
of	O
the	O
total	O
amount	O
of	O
physical	O
memory	O
.	O
</s>
<s>
Thus	O
the	O
total	O
demand	O
for	O
page	O
file-backed	O
virtual	B-Architecture
memory	I-Architecture
must	O
exceed	O
250%	O
of	O
the	O
computer	O
's	O
physical	O
memory	O
before	O
the	O
page	B-Architecture
file	I-Architecture
will	O
expand	O
.	O
</s>
<s>
The	O
fragmentation	B-Application
of	O
the	O
page	B-Architecture
file	I-Architecture
that	O
occurs	O
when	O
it	O
expands	O
is	O
temporary	O
.	O
</s>
<s>
As	O
soon	O
as	O
the	O
expanded	O
regions	O
are	O
no	O
longer	O
in	O
use	O
(	O
at	O
the	O
next	O
reboot	O
,	O
if	O
not	O
sooner	O
)	O
the	O
additional	O
disk	O
space	O
allocations	O
are	O
freed	O
and	O
the	O
page	B-Architecture
file	I-Architecture
is	O
back	O
to	O
its	O
original	O
state	O
.	O
</s>
<s>
Locking	O
a	O
page	B-Architecture
file	I-Architecture
size	O
can	O
be	O
problematic	O
if	O
a	O
Windows	O
application	O
requests	O
more	O
memory	O
than	O
the	O
total	O
size	O
of	O
physical	O
memory	O
and	O
the	O
page	B-Architecture
file	I-Architecture
,	O
leading	O
to	O
failed	O
requests	O
to	O
allocate	O
memory	O
that	O
may	O
cause	O
applications	O
and	O
system	O
processes	O
to	O
fail	O
.	O
</s>
<s>
Also	O
,	O
the	O
page	B-Architecture
file	I-Architecture
is	O
rarely	O
read	O
or	O
written	O
in	O
sequential	O
order	O
,	O
so	O
the	O
performance	O
advantage	O
of	O
having	O
a	O
completely	O
sequential	O
page	B-Architecture
file	I-Architecture
is	O
minimal	O
.	O
</s>
<s>
However	O
,	O
a	O
large	O
page	B-Architecture
file	I-Architecture
generally	O
allows	O
the	O
use	O
of	O
memory-heavy	O
applications	O
,	O
with	O
no	O
penalties	O
besides	O
using	O
more	O
disk	O
space	O
.	O
</s>
<s>
While	O
a	O
fragmented	B-Application
page	B-Architecture
file	I-Architecture
may	O
not	O
be	O
an	O
issue	O
by	O
itself	O
,	O
fragmentation	B-Application
of	O
a	O
variable	O
size	O
page	B-Architecture
file	I-Architecture
will	O
over	O
time	O
create	O
several	O
fragmented	B-Application
blocks	B-General_Concept
on	O
the	O
drive	O
,	O
causing	O
other	O
files	O
to	O
become	O
fragmented	B-Application
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
a	O
fixed-size	O
contiguous	B-Architecture
page	B-Architecture
file	I-Architecture
is	O
better	O
,	O
providing	O
that	O
the	O
size	O
allocated	O
is	O
large	O
enough	O
to	O
accommodate	O
the	O
needs	O
of	O
all	O
applications	O
.	O
</s>
<s>
a	O
system	O
with	O
3	O
GB	O
of	O
memory	O
having	O
a	O
6	O
GB	O
fixed-size	O
page	B-Architecture
file	I-Architecture
on	O
a	O
750	O
GB	O
disk	O
drive	O
,	O
or	O
a	O
system	O
with	O
6	O
GB	O
of	O
memory	O
and	O
a	O
16	O
GB	O
fixed-size	O
page	B-Architecture
file	I-Architecture
and	O
2	O
TB	O
of	O
disk	O
space	O
)	O
.	O
</s>
<s>
In	O
both	O
examples	O
,	O
the	O
system	O
uses	O
about	O
0.8	O
%	O
of	O
the	O
disk	O
space	O
with	O
the	O
page	B-Architecture
file	I-Architecture
pre-extended	O
to	O
its	O
maximum	O
.	O
</s>
<s>
Defragmenting	B-Application
the	O
page	B-Architecture
file	I-Architecture
is	O
also	O
occasionally	O
recommended	O
to	O
improve	O
performance	O
when	O
a	O
Windows	O
system	O
is	O
chronically	O
using	O
much	O
more	O
memory	O
than	O
its	O
total	O
physical	O
memory	O
.	O
</s>
<s>
This	O
view	O
ignores	O
the	O
fact	O
that	O
,	O
aside	O
from	O
the	O
temporary	O
results	O
of	O
expansion	O
,	O
the	O
page	B-Architecture
file	I-Architecture
does	O
not	O
become	O
fragmented	B-Application
over	O
time	O
.	O
</s>
<s>
In	O
general	O
,	O
performance	O
concerns	O
related	O
to	O
page	B-Architecture
file	I-Architecture
access	O
are	O
much	O
more	O
effectively	O
dealt	O
with	O
by	O
adding	O
more	O
physical	O
memory	O
.	O
</s>
<s>
Unix	B-Application
systems	I-Application
,	O
and	O
other	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
use	O
the	O
term	O
"	O
swap	O
"	O
to	O
describe	O
the	O
act	O
of	O
substituting	O
disk	O
space	O
for	O
RAM	B-Architecture
when	O
physical	O
RAM	B-Architecture
is	O
full	O
.	O
</s>
<s>
In	O
some	O
of	O
those	O
systems	O
,	O
it	O
is	O
common	O
to	O
dedicate	O
an	O
entire	O
partition	O
of	O
a	O
hard	B-Device
disk	I-Device
to	O
swapping	O
.	O
</s>
<s>
Many	O
systems	O
have	O
an	O
entire	O
hard	B-Device
drive	I-Device
dedicated	O
to	O
swapping	O
,	O
separate	O
from	O
the	O
data	O
drive(s )	O
,	O
containing	O
only	O
a	O
swap	O
partition	O
.	O
</s>
<s>
A	O
hard	B-Device
drive	I-Device
dedicated	O
to	O
swapping	O
is	O
called	O
a	O
"	O
swap	O
drive	O
"	O
or	O
a	O
"	O
scratch	O
drive	O
"	O
or	O
a	O
"	O
scratch	B-General_Concept
disk	I-General_Concept
"	O
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
supports	O
a	O
virtually	O
unlimited	O
number	O
of	O
swap	O
backends	O
(	O
devices	O
or	O
files	O
)	O
,	O
and	O
also	O
supports	O
assignment	O
of	O
backend	O
priorities	O
.	O
</s>
<s>
When	O
the	O
kernel	B-Operating_System
swaps	O
pages	B-General_Concept
out	O
of	O
physical	O
memory	O
,	O
it	O
uses	O
the	O
highest-priority	O
backend	O
with	O
available	O
free	O
space	O
.	O
</s>
<s>
If	O
multiple	O
swap	O
backends	O
are	O
assigned	O
the	O
same	O
priority	O
,	O
they	O
are	O
used	O
in	O
a	O
round-robin	B-Algorithm
fashion	O
(	O
which	O
is	O
somewhat	O
similar	O
to	O
RAID	O
0	O
storage	O
layouts	O
)	O
,	O
providing	O
improved	O
performance	O
as	O
long	O
as	O
the	O
underlying	O
devices	O
can	O
be	O
efficiently	O
accessed	O
in	O
parallel	O
.	O
</s>
<s>
From	O
the	O
end-user	O
perspective	O
,	O
swap	O
files	O
in	O
versions	O
2.6.x	O
and	O
later	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
are	O
virtually	O
as	O
fast	O
as	O
swap	O
partitions	O
;	O
the	O
limitation	O
is	O
that	O
swap	O
files	O
should	O
be	O
contiguously	O
allocated	O
on	O
their	O
underlying	O
file	O
systems	O
.	O
</s>
<s>
To	O
increase	O
performance	O
of	O
swap	O
files	O
,	O
the	O
kernel	B-Operating_System
keeps	O
a	O
map	O
of	O
where	O
they	O
are	O
placed	O
on	O
underlying	O
devices	O
and	O
accesses	O
them	O
directly	O
,	O
thus	O
bypassing	O
the	O
cache	B-General_Concept
and	O
avoiding	O
filesystem	O
overhead	O
.	O
</s>
<s>
When	O
residing	O
on	O
HDDs	B-Device
,	O
which	O
are	O
rotational	O
magnetic	O
media	O
devices	O
,	O
one	O
benefit	O
of	O
using	O
swap	O
partitions	O
is	O
the	O
ability	O
to	O
place	O
them	O
on	O
contiguous	B-Architecture
HDD	O
areas	O
that	O
provide	O
higher	O
data	O
throughput	O
or	O
faster	O
seek	O
time	O
.	O
</s>
<s>
Swap	O
partitions	O
are	O
not	O
as	O
flexible	O
;	O
they	O
cannot	O
be	O
enlarged	O
without	O
using	O
partitioning	O
or	O
volume	B-Application
management	I-Application
tools	O
,	O
which	O
introduce	O
various	O
complexities	O
and	O
potential	O
downtimes	O
.	O
</s>
<s>
Swappiness	O
is	O
a	O
Linux	B-Operating_System
kernel	I-Operating_System
parameter	O
that	O
controls	O
the	O
relative	O
weight	O
given	O
to	O
swapping	O
out	O
of	O
runtime	O
memory	O
,	O
as	O
opposed	O
to	O
dropping	O
pages	B-General_Concept
from	O
the	O
system	O
page	B-General_Concept
cache	I-General_Concept
,	O
whenever	O
a	O
memory	B-General_Concept
allocation	I-General_Concept
request	O
cannot	O
be	O
met	O
from	O
free	O
memory	O
.	O
</s>
<s>
A	O
low	O
value	O
causes	O
the	O
kernel	B-Operating_System
to	O
prefer	O
to	O
evict	O
pages	B-General_Concept
from	O
the	O
page	B-General_Concept
cache	I-General_Concept
while	O
a	O
higher	O
value	O
causes	O
the	O
kernel	B-Operating_System
to	O
prefer	O
to	O
swap	O
out	O
"	O
cold	O
"	O
memory	B-General_Concept
pages	I-General_Concept
.	O
</s>
<s>
The	O
default	B-General_Concept
value	I-General_Concept
is	O
60	O
;	O
setting	O
it	O
higher	O
can	O
cause	O
high	O
latency	O
if	O
cold	O
pages	B-General_Concept
need	O
to	O
be	O
swapped	O
back	O
in	O
(	O
when	O
interacting	O
with	O
a	O
program	O
that	O
had	O
been	O
idle	O
for	O
example	O
)	O
,	O
while	O
setting	O
it	O
lower	O
(	O
even	O
0	O
)	O
may	O
cause	O
high	O
latency	O
when	O
files	O
that	O
had	O
been	O
evicted	O
from	O
the	O
cache	B-General_Concept
need	O
to	O
be	O
read	O
again	O
,	O
but	O
will	O
make	O
interactive	O
programs	O
more	O
responsive	O
as	O
they	O
will	O
be	O
less	O
likely	O
to	O
need	O
to	O
swap	O
back	O
cold	O
pages	B-General_Concept
.	O
</s>
<s>
Swapping	O
can	O
also	O
slow	O
down	O
HDDs	B-Device
further	O
because	O
it	O
involves	O
a	O
lot	O
of	O
random	O
writes	O
,	O
while	O
SSDs	B-Device
do	O
not	O
have	O
this	O
problem	O
.	O
</s>
<s>
Swap	O
death	O
can	O
happen	O
due	O
to	O
incorrectly	O
configured	O
memory	B-General_Concept
overcommitment	I-General_Concept
.	O
</s>
<s>
If	O
code	O
or	O
data	O
used	O
by	O
the	O
X	O
server	O
to	O
respond	O
to	O
a	O
keystroke	O
is	O
not	O
in	O
main	O
memory	O
,	O
then	O
if	O
the	O
user	O
enters	O
a	O
keystroke	O
,	O
the	O
server	O
will	O
take	O
one	O
or	O
more	O
page	B-General_Concept
faults	I-General_Concept
,	O
requiring	O
those	O
pages	B-General_Concept
to	O
read	O
from	O
swap	O
before	O
the	O
keystroke	O
can	O
be	O
processed	O
,	O
slowing	O
the	O
response	O
to	O
it	O
.	O
</s>
<s>
If	O
those	O
pages	B-General_Concept
do	O
n't	O
remain	O
in	O
memory	O
,	O
they	O
will	O
have	O
to	O
be	O
faulted	O
in	O
again	O
to	O
handle	O
the	O
next	O
keystroke	O
,	O
making	O
the	O
system	O
practically	O
unresponsive	O
even	O
if	O
it	O
's	O
actually	O
executing	O
other	O
tasks	O
normally	O
.	O
</s>
<s>
macOS	B-Application
uses	O
multiple	O
swap	O
files	O
.	O
</s>
<s>
AmigaOS	O
4.0	O
introduced	O
a	O
new	O
system	O
for	O
allocating	O
RAM	B-Architecture
and	O
defragmenting	B-Application
physical	O
memory	O
.	O
</s>
<s>
It	O
is	O
based	O
on	O
slab	B-General_Concept
allocation	I-General_Concept
method	I-General_Concept
and	O
paging	B-Architecture
memory	O
that	O
allows	O
swapping	O
.	O
</s>
<s>
Paging	B-Architecture
was	O
implemented	O
in	O
AmigaOS	O
4.1	O
but	O
may	O
lock	O
up	O
system	O
if	O
all	O
physical	O
memory	O
is	O
used	O
up	O
.	O
</s>
<s>
Swap	B-Architecture
memory	I-Architecture
could	O
be	O
activated	O
and	O
deactivated	O
any	O
moment	O
allowing	O
the	O
user	O
to	O
choose	O
to	O
use	O
only	O
physical	O
RAM	B-Architecture
.	O
</s>
<s>
The	O
backing	B-General_Concept
store	I-General_Concept
for	O
a	O
virtual	B-Operating_System
memory	I-Operating_System
operating	I-Operating_System
system	I-Operating_System
is	O
typically	O
many	O
orders	O
of	O
magnitude	O
slower	O
than	O
RAM	B-Architecture
.	O
</s>
<s>
Additionally	O
,	O
using	O
mechanical	O
storage	O
devices	O
introduces	O
delay	B-General_Concept
,	O
several	O
milliseconds	O
for	O
a	O
hard	B-Device
disk	I-Device
.	O
</s>
<s>
Some	O
operating	B-General_Concept
systems	I-General_Concept
offer	O
settings	O
to	O
influence	O
the	O
kernel	B-Operating_System
's	O
decisions	O
.	O
</s>
<s>
Linux	B-Application
offers	O
the	O
/proc/sys/vm/swappiness	O
parameter	O
,	O
which	O
changes	O
the	O
balance	O
between	O
swapping	O
out	O
runtime	O
memory	O
,	O
as	O
opposed	O
to	O
dropping	O
pages	B-General_Concept
from	O
the	O
system	O
page	B-General_Concept
cache	I-General_Concept
.	O
</s>
<s>
Windows	O
2000	O
,	O
XP	O
,	O
and	O
Vista	O
offer	O
the	O
DisablePagingExecutive	O
registry	O
setting	O
,	O
which	O
controls	O
whether	O
kernel-mode	O
code	O
and	O
data	O
can	O
be	O
eligible	O
for	O
paging	B-Architecture
out	O
.	O
</s>
<s>
Mainframe	O
computers	O
frequently	O
used	O
head-per-track	O
disk	O
drives	O
or	O
drums	B-General_Concept
for	O
page	O
and	O
swap	O
storage	O
to	O
eliminate	O
seek	O
time	O
,	O
and	O
several	O
technologies	O
to	O
have	O
multiple	O
concurrent	O
requests	O
to	O
the	O
same	O
device	O
in	O
order	O
to	O
reduce	O
rotational	O
latency	O
.	O
</s>
<s>
Flash	O
memory	O
has	O
a	O
finite	O
number	O
of	O
erase-write	O
cycles	O
(	O
see	O
limitations	O
of	O
flash	O
memory	O
)	O
,	O
and	O
the	O
smallest	O
amount	O
of	O
data	O
that	O
can	O
be	O
erased	O
at	O
once	O
might	O
be	O
very	O
large	O
(	O
128	O
KiB	O
for	O
an	O
Intel	O
X25-M	O
SSD	B-Device
)	O
,	O
seldom	O
coinciding	O
with	O
pagesize	O
.	O
</s>
<s>
On	O
the	O
attractive	O
side	O
,	O
flash	O
memory	O
is	O
practically	O
delayless	O
compared	O
to	O
hard	B-Device
disks	I-Device
,	O
and	O
not	O
volatile	B-General_Concept
as	O
RAM	B-Architecture
chips	I-Architecture
.	O
</s>
<s>
Schemes	O
like	O
ReadyBoost	O
and	O
Intel	B-Device
Turbo	I-Device
Memory	I-Device
are	O
made	O
to	O
exploit	O
these	O
characteristics	O
.	O
</s>
<s>
Many	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
(	O
for	O
example	O
AIX	B-Application
,	O
Linux	B-Application
,	O
and	O
Solaris	B-Application
)	O
allow	O
using	O
multiple	O
storage	O
devices	O
for	O
swap	O
space	O
in	O
parallel	O
,	O
to	O
increase	O
performance	O
.	O
</s>
<s>
In	O
some	O
older	O
virtual	B-Operating_System
memory	I-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
space	O
in	O
swap	O
backing	B-General_Concept
store	I-General_Concept
is	O
reserved	O
when	O
programs	O
allocate	O
memory	O
for	O
runtime	O
data	O
.	O
</s>
<s>
Operating	B-General_Concept
system	I-General_Concept
vendors	O
typically	O
issue	O
guidelines	O
about	O
how	O
much	O
swap	O
space	O
should	O
be	O
allocated	O
.	O
</s>
<s>
Paging	B-Architecture
is	O
one	O
way	O
of	O
allowing	O
the	O
size	O
of	O
the	O
addresses	O
used	O
by	O
a	O
process	O
,	O
which	O
is	O
the	O
process	O
's	O
"	O
virtual	O
address	O
space	O
"	O
or	O
"	O
logical	B-General_Concept
address	I-General_Concept
space	O
"	O
,	O
to	O
be	O
different	O
from	O
the	O
amount	O
of	O
main	O
memory	O
actually	O
installed	O
on	O
a	O
particular	O
computer	O
,	O
which	O
is	O
the	O
physical	O
address	O
space	O
.	O
</s>
<s>
The	O
address	B-Architecture
bus	I-Architecture
that	O
connects	O
the	O
CPU	O
to	O
main	O
memory	O
may	O
be	O
limited	O
.	O
</s>
<s>
The	O
i386SX	O
CPU	O
's	O
32-bit	O
internal	O
addresses	O
can	O
address	O
4GB	O
,	O
but	O
it	O
has	O
only	O
24	O
pins	O
connected	O
to	O
the	O
address	B-Architecture
bus	I-Architecture
,	O
limiting	O
installed	O
physical	O
memory	O
to	O
16MB	O
.	O
</s>
<s>
There	O
may	O
be	O
other	O
hardware	O
restrictions	O
on	O
the	O
maximum	O
amount	O
of	O
RAM	B-Architecture
that	O
can	O
be	O
installed	O
.	O
</s>
<s>
A	O
computer	O
with	O
true	O
n-bit	O
addressing	O
may	O
have	O
2	O
addressable	O
units	O
of	O
RAM	B-Architecture
installed	O
.	O
</s>
<s>
An	O
example	O
is	O
a	O
32-bit	O
x86	B-Operating_System
processor	O
with	O
4GB	O
and	O
without	O
Physical	B-General_Concept
Address	I-General_Concept
Extension	I-General_Concept
(	O
PAE	O
)	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
the	O
processor	O
is	O
able	O
to	O
address	O
all	O
the	O
RAM	B-Architecture
installed	O
and	O
no	O
more	O
.	O
</s>
<s>
However	O
,	O
even	O
in	O
this	O
case	O
,	O
paging	B-Architecture
can	O
be	O
used	O
to	O
create	O
a	O
virtual	B-Architecture
memory	I-Architecture
of	O
over	O
4GB	O
.	O
</s>
<s>
Together	O
,	O
they	O
may	O
require	O
more	O
than	O
4GB	O
,	O
but	O
not	O
all	O
of	O
it	O
will	O
have	O
to	O
be	O
in	O
RAM	B-Architecture
at	O
once	O
.	O
</s>
<s>
A	O
paging	B-Architecture
system	O
makes	O
efficient	O
decisions	O
on	O
which	O
memory	O
to	O
relegate	O
to	O
secondary	O
storage	O
,	O
leading	O
to	O
the	O
best	O
use	O
of	O
the	O
installed	O
RAM	B-Architecture
.	O
</s>
<s>
Although	O
the	O
processor	O
in	O
this	O
example	O
cannot	O
address	O
RAM	B-Architecture
beyond	O
4GB	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
may	O
provide	O
services	O
to	O
programs	O
that	O
envision	O
a	O
larger	O
memory	O
,	O
such	O
as	O
files	O
that	O
can	O
grow	O
beyond	O
the	O
limit	O
of	O
installed	O
RAM	B-Architecture
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
lets	O
a	O
program	O
manipulate	O
data	O
in	O
the	O
file	O
arbitrarily	O
,	O
using	O
paging	B-Architecture
to	O
bring	O
parts	O
of	O
the	O
file	O
into	O
RAM	B-Architecture
when	O
necessary	O
.	O
</s>
<s>
A	O
few	O
computers	O
have	O
a	O
main	O
memory	O
larger	O
than	O
the	O
virtual	O
address	O
space	O
of	O
a	O
process	O
,	O
such	O
as	O
the	O
Magic-1	O
,	O
some	O
PDP-11	O
machines	O
,	O
and	O
some	O
systems	O
using	O
32-bit	O
x86	B-Operating_System
processors	O
with	O
Physical	B-General_Concept
Address	I-General_Concept
Extension	I-General_Concept
.	O
</s>
<s>
This	O
nullifies	O
a	O
significant	O
advantage	O
of	O
paging	B-Architecture
,	O
since	O
a	O
single	O
process	O
cannot	O
use	O
more	O
main	O
memory	O
than	O
the	O
amount	O
of	O
its	O
virtual	O
address	O
space	O
.	O
</s>
<s>
Such	O
systems	O
often	O
use	O
paging	B-Architecture
techniques	O
to	O
obtain	O
secondary	O
benefits	O
:	O
</s>
<s>
The	O
"	O
extra	O
memory	O
"	O
can	O
be	O
used	O
in	O
the	O
page	B-General_Concept
cache	I-General_Concept
to	O
cache	B-General_Concept
frequently	O
used	O
files	O
and	O
metadata	O
,	O
such	O
as	O
directory	O
information	O
,	O
from	O
secondary	O
storage	O
.	O
</s>
<s>
If	O
the	O
processor	O
and	O
operating	B-General_Concept
system	I-General_Concept
support	O
multiple	O
virtual	O
address	O
spaces	O
,	O
the	O
"	O
extra	O
memory	O
"	O
can	O
be	O
used	O
to	O
run	O
more	O
processes	O
.	O
</s>
<s>
Paging	B-Architecture
allows	O
the	O
cumulative	O
total	O
of	O
virtual	O
address	O
spaces	O
to	O
exceed	O
physical	O
main	O
memory	O
.	O
</s>
<s>
A	O
process	O
can	O
store	O
data	O
in	O
memory-mapped	B-General_Concept
files	I-General_Concept
on	O
memory-backed	O
file	O
systems	O
,	O
such	O
as	O
the	O
tmpfs	B-Application
file	O
system	O
or	O
file	O
systems	O
on	O
a	O
RAM	B-Application
drive	I-Application
,	O
and	O
map	O
files	O
into	O
and	O
out	O
of	O
the	O
address	O
space	O
as	O
needed	O
.	O
</s>
<s>
A	O
set	O
of	O
processes	O
may	O
still	O
depend	O
upon	O
the	O
enhanced	O
security	O
features	O
page-based	O
isolation	O
may	O
bring	O
to	O
a	O
multitasking	B-Operating_System
environment	O
.	O
</s>
