<s>
In	O
computing	O
,	O
a	O
cache	B-General_Concept
(	O
)	O
is	O
a	O
hardware	O
or	O
software	O
component	O
that	O
stores	O
data	O
so	O
that	O
future	O
requests	O
for	O
that	O
data	O
can	O
be	O
served	O
faster	O
;	O
the	O
data	O
stored	O
in	O
a	O
cache	B-General_Concept
might	O
be	O
the	O
result	O
of	O
an	O
earlier	O
computation	O
or	O
a	O
copy	O
of	O
data	O
stored	O
elsewhere	O
.	O
</s>
<s>
A	O
cache	B-General_Concept
hit	O
occurs	O
when	O
the	O
requested	O
data	O
can	O
be	O
found	O
in	O
a	O
cache	B-General_Concept
,	O
while	O
a	O
cache	B-General_Concept
miss	O
occurs	O
when	O
it	O
cannot	O
.	O
</s>
<s>
Cache	B-General_Concept
hits	O
are	O
served	O
by	O
reading	O
data	O
from	O
the	O
cache	B-General_Concept
,	O
which	O
is	O
faster	O
than	O
recomputing	O
a	O
result	O
or	O
reading	O
from	O
a	O
slower	O
data	O
store	O
;	O
thus	O
,	O
the	O
more	O
requests	O
that	O
can	O
be	O
served	O
from	O
the	O
cache	B-General_Concept
,	O
the	O
faster	O
the	O
system	O
performs	O
.	O
</s>
<s>
To	O
be	O
cost-effective	O
and	O
to	O
enable	O
efficient	O
use	O
of	O
data	O
,	O
caches	B-General_Concept
must	O
be	O
relatively	O
small	O
.	O
</s>
<s>
Nevertheless	O
,	O
caches	B-General_Concept
have	O
proven	O
themselves	O
in	O
many	O
areas	O
of	O
computing	O
,	O
because	O
typical	O
computer	B-Application
applications	I-Application
access	O
data	O
with	O
a	O
high	O
degree	O
of	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
.	O
</s>
<s>
Such	O
access	O
patterns	O
exhibit	O
temporal	B-General_Concept
locality	I-General_Concept
,	O
where	O
data	O
is	O
requested	O
that	O
has	O
been	O
recently	O
requested	O
already	O
,	O
and	O
spatial	B-General_Concept
locality	O
,	O
where	O
data	O
is	O
requested	O
that	O
is	O
stored	O
physically	O
close	O
to	O
data	O
that	O
has	O
already	O
been	O
requested	O
.	O
</s>
<s>
There	O
is	O
an	O
inherent	O
trade-off	O
between	O
size	O
and	O
speed	O
(	O
given	O
that	O
a	O
larger	O
resource	O
implies	O
greater	O
physical	O
distances	O
)	O
but	O
also	O
a	O
tradeoff	O
between	O
expensive	O
,	O
premium	O
technologies	O
(	O
such	O
as	O
SRAM	B-Architecture
)	O
vs	O
cheaper	O
,	O
easily	O
mass-produced	O
commodities	O
(	O
such	O
as	O
DRAM	O
or	O
hard	B-Device
disks	I-Device
)	O
.	O
</s>
<s>
The	O
buffering	B-General_Concept
provided	O
by	O
a	O
cache	B-General_Concept
benefits	O
one	O
or	O
both	O
of	O
latency	O
and	O
throughput	O
(	O
bandwidth	O
)	O
:	O
</s>
<s>
Prediction	O
or	O
explicit	O
prefetching	B-General_Concept
might	O
also	O
guess	O
where	O
future	O
reads	O
will	O
come	O
from	O
and	O
make	O
requests	O
ahead	O
of	O
time	O
;	O
if	O
done	O
correctly	O
the	O
latency	O
is	O
bypassed	O
altogether	O
.	O
</s>
<s>
The	O
use	O
of	O
a	O
cache	B-General_Concept
also	O
allows	O
for	O
higher	O
throughput	O
from	O
the	O
underlying	O
resource	O
,	O
by	O
assembling	O
multiple	O
fine	O
grain	O
transfers	O
into	O
larger	O
,	O
more	O
efficient	O
requests	O
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
a	O
program	O
accessing	O
bytes	O
in	O
a	O
32-bit	O
address	B-General_Concept
space	I-General_Concept
,	O
but	O
being	O
served	O
by	O
a	O
128-bit	O
off-chip	O
data	O
bus	O
;	O
individual	O
uncached	O
byte	O
accesses	O
would	O
allow	O
only	O
1/16th	O
of	O
the	O
total	O
bandwidth	O
to	O
be	O
used	O
,	O
and	O
80%	O
of	O
the	O
data	O
movement	O
would	O
be	O
memory	O
addresses	O
instead	O
of	O
data	O
itself	O
.	O
</s>
<s>
Hardware	O
implements	O
cache	B-General_Concept
as	O
a	O
block	B-General_Concept
of	O
memory	O
for	O
temporary	O
storage	O
of	O
data	O
likely	O
to	O
be	O
used	O
again	O
.	O
</s>
<s>
Central	B-General_Concept
processing	I-General_Concept
units	I-General_Concept
(	O
CPUs	B-Device
)	O
,	O
solid-state	B-Device
drives	I-Device
(	O
SSDs	B-Device
)	O
and	O
hard	B-Device
disk	I-Device
drives	I-Device
(	O
HDDs	O
)	O
frequently	O
include	O
hardware-based	O
cache	B-General_Concept
,	O
while	O
web	B-Application
browsers	I-Application
and	O
web	B-Application
servers	I-Application
commonly	O
rely	O
on	O
software	O
caching	B-General_Concept
.	O
</s>
<s>
A	O
cache	B-General_Concept
is	O
made	O
up	O
of	O
a	O
pool	O
of	O
entries	O
.	O
</s>
<s>
Each	O
entry	O
has	O
associated	O
data	O
,	O
which	O
is	O
a	O
copy	O
of	O
the	O
same	O
data	O
in	O
some	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
Each	O
entry	O
also	O
has	O
a	O
tag	O
,	O
which	O
specifies	O
the	O
identity	O
of	O
the	O
data	O
in	O
the	O
backing	B-General_Concept
store	I-General_Concept
of	O
which	O
the	O
entry	O
is	O
a	O
copy	O
.	O
</s>
<s>
Tagging	O
allows	O
simultaneous	O
cache-oriented	O
algorithms	O
to	O
function	O
in	O
multilayered	O
fashion	O
without	O
differential	O
relay	O
interference	O
.	O
</s>
<s>
When	O
the	O
cache	B-General_Concept
client	O
(	O
a	O
CPU	B-Device
,	O
web	B-Application
browser	I-Application
,	O
operating	B-General_Concept
system	I-General_Concept
)	O
needs	O
to	O
access	O
data	O
presumed	O
to	O
exist	O
in	O
the	O
backing	B-General_Concept
store	I-General_Concept
,	O
it	O
first	O
checks	O
the	O
cache	B-General_Concept
.	O
</s>
<s>
This	O
situation	O
is	O
known	O
as	O
a	O
cache	B-General_Concept
hit	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
web	B-Application
browser	I-Application
program	O
might	O
check	O
its	O
local	O
cache	B-General_Concept
on	O
disk	B-Device
to	O
see	O
if	O
it	O
has	O
a	O
local	O
copy	O
of	O
the	O
contents	O
of	O
a	O
web	O
page	O
at	O
a	O
particular	O
URL	O
.	O
</s>
<s>
The	O
percentage	O
of	O
accesses	O
that	O
result	O
in	O
cache	B-General_Concept
hits	O
is	O
known	O
as	O
the	O
hit	O
rate	O
or	O
hit	O
ratio	O
of	O
the	O
cache	B-General_Concept
.	O
</s>
<s>
The	O
alternative	O
situation	O
,	O
when	O
the	O
cache	B-General_Concept
is	O
checked	O
and	O
found	O
not	O
to	O
contain	O
any	O
entry	O
with	O
the	O
desired	O
tag	O
,	O
is	O
known	O
as	O
a	O
cache	B-General_Concept
miss	O
.	O
</s>
<s>
This	O
requires	O
a	O
more	O
expensive	O
access	O
of	O
data	O
from	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
Once	O
the	O
requested	O
data	O
is	O
retrieved	O
,	O
it	O
is	O
typically	O
copied	O
into	O
the	O
cache	B-General_Concept
,	O
ready	O
for	O
the	O
next	O
access	O
.	O
</s>
<s>
During	O
a	O
cache	B-General_Concept
miss	O
,	O
some	O
other	O
previously	O
existing	O
cache	B-General_Concept
entry	O
is	O
removed	O
in	O
order	O
to	O
make	O
room	O
for	O
the	O
newly	O
retrieved	O
data	O
.	O
</s>
<s>
The	O
heuristic	B-Algorithm
used	O
to	O
select	O
the	O
entry	O
to	O
replace	O
is	O
known	O
as	O
the	O
replacement	B-General_Concept
policy	I-General_Concept
.	O
</s>
<s>
One	O
popular	O
replacement	B-General_Concept
policy	I-General_Concept
,	O
"	O
least	O
recently	O
used	O
"	O
(	O
LRU	O
)	O
,	O
replaces	O
the	O
oldest	O
entry	O
,	O
the	O
entry	O
that	O
was	O
accessed	O
less	O
recently	O
than	O
any	O
other	O
entry	O
(	O
see	O
cache	B-General_Concept
algorithm	I-General_Concept
)	O
.	O
</s>
<s>
More	O
efficient	O
caching	B-General_Concept
algorithms	I-General_Concept
compute	O
the	O
use-hit	O
frequency	O
against	O
the	O
size	O
of	O
the	O
stored	O
contents	O
,	O
as	O
well	O
as	O
the	O
latencies	B-General_Concept
and	O
throughputs	O
for	O
both	O
the	O
cache	B-General_Concept
and	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
This	O
works	O
well	O
for	O
larger	O
amounts	O
of	O
data	O
,	O
longer	O
latencies	B-General_Concept
,	O
and	O
slower	O
throughputs	O
,	O
such	O
as	O
that	O
experienced	O
with	O
hard	B-Device
drives	I-Device
and	O
networks	O
,	O
but	O
is	O
not	O
efficient	O
for	O
use	O
within	O
a	O
CPU	B-Device
cache	B-General_Concept
.	O
</s>
<s>
When	O
a	O
system	O
writes	O
data	O
to	O
cache	B-General_Concept
,	O
it	O
must	O
at	O
some	O
point	O
write	O
that	O
data	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
as	O
well	O
.	O
</s>
<s>
Write-through	O
:	O
write	O
is	O
done	O
synchronously	O
both	O
to	O
the	O
cache	B-General_Concept
and	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
Write-back	O
:	O
initially	O
,	O
writing	O
is	O
done	O
only	O
to	O
the	O
cache	B-General_Concept
.	O
</s>
<s>
The	O
write	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
is	O
postponed	O
until	O
the	O
modified	O
content	O
is	O
about	O
to	O
be	O
replaced	O
by	O
another	O
cache	B-General_Concept
block	B-General_Concept
.	O
</s>
<s>
A	O
write-back	O
cache	B-General_Concept
is	O
more	O
complex	O
to	O
implement	O
,	O
since	O
it	O
needs	O
to	O
track	O
which	O
of	O
its	O
locations	O
have	O
been	O
written	O
over	O
,	O
and	O
mark	O
them	O
as	O
dirty	O
for	O
later	O
writing	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
The	O
data	O
in	O
these	O
locations	O
are	O
written	O
back	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
only	O
when	O
they	O
are	O
evicted	O
from	O
the	O
cache	B-General_Concept
,	O
an	O
effect	O
referred	O
to	O
as	O
a	O
lazy	B-General_Concept
write	I-General_Concept
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
a	O
read	O
miss	O
in	O
a	O
write-back	O
cache	B-General_Concept
(	O
which	O
requires	O
a	O
block	B-General_Concept
to	O
be	O
replaced	O
by	O
another	O
)	O
will	O
often	O
require	O
two	O
memory	O
accesses	O
to	O
service	O
:	O
one	O
to	O
write	O
the	O
replaced	O
data	O
from	O
the	O
cache	B-General_Concept
back	O
to	O
the	O
store	O
,	O
and	O
then	O
one	O
to	O
retrieve	O
the	O
needed	O
data	O
.	O
</s>
<s>
The	O
client	O
may	O
make	O
many	O
changes	O
to	O
data	O
in	O
the	O
cache	B-General_Concept
,	O
and	O
then	O
explicitly	O
notify	O
the	O
cache	B-General_Concept
to	O
write	O
back	O
the	O
data	O
.	O
</s>
<s>
Since	O
no	O
data	O
is	O
returned	O
to	O
the	O
requester	O
on	O
write	O
operations	O
,	O
a	O
decision	O
needs	O
to	O
be	O
made	O
on	O
write	O
misses	O
,	O
whether	O
or	O
not	O
data	O
would	O
be	O
loaded	O
into	O
the	O
cache	B-General_Concept
.	O
</s>
<s>
Write	O
allocate	O
(	O
also	O
called	O
fetch	O
on	O
write	O
)	O
:	O
data	O
at	O
the	O
missed-write	O
location	O
is	O
loaded	O
to	O
cache	B-General_Concept
,	O
followed	O
by	O
a	O
write-hit	O
operation	O
.	O
</s>
<s>
No-write	O
allocate	O
(	O
also	O
called	O
write-no-allocate	O
or	O
write	O
around	O
)	O
:	O
data	O
at	O
the	O
missed-write	O
location	O
is	O
not	O
loaded	O
to	O
cache	B-General_Concept
,	O
and	O
is	O
written	O
directly	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
In	O
this	O
approach	O
,	O
data	O
is	O
loaded	O
into	O
the	O
cache	B-General_Concept
on	O
read	O
misses	O
only	O
.	O
</s>
<s>
A	O
write-back	O
cache	B-General_Concept
uses	O
write	O
allocate	O
,	O
hoping	O
for	O
subsequent	O
writes	O
(	O
or	O
even	O
reads	O
)	O
to	O
the	O
same	O
location	O
,	O
which	O
is	O
now	O
cached	O
.	O
</s>
<s>
A	O
write-through	O
cache	B-General_Concept
uses	O
no-write	O
allocate	O
.	O
</s>
<s>
Here	O
,	O
subsequent	O
writes	O
have	O
no	O
advantage	O
,	O
since	O
they	O
still	O
need	O
to	O
be	O
written	O
directly	O
to	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
Entities	O
other	O
than	O
the	O
cache	B-General_Concept
may	O
change	O
the	O
data	O
in	O
the	O
backing	B-General_Concept
store	I-General_Concept
,	O
in	O
which	O
case	O
the	O
copy	O
in	O
the	O
cache	B-General_Concept
may	O
become	O
out-of-date	O
or	O
stale	O
.	O
</s>
<s>
Alternatively	O
,	O
when	O
the	O
client	O
updates	O
the	O
data	O
in	O
the	O
cache	B-General_Concept
,	O
copies	O
of	O
those	O
data	O
in	O
other	O
caches	B-General_Concept
will	O
become	O
stale	O
.	O
</s>
<s>
Communication	O
protocols	O
between	O
the	O
cache	B-General_Concept
managers	O
which	O
keep	O
the	O
data	O
consistent	O
are	O
known	O
as	O
coherency	O
protocols	O
.	O
</s>
<s>
On	O
a	O
cache	B-General_Concept
read	O
miss	O
,	O
</s>
<s>
caches	B-General_Concept
with	O
a	O
demand	B-General_Concept
paging	I-General_Concept
policy	O
read	O
the	O
minimum	O
amount	O
from	O
the	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
demand-paging	O
virtual	O
memory	O
reads	O
one	O
page	O
of	O
virtual	O
memory	O
(	O
often	O
4	O
kBytes	O
)	O
from	O
disk	B-Device
into	O
the	O
disk	B-Device
cache	B-General_Concept
in	O
RAM	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
typical	O
CPU	B-Device
reads	O
a	O
single	O
L2	O
cache	B-General_Concept
line	O
of	O
128	O
bytes	O
from	O
DRAM	O
into	O
the	O
L2	O
cache	B-General_Concept
,	O
and	O
a	O
single	O
L1	O
cache	B-General_Concept
line	O
of	O
64	O
bytes	O
from	O
the	O
L2	O
cache	B-General_Concept
into	O
the	O
L1	O
cache	B-General_Concept
.	O
</s>
<s>
go	O
further	O
—	O
they	O
not	O
only	O
read	O
the	O
chunk	O
requested	O
,	O
but	O
guess	O
that	O
the	O
next	O
chunk	O
or	O
two	O
will	O
soon	O
be	O
required	O
,	O
and	O
so	O
prefetch	O
that	O
data	O
into	O
the	O
cache	B-General_Concept
ahead	O
of	O
time	O
.	O
</s>
<s>
when	O
the	O
backing	B-General_Concept
store	I-General_Concept
has	O
a	O
long	O
latency	O
to	O
read	O
the	O
first	O
chunk	O
and	O
much	O
shorter	O
times	O
to	O
sequentially	O
read	O
the	O
next	O
few	O
chunks	O
,	O
such	O
as	O
disk	B-Device
storage	I-Device
and	O
DRAM	O
.	O
</s>
<s>
A	O
few	O
operating	B-General_Concept
systems	I-General_Concept
go	O
further	O
with	O
a	O
loader	B-Operating_System
that	O
always	O
pre-loads	O
the	O
entire	O
executable	O
into	O
RAM	O
.	O
</s>
<s>
A	O
few	O
caches	B-General_Concept
go	O
even	O
further	O
,	O
not	O
only	O
pre-loading	O
an	O
entire	O
file	O
,	O
but	O
also	O
starting	O
to	O
load	O
other	O
related	O
files	O
that	O
may	O
soon	O
be	O
requested	O
,	O
such	O
as	O
the	O
page	B-General_Concept
cache	I-General_Concept
associated	O
with	O
a	O
prefetcher	O
or	O
the	O
web	B-Protocol
cache	I-Protocol
associated	O
with	O
link	B-Protocol
prefetching	I-Protocol
.	O
</s>
<s>
Small	O
memories	O
on	O
or	O
close	O
to	O
the	O
CPU	B-Device
can	O
operate	O
faster	O
than	O
the	O
much	O
larger	O
main	O
memory	O
.	O
</s>
<s>
Most	O
CPUs	B-Device
since	O
the	O
1980s	O
have	O
used	O
one	O
or	O
more	O
caches	B-General_Concept
,	O
sometimes	O
in	O
cascaded	O
levels	O
;	O
modern	O
high-end	O
embedded	B-Architecture
,	O
desktop	B-Device
and	O
server	O
microprocessors	B-Architecture
may	O
have	O
as	O
many	O
as	O
six	O
types	O
of	O
cache	B-General_Concept
(	O
between	O
levels	O
and	O
functions	O
)	O
.	O
</s>
<s>
Examples	O
of	O
caches	B-General_Concept
with	O
a	O
specific	O
function	O
are	O
the	O
D-cache	O
and	O
I-cache	O
and	O
the	O
translation	B-Architecture
lookaside	I-Architecture
buffer	I-Architecture
for	O
the	O
MMU	B-General_Concept
.	O
</s>
<s>
Earlier	O
graphics	B-Architecture
processing	I-Architecture
units	I-Architecture
(	O
GPUs	B-Architecture
)	O
often	O
had	O
limited	O
read-only	O
texture	O
caches	B-General_Concept
,	O
and	O
introduced	O
Morton	B-Algorithm
order	I-Algorithm
swizzled	O
textures	O
to	O
improve	O
2D	O
cache	B-General_Concept
coherency	I-General_Concept
.	O
</s>
<s>
Cache	B-General_Concept
misses	O
would	O
drastically	O
affect	O
performance	O
,	O
e.g.	O
</s>
<s>
if	O
mipmapping	B-Data_Structure
was	O
not	O
used	O
.	O
</s>
<s>
Caching	B-General_Concept
was	O
important	O
to	O
leverage	O
32-bit	O
(	O
and	O
wider	O
)	O
transfers	O
for	O
texture	O
data	O
that	O
was	O
often	O
as	O
little	O
as	O
4bits	O
per	O
pixel	O
,	O
indexed	O
in	O
complex	O
patterns	O
by	O
arbitrary	O
UV	O
coordinates	O
and	O
perspective	O
transformations	O
in	O
inverse	O
texture	O
mapping	O
.	O
</s>
<s>
As	O
GPUs	B-Architecture
advanced	O
(	O
especially	O
with	O
GPGPU	B-Architecture
compute	B-Operating_System
shaders	I-Operating_System
)	O
they	O
have	O
developed	O
progressively	O
larger	O
and	O
increasingly	O
general	O
caches	B-General_Concept
,	O
including	O
instruction	B-General_Concept
caches	B-General_Concept
for	O
shaders	O
,	O
exhibiting	O
increasingly	O
common	O
functionality	O
with	O
CPU	B-Device
caches	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
GT200	O
architecture	O
GPUs	B-Architecture
did	O
not	O
feature	O
an	O
L2	O
cache	B-General_Concept
,	O
while	O
the	O
Fermi	B-General_Concept
GPU	B-Architecture
has	O
up	O
to	O
768KB	O
of	O
last-level	O
cache	B-General_Concept
,	O
the	O
Kepler	B-General_Concept
GPU	B-Architecture
has	O
up	O
to	O
1536KB	O
of	O
last-level	O
cache	B-General_Concept
,	O
and	O
the	O
Maxwell	B-General_Concept
GPU	B-Architecture
has	O
up	O
to	O
2048KB	O
of	O
last-level	O
cache	B-General_Concept
.	O
</s>
<s>
These	O
caches	B-General_Concept
have	O
grown	O
to	O
handle	O
synchronisation	O
primitives	O
between	O
threads	O
and	O
atomic	B-General_Concept
operations	I-General_Concept
,	O
and	O
interface	O
with	O
a	O
CPU-style	O
MMU	B-General_Concept
.	O
</s>
<s>
Digital	B-Architecture
signal	I-Architecture
processors	I-Architecture
have	O
similarly	O
generalised	O
over	O
the	O
years	O
.	O
</s>
<s>
Earlier	O
designs	O
used	O
scratchpad	B-General_Concept
memory	I-General_Concept
fed	O
by	O
DMA	B-General_Concept
,	O
but	O
modern	O
DSPs	O
such	O
as	O
Qualcomm	B-General_Concept
Hexagon	I-General_Concept
often	O
include	O
a	O
very	O
similar	O
set	O
of	O
caches	B-General_Concept
to	O
a	O
CPU	B-Device
(	O
e.g.	O
</s>
<s>
Modified	B-Device
Harvard	I-Device
architecture	I-Device
with	O
shared	O
L2	O
,	O
split	O
L1	O
I-cache	O
and	O
D-cache	O
)	O
.	O
</s>
<s>
A	O
memory	B-General_Concept
management	I-General_Concept
unit	I-General_Concept
(	O
MMU	B-General_Concept
)	O
that	O
fetches	O
page	O
table	O
entries	O
from	O
main	O
memory	O
has	O
a	O
specialized	O
cache	B-General_Concept
,	O
used	O
for	O
recording	O
the	O
results	O
of	O
virtual	B-General_Concept
address	I-General_Concept
to	O
physical	B-General_Concept
address	I-General_Concept
translations	O
.	O
</s>
<s>
This	O
specialized	O
cache	B-General_Concept
is	O
called	O
a	O
translation	B-Architecture
lookaside	I-Architecture
buffer	I-Architecture
(	O
TLB	O
)	O
.	O
</s>
<s>
Information-centric	B-Protocol
networking	I-Protocol
(	O
ICN	O
)	O
is	O
an	O
approach	O
to	O
evolve	O
the	O
Internet	O
infrastructure	O
away	O
from	O
a	O
host-centric	O
paradigm	O
,	O
based	O
on	O
perpetual	O
connectivity	O
and	O
the	O
end-to-end	B-Application
principle	I-Application
,	O
to	O
a	O
network	O
architecture	O
in	O
which	O
the	O
focal	O
point	O
is	O
identified	O
information	O
(	O
or	O
content	O
or	O
data	O
)	O
.	O
</s>
<s>
Due	O
to	O
the	O
inherent	O
caching	B-General_Concept
capability	O
of	O
the	O
nodes	O
in	O
an	O
ICN	O
,	O
it	O
can	O
be	O
viewed	O
as	O
a	O
loosely	O
connected	O
network	O
of	O
caches	B-General_Concept
,	O
which	O
has	O
unique	O
requirements	O
of	O
caching	B-General_Concept
policies	O
.	O
</s>
<s>
However	O
,	O
ubiquitous	O
content	O
caching	B-General_Concept
introduces	O
the	O
challenge	O
to	O
content	O
protection	O
against	O
unauthorized	O
access	O
,	O
which	O
requires	O
extra	O
care	O
and	O
solutions	O
.	O
</s>
<s>
Unlike	O
proxy	B-Application
servers	I-Application
,	O
in	O
ICN	O
the	O
cache	B-General_Concept
is	O
a	O
network-level	O
solution	O
.	O
</s>
<s>
Therefore	O
,	O
it	O
has	O
rapidly	O
changing	O
cache	B-General_Concept
states	I-General_Concept
and	O
higher	O
request	O
arrival	O
rates	O
;	O
moreover	O
,	O
smaller	O
cache	B-General_Concept
sizes	O
further	O
impose	O
a	O
different	O
kind	O
of	O
requirements	O
on	O
the	O
content	O
eviction	O
policies	O
.	O
</s>
<s>
Various	O
cache	B-General_Concept
replication	O
and	O
eviction	O
schemes	O
for	O
different	O
ICN	O
architectures	O
and	O
applications	O
have	O
been	O
proposed	O
.	O
</s>
<s>
The	O
Time	O
aware	O
Least	O
Recently	O
Used	O
(	O
TLRU	O
)	O
is	O
a	O
variant	O
of	O
LRU	O
designed	O
for	O
the	O
situation	O
where	O
the	O
stored	O
contents	O
in	O
cache	B-General_Concept
have	O
a	O
valid	O
life	O
time	O
.	O
</s>
<s>
The	O
algorithm	O
is	O
suitable	O
in	O
network	O
cache	B-General_Concept
applications	O
,	O
such	O
as	O
Information-centric	B-Protocol
networking	I-Protocol
(	O
ICN	O
)	O
,	O
Content	B-Operating_System
Delivery	I-Operating_System
Networks	I-Operating_System
(	O
CDNs	O
)	O
and	O
distributed	O
networks	O
in	O
general	O
.	O
</s>
<s>
In	O
the	O
TLRU	O
algorithm	O
,	O
when	O
a	O
piece	O
of	O
content	O
arrives	O
,	O
a	O
cache	B-General_Concept
node	O
calculates	O
the	O
local	O
TTU	O
value	O
based	O
on	O
the	O
TTU	O
value	O
assigned	O
by	O
the	O
content	O
publisher	O
.	O
</s>
<s>
Once	O
the	O
local	O
TTU	O
value	O
is	O
calculated	O
the	O
replacement	O
of	O
content	O
is	O
performed	O
on	O
a	O
subset	O
of	O
the	O
total	O
content	O
stored	O
in	O
cache	B-General_Concept
node	O
.	O
</s>
<s>
The	O
Least	O
Frequent	O
Recently	O
Used	O
(	O
LFRU	O
)	O
cache	B-General_Concept
replacement	O
scheme	O
combines	O
the	O
benefits	O
of	O
LFU	O
and	O
LRU	O
schemes	O
.	O
</s>
<s>
LFRU	O
is	O
suitable	O
for	O
'	O
in	O
network	O
 '	O
