<s>
In	O
computing	O
,	O
kernel	B-Application
same-page	I-Application
merging	I-Application
(	O
KSM	O
)	O
,	O
also	O
known	O
as	O
kernel	B-Operating_System
shared	B-Operating_System
memory	I-Operating_System
,	O
memory	O
merging	O
,	O
memory	B-Application
deduplication	I-Application
,	O
and	O
page	B-Application
deduplication	I-Application
is	O
a	O
kernel	B-Operating_System
feature	O
that	O
makes	O
it	O
possible	O
for	O
a	O
hypervisor	B-Operating_System
system	O
to	O
share	O
memory	B-General_Concept
pages	I-General_Concept
that	O
have	O
identical	O
contents	O
between	O
multiple	O
processes	B-Operating_System
or	O
virtualized	B-General_Concept
guests	O
.	O
</s>
<s>
While	O
not	O
directly	O
linked	O
,	O
Kernel-based	B-Application
Virtual	I-Application
Machine	I-Application
(	O
KVM	O
)	O
can	O
use	O
KSM	O
to	O
merge	O
memory	B-General_Concept
pages	I-General_Concept
occupied	O
by	O
virtual	B-Architecture
machines	I-Architecture
.	O
</s>
<s>
KSM	O
performs	O
memory	B-Application
deduplication	I-Application
by	O
scanning	O
through	O
main	O
memory	O
for	O
physical	O
pages	O
that	O
have	O
identical	O
content	O
,	O
and	O
identifies	O
the	O
virtual	B-General_Concept
pages	I-General_Concept
that	O
are	O
mapped	O
to	O
those	O
physical	O
pages	O
.	O
</s>
<s>
It	O
also	O
marks	O
both	O
virtual	B-General_Concept
pages	I-General_Concept
as	O
"	O
copy-on-write	B-Language
"	O
(	O
COW	O
)	O
,	O
so	O
that	O
kernel	B-Operating_System
will	O
automatically	O
remap	O
a	O
virtual	B-General_Concept
page	I-General_Concept
back	O
to	O
having	O
its	O
own	O
separate	O
physical	O
page	O
as	O
soon	O
as	O
any	O
process	O
begins	O
to	O
write	O
to	O
it	O
.	O
</s>
<s>
KSM	O
was	O
originally	O
intended	O
to	O
run	O
more	O
virtual	B-Architecture
machines	I-Architecture
on	O
one	O
host	O
by	O
sharing	B-Operating_System
memory	I-Operating_System
between	O
processes	B-Operating_System
as	O
well	O
as	O
virtual	B-Architecture
machines	I-Architecture
.	O
</s>
<s>
Upon	O
its	O
implementation	O
,	O
users	O
found	O
KSM	O
to	O
also	O
be	O
useful	O
for	O
non-virtualized	O
environments	O
in	O
which	O
memory	O
is	O
at	O
a	O
premium	O
.	O
</s>
<s>
KSM	O
was	O
merged	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
in	O
version	O
2.6.32	O
,	O
which	O
was	O
released	O
on	O
December	O
3	O
,	O
2009	O
.	O
</s>
<s>
To	O
be	O
effective	O
,	O
the	O
operating	B-Operating_System
system	I-Operating_System
kernel	I-Operating_System
must	O
find	O
identical	O
memory	B-General_Concept
pages	I-General_Concept
held	O
by	O
different	O
processes	B-Operating_System
.	O
</s>
<s>
The	O
kernel	B-Operating_System
also	O
needs	O
to	O
predict	O
whether	O
the	O
pages	O
are	O
likely	O
to	O
update	O
infrequently	O
enough	O
that	O
the	O
merging	O
would	O
be	O
an	O
efficient	O
use	O
of	O
processor	O
resources	O
.	O
</s>
