<s>
Out	B-General_Concept
of	I-General_Concept
memory	I-General_Concept
(	O
OOM	O
)	O
is	O
an	O
often	O
undesired	O
state	O
of	O
computer	O
operation	O
where	O
no	O
additional	O
memory	O
can	O
be	O
allocated	O
for	O
use	O
by	O
programs	O
or	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
Historically	O
,	O
the	O
out	B-General_Concept
of	I-General_Concept
memory	I-General_Concept
condition	O
was	O
more	O
common	O
than	O
it	O
is	O
now	O
,	O
since	O
early	O
computers	O
and	O
operating	B-General_Concept
systems	I-General_Concept
were	O
limited	O
to	O
small	O
amounts	O
of	O
physical	O
random-access	B-Architecture
memory	I-Architecture
(	O
RAM	B-Architecture
)	O
due	O
to	O
the	O
inability	O
of	O
early	O
processors	O
to	O
address	O
large	O
amounts	O
of	O
memory	O
,	O
as	O
well	O
as	O
cost	O
considerations	O
.	O
</s>
<s>
Since	O
the	O
advent	O
of	O
virtual	B-Architecture
memory	I-Architecture
opened	O
the	O
door	O
for	O
the	O
usage	O
of	O
swap	O
space	O
,	O
the	O
condition	O
is	O
less	O
frequent	O
.	O
</s>
<s>
Therefore	O
,	O
they	O
would	O
either	O
fail	O
immediately	O
with	O
an	O
"	O
out	B-General_Concept
of	I-General_Concept
memory	I-General_Concept
"	O
error	O
(	O
OOME	B-General_Concept
)	O
message	O
,	O
or	O
work	O
as	O
expected	O
.	O
</s>
<s>
Early	O
operating	B-General_Concept
systems	I-General_Concept
such	O
as	O
MS-DOS	B-Application
lacked	O
support	O
for	O
multitasking	B-Operating_System
.	O
</s>
<s>
Modern	O
operating	B-General_Concept
systems	I-General_Concept
provide	O
virtual	B-Architecture
memory	I-Architecture
,	O
in	O
which	O
processes	O
are	O
given	O
a	O
range	O
of	O
memory	O
,	O
but	O
where	O
the	O
memory	O
does	O
not	O
directly	O
correspond	O
to	O
actual	O
physical	O
RAM	B-Architecture
.	O
</s>
<s>
Virtual	B-Architecture
memory	I-Architecture
can	O
be	O
backed	O
by	O
physical	O
RAM	B-Architecture
,	O
a	O
disk	O
file	O
via	O
mmap	B-Operating_System
(	O
on	O
Unix-derivatives	O
)	O
or	O
MapViewOfFile	O
(	O
on	O
Windows	O
)	O
,	O
or	O
swap	O
space	O
,	O
and	O
the	O
operating	B-General_Concept
system	I-General_Concept
can	O
move	O
virtual	B-Architecture
memory	I-Architecture
pages	O
around	O
as	O
it	O
needs	O
.	O
</s>
<s>
Because	O
virtual	B-Architecture
memory	I-Architecture
does	O
not	O
need	O
to	O
be	O
backed	O
by	O
physical	O
memory	O
,	O
exhaustion	O
of	O
it	O
is	O
rare	O
,	O
and	O
usually	O
there	O
are	O
other	O
limits	O
imposed	O
by	O
the	O
operating	B-General_Concept
system	I-General_Concept
on	O
resource	O
consumption	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
a	O
computer	O
with	O
virtual	B-Architecture
memory	I-Architecture
support	O
where	O
the	O
majority	O
of	O
the	O
loaded	O
data	O
resides	O
on	O
the	O
hard	O
disk	O
may	O
run	O
out	O
of	O
physical	O
memory	O
but	O
not	O
virtual	B-Architecture
memory	I-Architecture
,	O
thus	O
causing	O
excessive	O
paging	B-Architecture
.	O
</s>
<s>
This	O
condition	O
,	O
known	O
as	O
thrashing	B-General_Concept
,	O
usually	O
renders	O
the	O
computer	O
unusable	O
until	O
some	O
programs	O
are	O
closed	O
or	O
the	O
machine	O
is	O
rebooted	O
.	O
</s>
<s>
Due	O
to	O
these	O
reasons	O
,	O
an	O
out-of-memory	B-General_Concept
message	O
is	O
rarely	O
encountered	O
by	O
applications	O
with	O
modern	O
computers	O
.	O
</s>
<s>
The	O
typical	O
OOM	O
case	O
in	O
modern	O
computers	O
happens	O
when	O
the	O
operating	B-General_Concept
system	I-General_Concept
is	O
unable	O
to	O
create	O
any	O
more	O
virtual	B-Architecture
memory	I-Architecture
,	O
because	O
all	O
of	O
its	O
potential	O
backing	O
devices	O
have	O
been	O
filled	O
or	O
the	O
end-user	O
has	O
disabled	O
them	O
.	O
</s>
<s>
The	O
kernels	B-Operating_System
of	O
operating	B-General_Concept
systems	I-General_Concept
such	O
as	O
Linux	B-Operating_System
will	O
attempt	O
to	O
recover	O
from	O
this	O
type	O
of	O
OOM	O
condition	O
by	O
terminating	O
one	O
or	O
more	O
processes	O
,	O
a	O
mechanism	O
known	O
as	O
the	O
OOM	B-General_Concept
Killer	I-General_Concept
.	O
</s>
<s>
Linux	B-Application
4.6	I-Application
(	O
released	O
in	O
May	O
2016	O
)	O
introduced	O
changes	O
in	O
OOM	O
situations	O
,	O
improving	O
detection	O
and	O
reliability.	O
,	O
cgroup	B-Application
awareness	O
in	O
OOM	B-General_Concept
killer	I-General_Concept
was	O
implemented	O
in	O
Linux	B-Application
kernel	I-Application
4.19	I-Application
released	O
in	O
October	O
2018	O
,	O
which	O
adds	O
an	O
ability	O
to	O
kill	O
a	O
cgroup	B-Application
as	O
a	O
single	O
unit	O
.	O
</s>
<s>
Due	O
to	O
late	O
activation	O
of	O
OOM	B-General_Concept
Killer	I-General_Concept
on	O
some	O
Linux	B-Operating_System
systems	O
,	O
there	O
are	O
several	O
daemons	O
and	O
kernel	B-Operating_System
patches	O
that	O
help	O
to	O
recover	O
memory	O
from	O
OOM	O
condition	O
before	O
it	O
was	O
too	O
late	O
.	O
</s>
<s>
PSI	O
(	O
pressure	O
stall	O
information	O
)	O
kernel	B-Operating_System
patches	O
and	O
the	O
accompanying	O
oomd	O
daemon	O
,	O
the	O
patches	O
are	O
merged	O
in	O
Linux	B-Operating_System
kernel	I-Operating_System
4.20	O
.	O
</s>
<s>
Some	O
high-end	O
32-bit	O
systems	O
(	O
such	O
as	O
those	O
with	O
Physical	B-General_Concept
Address	I-General_Concept
Extension	I-General_Concept
enabled	O
)	O
come	O
with	O
8	O
gigabytes	O
or	O
more	O
of	O
system	O
memory	O
,	O
even	O
though	O
any	O
single	O
process	O
can	O
only	O
access	O
4GB	O
of	O
it	O
in	O
a	O
32-bit	O
flat	B-General_Concept
memory	I-General_Concept
model	I-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
the	O
C	B-Language
standard	I-Language
function	I-Language
for	O
allocating	O
memory	O
,	O
malloc( )	O
,	O
will	O
return	O
NULL	O
and	O
a	O
well-behaved	O
application	O
should	O
handle	O
this	O
situation	O
.	O
</s>