cache	B-General_Concept
applications	O
,	O
such	O
as	O
Information-centric	B-Protocol
networking	I-Protocol
(	O
ICN	O
)	O
,	O
Content	B-Operating_System
Delivery	I-Operating_System
Networks	I-Operating_System
(	O
CDNs	O
)	O
and	O
distributed	O
networks	O
in	O
general	O
.	O
</s>
<s>
In	O
LFRU	O
,	O
the	O
cache	B-General_Concept
is	O
divided	O
into	O
two	O
partitions	O
called	O
privileged	O
and	O
unprivileged	O
partitions	O
.	O
</s>
<s>
While	O
CPU	B-Device
caches	B-General_Concept
are	O
generally	O
managed	O
entirely	O
by	O
hardware	O
,	O
a	O
variety	O
of	O
software	O
manages	O
other	O
caches	B-General_Concept
.	O
</s>
<s>
The	O
page	B-General_Concept
cache	I-General_Concept
in	O
main	O
memory	O
,	O
which	O
is	O
an	O
example	O
of	O
disk	B-Device
cache	B-General_Concept
,	O
is	O
managed	O
by	O
the	O
operating	B-Operating_System
system	I-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
While	O
the	O
disk	B-Device
buffer	I-Device
,	O
which	O
is	O
an	O
integrated	O
part	O
of	O
the	O
hard	B-Device
disk	I-Device
drive	I-Device
or	O
solid	B-Device
state	I-Device
drive	I-Device
,	O
is	O
sometimes	O
misleadingly	O
referred	O
to	O
as	O
"	O
disk	B-Device
cache	B-General_Concept
"	O
,	O
its	O
main	O
functions	O
are	O
write	O
sequencing	O
and	O
read	O
prefetching	B-General_Concept
.	O
</s>
<s>
Repeated	O
cache	B-General_Concept
hits	O
are	O
relatively	O
rare	O
,	O
due	O
to	O
the	O
small	O
size	O
of	O
the	O
buffer	B-General_Concept
in	O
comparison	O
to	O
the	O
drive	O
's	O
capacity	O
.	O
</s>
<s>
However	O
,	O
high-end	O
disk	B-General_Concept
controllers	I-General_Concept
often	O
have	O
their	O
own	O
on-board	O
cache	B-General_Concept
of	O
the	O
hard	B-Device
disk	I-Device
drive	I-Device
's	O
data	B-General_Concept
blocks	I-General_Concept
.	O
</s>
<s>
Finally	O
,	O
a	O
fast	O
local	O
hard	B-Device
disk	I-Device
drive	I-Device
can	O
also	O
cache	B-General_Concept
information	O
held	O
on	O
even	O
slower	O
data	O
storage	O
devices	O
,	O
such	O
as	O
remote	O
servers	O
(	O
web	B-Protocol
cache	I-Protocol
)	O
or	O
local	O
tape	O
drives	O
or	O
optical	B-Device
jukeboxes	I-Device
;	O
such	O
a	O
scheme	O
is	O
the	O
main	O
concept	O
of	O
hierarchical	B-Application
storage	I-Application
management	I-Application
.	O
</s>
<s>
Also	O
,	O
fast	O
flash-based	O
solid-state	B-Device
drives	I-Device
(	O
SSDs	B-Device
)	O
can	O
be	O
used	O
as	O
caches	B-General_Concept
for	O
slower	O
rotational-media	O
hard	B-Device
disk	I-Device
drives	I-Device
,	O
working	O
together	O
as	O
hybrid	B-Device
drives	I-Device
or	O
solid-state	B-Device
hybrid	I-Device
drives	I-Device
(	O
SSHDs	B-Device
)	O
.	O
</s>
<s>
Web	B-Application
browsers	I-Application
and	O
web	B-Application
proxy	I-Application
servers	I-Application
employ	O
web	B-Protocol
caches	I-Protocol
to	O
store	O
previous	O
responses	O
from	O
web	B-Application
servers	I-Application
,	O
such	O
as	O
web	O
pages	O
and	O
images	O
.	O
</s>
<s>
Web	B-Protocol
caches	I-Protocol
reduce	O
the	O
amount	O
of	O
information	O
that	O
needs	O
to	O
be	O
transmitted	O
across	O
the	O
network	O
,	O
as	O
information	O
previously	O
stored	O
in	O
the	O
cache	B-General_Concept
can	O
often	O
be	O
re-used	O
.	O
</s>
<s>
This	O
reduces	O
bandwidth	O
and	O
processing	O
requirements	O
of	O
the	O
web	B-Application
server	I-Application
,	O
and	O
helps	O
to	O
improve	O
responsiveness	B-Application
for	O
users	O
of	O
the	O
web	O
.	O
</s>
<s>
Web	B-Application
browsers	I-Application
employ	O
a	O
built-in	O
web	B-Protocol
cache	I-Protocol
,	O
but	O
some	O
Internet	O
service	O
providers	O
(	O
ISPs	O
)	O
or	O
organizations	O
also	O
use	O
a	O
caching	B-General_Concept
proxy	B-Application
server	I-Application
,	O
which	O
is	O
a	O
web	B-Protocol
cache	I-Protocol
that	O
is	O
shared	O
among	O
all	O
users	O
of	O
that	O
network	O
.	O
</s>
<s>
Another	O
form	O
of	O
cache	B-General_Concept
is	O
P2P	B-Protocol
caching	I-Protocol
,	O
where	O
the	O
files	O
most	O
sought	O
for	O
by	O
peer-to-peer	O
applications	O
are	O
stored	O
in	O
an	O
ISP	O
cache	B-General_Concept
to	O
accelerate	O
P2P	O
transfers	O
.	O
</s>
<s>
A	O
cache	B-General_Concept
can	O
store	O
data	O
that	O
is	O
computed	O
on	O
demand	O
rather	O
than	O
retrieved	O
from	O
a	O
backing	B-General_Concept
store	I-General_Concept
.	O
</s>
<s>
It	O
is	O
related	O
to	O
the	O
dynamic	B-Algorithm
programming	I-Algorithm
algorithm	O
design	O
methodology	O
,	O
which	O
can	O
also	O
be	O
thought	O
of	O
as	O
a	O
means	O
of	O
caching	B-General_Concept
.	O
</s>
<s>
A	O
content	B-Operating_System
delivery	I-Operating_System
network	I-Operating_System
(	O
CDN	O
)	O
is	O
a	O
network	O
of	O
distributed	O
servers	O
that	O
deliver	O
pages	O
and	O
other	O
Web	O
content	O
to	O
a	O
user	O
,	O
based	O
on	O
the	O
geographic	O
locations	O
of	O
the	O
user	O
,	O
the	O
origin	O
of	O
the	O
web	O
page	O
and	O
the	O
content	O
delivery	O
server	O
.	O
</s>
<s>
When	O
a	O
user	O
requests	O
a	O
piece	O
of	O
content	O
,	O
the	O
CDN	O
will	O
check	O
to	O
see	O
if	O
it	O
has	O
a	O
copy	O
of	O
the	O
content	O
in	O
its	O
cache	B-General_Concept
.	O
</s>
<s>
If	O
it	O
does	O
,	O
the	O
CDN	O
will	O
deliver	O
the	O
content	O
to	O
the	O
user	O
from	O
the	O
cache	B-General_Concept
.	O
</s>
<s>
A	O
cloud	O
storage	O
gateway	O
,	O
also	O
known	O
as	O
an	O
edge	O
filer	O
,	O
is	O
a	O
hybrid	B-General_Concept
cloud	I-General_Concept
storage	I-General_Concept
device	O
that	O
connects	O
a	O
local	O
network	O
to	O
one	O
or	O
more	O
cloud	B-Application
storage	I-Application
services	I-Application
,	O
typically	O
object	B-Application
storage	I-Application
services	O
such	O
as	O
Amazon	B-General_Concept
S3	I-General_Concept
.	O
</s>
<s>
It	O
provides	O
a	O
cache	B-General_Concept
for	O
frequently	O
accessed	O
data	O
,	O
providing	O
high	O
speed	O
local	O
access	O
to	O
frequently	O
accessed	O
data	O
in	O
the	O
cloud	B-Application
storage	I-Application
service	I-Application
.	O
</s>
<s>
Cloud	O
storage	O
gateways	O
also	O
provide	O
additional	O
benefits	O
such	O
as	O
accessing	O
cloud	O
object	B-Application
storage	I-Application
through	O
traditional	O
file	O
serving	O
protocols	O
as	O
well	O
as	O
continued	O
access	O
to	O
cached	O
data	O
during	O
connectivity	O
outages	O
.	O
</s>
<s>
The	O
BIND	O
DNS	B-Protocol
daemon	O
caches	B-General_Concept
a	O
mapping	O
of	O
domain	O
names	O
to	O
IP	B-Protocol
addresses	I-Protocol
,	O
as	O
does	O
a	O
resolver	O
library	O
.	O
</s>
<s>
Write-through	O
operation	O
is	O
common	O
when	O
operating	O
over	O
unreliable	O
networks	O
(	O
like	O
an	O
Ethernet	O
LAN	O
)	O
,	O
because	O
of	O
the	O
enormous	O
complexity	O
of	O
the	O
coherency	B-General_Concept
protocol	I-General_Concept
required	O
between	O
multiple	O
write-back	O
caches	B-General_Concept
when	O
communication	O
is	O
unreliable	O
.	O
</s>
<s>
For	O
instance	O
,	O
web	O
page	B-General_Concept
caches	I-General_Concept
and	O
client-side	B-Operating_System
network	B-Protocol
file	I-Protocol
system	I-Protocol
caches	B-General_Concept
(	O
like	O
those	O
in	O
NFS	B-Protocol
or	O
SMB	B-Operating_System
)	O
are	O
typically	O
read-only	O
or	O
write-through	O
specifically	O
to	O
keep	O
the	O
network	O
protocol	O
simple	O
and	O
reliable	O
.	O
</s>
<s>
Search	B-Application
engines	I-Application
also	O
frequently	O
make	O
web	O
pages	O
they	O
have	O
indexed	O
available	O
from	O
their	O
cache	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
Google	B-Application
provides	O
a	O
"	O
Cached	O
"	O
link	O
next	O
to	O
each	O
search	O
result	O
.	O
</s>
<s>
This	O
can	O
prove	O
useful	O
when	O
web	O
pages	O
from	O
a	O
web	B-Application
server	I-Application
are	O
temporarily	O
or	O
permanently	O
inaccessible	O
.	O
</s>
<s>
Database	B-General_Concept
caching	I-General_Concept
can	O
substantially	O
improve	O
the	O
throughput	O
of	O
database	O
applications	O
,	O
for	O
example	O
in	O
the	O
processing	O
of	O
indexes	B-Data_Structure
,	O
data	B-Application
dictionaries	I-Application
,	O
and	O
frequently	O
used	O
subsets	O
of	O
data	O
.	O
</s>
<s>
A	O
distributed	B-Operating_System
cache	I-Operating_System
uses	O
networked	O
hosts	O
to	O
provide	O
scalability	O
,	O
reliability	O
and	O
performance	O
to	O
the	O
application	O
.	O
</s>
<s>
The	O
semantics	O
of	O
a	O
"	O
buffer	B-General_Concept
"	O
and	O
a	O
"	O
cache	B-General_Concept
"	O
are	O
not	O
totally	O
different	O
;	O
even	O
so	O
,	O
there	O
are	O
fundamental	O
differences	O
in	O
intent	O
between	O
the	O
process	O
of	O
caching	B-General_Concept
and	O
the	O
process	O
of	O
buffering	B-General_Concept
.	O
</s>
<s>
Fundamentally	O
,	O
caching	B-General_Concept
realizes	O
a	O
performance	O
increase	O
for	O
transfers	O
of	O
data	O
that	O
is	O
being	O
repeatedly	O
transferred	O
.	O
</s>
<s>
While	O
a	O
caching	B-General_Concept
system	O
may	O
realize	O
a	O
performance	O
increase	O
upon	O
the	O
initial	O
(	O
typically	O
write	O
)	O
transfer	O
of	O
a	O
data	O
item	O
,	O
this	O
performance	O
increase	O
is	O
due	O
to	O
buffering	B-General_Concept
occurring	O
within	O
the	O
caching	B-General_Concept
system	O
.	O
</s>
<s>
With	O
read	O
caches	B-General_Concept
,	O
a	O
data	O
item	O
must	O
have	O
been	O
fetched	O
from	O
its	O
residing	O
location	O
at	O
least	O
once	O
in	O
order	O
for	O
subsequent	O
reads	O
of	O
the	O
data	O
item	O
to	O
realize	O
a	O
performance	O
increase	O
by	O
virtue	O
of	O
being	O
able	O
to	O
be	O
fetched	O
from	O
the	O
cache	B-General_Concept
's	O
(	O
faster	O
)	O
intermediate	O
storage	O
rather	O
than	O
the	O
data	O
's	O
residing	O
location	O
.	O
</s>
<s>
With	O
write	O
caches	B-General_Concept
,	O
a	O
performance	O
increase	O
of	O
writing	O
a	O
data	O
item	O
may	O
be	O
realized	O
upon	O
the	O
first	O
write	O
of	O
the	O
data	O
item	O
by	O
virtue	O
of	O
the	O
data	O
item	O
immediately	O
being	O
stored	O
in	O
the	O
cache	B-General_Concept
's	O
intermediate	O
storage	O
,	O
deferring	O
the	O
transfer	O
of	O
the	O
data	O
item	O
to	O
its	O
residing	O
storage	O
at	O
a	O
later	O
stage	O
or	O
else	O
occurring	O
as	O
a	O
background	O
process	O
.	O
</s>
<s>
Contrary	O
to	O
strict	O
buffering	B-General_Concept
,	O
a	O
caching	B-General_Concept
process	O
must	O
adhere	O
to	O
a	O
(	O
potentially	O
distributed	O
)	O
cache	B-General_Concept
coherency	I-General_Concept
protocol	O
in	O
order	O
to	O
maintain	O
consistency	O
between	O
the	O
cache	B-General_Concept
's	O
intermediate	O
storage	O
and	O
the	O
location	O
where	O
the	O
data	O
resides	O
.	O
</s>
<s>
Buffering	B-General_Concept
,	O
on	O
the	O
other	O
hand	O
,	O
</s>
<s>
With	O
typical	O
caching	B-General_Concept
implementations	O
,	O
a	O
data	O
item	O
that	O
is	O
read	O
or	O
written	O
for	O
the	O
first	O
time	O
is	O
effectively	O
being	O
buffered	O
;	O
and	O
in	O
the	O
case	O
of	O
a	O
write	O
,	O
mostly	O
realizing	O
a	O
performance	O
increase	O
for	O
the	O
application	O
from	O
where	O
the	O
write	O
originated	O
.	O
</s>
<s>
Additionally	O
,	O
the	O
portion	O
of	O
a	O
caching	B-General_Concept
protocol	O
where	O
individual	O
writes	O
are	O
deferred	O
to	O
a	O
batch	O
of	O
writes	O
is	O
a	O
form	O
of	O
buffering	B-General_Concept
.	O
</s>
<s>
The	O
portion	O
of	O
a	O
caching	B-General_Concept
protocol	O
where	O
individual	O
reads	O
are	O
deferred	O
to	O
a	O
batch	O
of	O
reads	O
is	O
also	O
a	O
form	O
of	O
buffering	B-General_Concept
,	O
although	O
this	O
form	O
may	O
negatively	O
impact	O
the	O
performance	O
of	O
at	O
least	O
the	O
initial	O
reads	O
(	O
even	O
though	O
it	O
may	O
positively	O
impact	O
the	O
performance	O
of	O
the	O
sum	O
of	O
the	O
individual	O
reads	O
)	O
.	O
</s>
<s>
In	O
practice	O
,	O
caching	B-General_Concept
almost	O
always	O
involves	O
some	O
form	O
of	O
buffering	B-General_Concept
,	O
while	O
strict	O
buffering	B-General_Concept
does	O
not	O
involve	O
caching	B-General_Concept
.	O
</s>
<s>
A	O
buffer	B-General_Concept
is	O
a	O
temporary	O
memory	B-General_Concept
location	I-General_Concept
that	O
is	O
traditionally	O
used	O
because	O
CPU	B-Device
instructions	O
cannot	O
directly	O
address	O
data	O
stored	O
in	O
peripheral	O
devices	O
.	O
</s>
<s>
Additionally	O
,	O
such	O
a	O
buffer	B-General_Concept
may	O
be	O
feasible	O
when	O
a	O
large	O
block	B-General_Concept
of	O
data	O
is	O
assembled	O
or	O
disassembled	O
(	O
as	O
required	O
by	O
a	O
storage	O
device	O
)	O
,	O
or	O
when	O
data	O
may	O
be	O
delivered	O
in	O
a	O
different	O
order	O
than	O
that	O
in	O
which	O
it	O
is	O
produced	O
.	O
</s>
<s>
Also	O
,	O
a	O
whole	O
buffer	B-General_Concept
of	O
data	O
is	O
usually	O
transferred	O
sequentially	O
(	O
for	O
example	O
to	O
hard	B-Device
disk	I-Device
)	O
,	O
so	O
buffering	B-General_Concept
itself	O
sometimes	O
increases	O
transfer	O
performance	O
or	O
reduces	O
the	O
variation	O
or	O
jitter	O
of	O
the	O
transfer	O
's	O
latency	O
as	O
opposed	O
to	O
caching	B-General_Concept
where	O
the	O
intent	O
is	O
to	O
reduce	O
the	O
latency	O
.	O
</s>
<s>
These	O
benefits	O
are	O
present	O
even	O
if	O
the	O
buffered	O
data	O
are	O
written	O
to	O
the	O
buffer	B-General_Concept
once	O
and	O
read	O
from	O
the	O
buffer	B-General_Concept
once	O
.	O
</s>
<s>
A	O
cache	B-General_Concept
also	O
increases	O
transfer	O
performance	O
.	O
</s>
<s>
A	O
part	O
of	O
the	O
increase	O
similarly	O
comes	O
from	O
the	O
possibility	O
that	O
multiple	O
small	O
transfers	O
will	O
combine	O
into	O
one	O
large	O
block	B-General_Concept
.	O
</s>
<s>
But	O
the	O
main	O
performance-gain	O
occurs	O
because	O
there	O
is	O
a	O
good	O
chance	O
that	O
the	O
same	O
data	O
will	O
be	O
read	O
from	O
cache	B-General_Concept
multiple	O
times	O
,	O
or	O
that	O
written	O
data	O
will	O
soon	O
be	O
read	O
.	O
</s>
<s>
A	O
cache	B-General_Concept
's	O
sole	O
purpose	O
is	O
to	O
reduce	O
accesses	O
to	O
the	O
underlying	O
slower	O
storage	O
.	O
</s>
<s>
Cache	B-General_Concept
is	O
also	O
usually	O
an	O
abstraction	B-Architecture
layer	I-Architecture
that	O
is	O
designed	O
to	O
be	O
invisible	O
from	O
the	O
perspective	O
of	O
neighboring	O
layers	O
.	O
</s>
