<s>
In	O
computing	O
,	O
a	O
page	B-General_Concept
cache	I-General_Concept
,	O
sometimes	O
also	O
called	O
disk	O
cache	B-General_Concept
,	O
is	O
a	O
transparent	O
cache	B-General_Concept
for	O
the	O
pages	B-General_Concept
originating	O
from	O
a	O
secondary	O
storage	O
device	O
such	O
as	O
a	O
hard	B-Device
disk	I-Device
drive	I-Device
(	O
HDD	O
)	O
or	O
a	O
solid-state	B-Device
drive	I-Device
(	O
SSD	B-Device
)	O
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
keeps	O
a	O
page	B-General_Concept
cache	I-General_Concept
in	O
otherwise	O
unused	O
portions	O
of	O
the	O
main	O
memory	O
(	O
RAM	O
)	O
,	O
resulting	O
in	O
quicker	O
access	O
to	O
the	O
contents	O
of	O
cached	O
pages	B-General_Concept
and	O
overall	O
performance	O
improvements	O
.	O
</s>
<s>
A	O
page	B-General_Concept
cache	I-General_Concept
is	O
implemented	O
in	O
kernels	B-Operating_System
with	O
the	O
paging	B-Architecture
memory	O
management	O
,	O
and	O
is	O
mostly	O
transparent	O
to	O
applications	O
.	O
</s>
<s>
Usually	O
,	O
all	O
physical	O
memory	O
not	O
directly	O
allocated	O
to	O
applications	O
is	O
used	O
by	O
the	O
operating	B-General_Concept
system	I-General_Concept
for	O
the	O
page	B-General_Concept
cache	I-General_Concept
.	O
</s>
<s>
Since	O
the	O
memory	O
would	O
otherwise	O
be	O
idle	O
and	O
is	O
easily	O
reclaimed	O
when	O
applications	O
request	O
it	O
,	O
there	O
is	O
generally	O
no	O
associated	O
performance	O
penalty	O
and	O
the	O
operating	B-General_Concept
system	I-General_Concept
might	O
even	O
report	O
such	O
memory	O
as	O
"	O
free	O
"	O
or	O
"	O
available	O
"	O
.	O
</s>
<s>
When	O
compared	O
to	O
main	O
memory	O
,	O
hard	B-Device
disk	I-Device
drive	I-Device
read/writes	O
are	O
slow	O
and	O
random	O
accesses	O
require	O
expensive	O
disk	O
seeks	O
;	O
as	O
a	O
result	O
,	O
larger	O
amounts	O
of	O
main	O
memory	O
bring	O
performance	O
improvements	O
as	O
more	O
data	O
can	O
be	O
cached	O
in	O
memory	O
.	O
</s>
<s>
Separate	O
disk	O
caching	B-General_Concept
is	O
provided	O
on	O
the	O
hardware	O
side	O
,	O
by	O
dedicated	O
RAM	O
or	O
NVRAM	B-General_Concept
chips	O
located	O
either	O
in	O
the	O
disk	B-General_Concept
controller	I-General_Concept
(	O
in	O
which	O
case	O
the	O
cache	B-General_Concept
is	O
integrated	O
into	O
a	O
hard	B-Device
disk	I-Device
drive	I-Device
and	O
usually	O
called	O
disk	B-Device
buffer	I-Device
)	O
,	O
or	O
in	O
a	O
disk	B-Device
array	I-Device
controller	I-Device
.	O
</s>
<s>
Such	O
memory	O
should	O
not	O
be	O
confused	O
with	O
the	O
page	B-General_Concept
cache	I-General_Concept
.	O
</s>
<s>
Pages	B-General_Concept
in	O
the	O
page	B-General_Concept
cache	I-General_Concept
modified	O
after	O
being	O
brought	O
in	O
are	O
called	O
dirty	O
pages	B-General_Concept
.	O
</s>
<s>
Since	O
non-dirty	O
pages	B-General_Concept
in	O
the	O
page	B-General_Concept
cache	I-General_Concept
have	O
identical	O
copies	O
in	O
secondary	O
storage	O
(	O
e.g.	O
</s>
<s>
hard	B-Device
disk	I-Device
drive	I-Device
or	O
solid-state	B-Device
drive	I-Device
)	O
,	O
discarding	O
and	O
reusing	O
their	O
space	O
is	O
much	O
quicker	O
than	O
paging	B-Architecture
out	O
application	O
memory	O
,	O
and	O
is	O
often	O
preferred	O
over	O
flushing	O
the	O
dirty	O
pages	B-General_Concept
into	O
secondary	O
storage	O
and	O
reusing	O
their	O
space	O
.	O
</s>
<s>
Executable	B-Application
binaries	I-Application
,	O
such	O
as	O
applications	O
and	O
libraries	O
,	O
are	O
also	O
typically	O
accessed	O
through	O
page	B-General_Concept
cache	I-General_Concept
and	O
mapped	O
to	O
individual	O
process	B-Operating_System
spaces	O
using	O
virtual	B-Architecture
memory	I-Architecture
(	O
this	O
is	O
done	O
through	O
the	O
mmap	B-Operating_System
system	O
call	O
on	O
Unix-like	O
operating	B-General_Concept
systems	I-General_Concept
)	O
.	O
</s>
<s>
Since	O
cached	O
pages	B-General_Concept
can	O
be	O
easily	O
evicted	O
and	O
re-used	O
,	O
some	O
operating	B-General_Concept
systems	I-General_Concept
,	O
notably	O
Windows	B-Device
NT	I-Device
,	O
even	O
report	O
the	O
page	B-General_Concept
cache	I-General_Concept
usage	O
as	O
"	O
available	O
"	O
memory	O
,	O
while	O
the	O
memory	O
is	O
actually	O
allocated	O
to	O
disk	B-General_Concept
pages	I-General_Concept
.	O
</s>
<s>
This	O
has	O
led	O
to	O
some	O
confusion	O
about	O
the	O
utilization	O
of	O
page	B-General_Concept
cache	I-General_Concept
in	O
Windows	O
.	O
</s>
<s>
The	O
page	B-General_Concept
cache	I-General_Concept
also	O
aids	O
in	O
writing	O
to	O
a	O
disk	O
.	O
</s>
<s>
Pages	B-General_Concept
in	O
the	O
main	O
memory	O
that	O
have	O
been	O
modified	O
during	O
writing	O
data	O
to	O
disk	O
are	O
marked	O
as	O
"	O
dirty	O
"	O
and	O
have	O
to	O
be	O
flushed	O
to	O
disk	O
before	O
they	O
can	O
be	O
freed	O
.	O
</s>
<s>
If	O
it	O
is	O
already	O
found	O
in	O
the	O
page	B-General_Concept
cache	I-General_Concept
,	O
the	O
write	O
is	O
done	O
to	O
that	O
page	B-Architecture
in	I-Architecture
the	O
main	O
memory	O
.	O
</s>
<s>
If	O
it	O
is	O
not	O
found	O
in	O
the	O
page	B-General_Concept
cache	I-General_Concept
,	O
then	O
,	O
when	O
the	O
write	O
perfectly	O
falls	O
on	O
page	B-General_Concept
size	I-General_Concept
boundaries	O
,	O
the	O
page	O
is	O
not	O
even	O
read	O
from	O
disk	O
,	O
but	O
allocated	O
and	O
immediately	O
marked	O
dirty	O
.	O
</s>
<s>
A	O
file	O
that	O
is	O
created	O
or	O
opened	O
in	O
the	O
page	B-General_Concept
cache	I-General_Concept
,	O
but	O
not	O
written	O
to	O
,	O
might	O
result	O
in	O
a	O
zero	B-Application
byte	I-Application
file	I-Application
at	O
a	O
later	O
read	O
.	O
</s>
<s>
However	O
,	O
not	O
all	O
cached	O
pages	B-General_Concept
can	O
be	O
written	O
to	O
as	O
program	O
code	O
is	O
often	O
mapped	O
as	O
read-only	O
or	O
copy-on-write	B-Language
;	O
in	O
the	O
latter	O
case	O
,	O
modifications	O
to	O
code	O
will	O
only	O
be	O
visible	O
to	O
the	O
process	B-Operating_System
itself	O
and	O
will	O
not	O
be	O
written	O
to	O
disk	O
.	O
</s>
<s>
In	O
2019	O
,	O
security	O
researchers	O
demonstrated	O
side-channel	O
attacks	O
against	O
the	O
page	B-General_Concept
cache	I-General_Concept
:	O
it	O
's	O
possible	O
to	O
bypass	O
privilege	O
separation	O
and	O
exfiltrate	O
data	O
about	O
other	O
processes	O
by	O
systematically	O
monitoring	O
whether	O
some	O
file	B-Architecture
pages	I-Architecture
(	O
for	O
example	O
executable	B-Application
or	O
library	B-Library
files	O
)	O
are	O
present	O
in	O
the	O
cache	B-General_Concept
or	O
not	O
.	O
</s>
