<s>
Data	B-General_Concept
consistency	I-General_Concept
refers	O
to	O
whether	O
the	O
same	O
data	O
kept	O
at	O
different	O
places	O
do	O
or	O
do	O
not	O
match	O
.	O
</s>
<s>
Point-in-time	B-General_Concept
consistency	I-General_Concept
is	O
an	O
important	O
property	O
of	O
backup	B-Protocol
files	O
and	O
a	O
critical	O
objective	O
of	O
software	O
that	O
creates	O
backups	B-Protocol
.	O
</s>
<s>
As	O
a	O
relevant	O
backup	B-Protocol
example	O
,	O
consider	O
a	O
website	O
with	O
a	O
database	O
such	O
as	O
the	O
online	O
encyclopedia	O
Wikipedia	O
,	O
which	O
needs	O
to	O
be	O
operational	O
around	O
the	O
clock	O
,	O
but	O
also	O
must	O
be	O
backed	O
up	O
with	O
regularity	O
to	O
protect	O
against	O
disaster	O
.	O
</s>
<s>
Portions	O
of	O
Wikipedia	O
are	O
constantly	O
being	O
updated	O
every	O
minute	O
of	O
every	O
day	O
,	O
meanwhile	O
,	O
Wikipedia	O
's	O
database	O
is	O
stored	O
on	O
servers	O
in	O
the	O
form	O
of	O
one	O
or	O
several	O
very	O
large	O
files	O
which	O
require	O
minutes	O
or	O
hours	O
to	O
back	B-Protocol
up	I-Protocol
.	O
</s>
<s>
For	O
example	O
,	O
some	O
structures	O
are	O
indexes	B-Data_Structure
which	O
permit	O
the	O
database	O
subsystem	O
to	O
quickly	O
find	O
search	O
results	O
.	O
</s>
<s>
The	O
importance	O
of	O
point-in-time	B-General_Concept
consistency	I-General_Concept
can	O
be	O
illustrated	O
with	O
what	O
would	O
happen	O
if	O
a	O
backup	B-Protocol
were	O
made	O
without	O
it	O
.	O
</s>
<s>
Consider	O
a	O
scenario	O
where	O
an	O
editor	O
comes	O
and	O
creates	O
a	O
new	O
article	O
at	O
the	O
same	O
time	O
a	O
backup	B-Protocol
is	O
being	O
performed	O
,	O
which	O
is	O
being	O
made	O
as	O
a	O
simple	O
"	O
file	B-Application
copy	I-Application
"	O
which	O
copies	O
from	O
the	O
beginning	O
to	O
the	O
end	O
of	O
the	O
large	O
file(s )	O
and	O
does	O
n't	O
consider	O
data	B-General_Concept
consistency	I-General_Concept
-	O
and	O
at	O
the	O
time	O
of	O
the	O
article	O
edit	O
,	O
it	O
is	O
50%	O
complete	O
.	O
</s>
<s>
Because	O
the	O
backup	B-Protocol
is	O
already	O
halfway	O
done	O
and	O
the	O
index	O
already	O
copied	O
,	O
the	O
backup	B-Protocol
will	O
be	O
written	O
with	O
the	O
article	O
data	O
present	O
,	O
but	O
with	O
the	O
index	O
reference	O
missing	O
.	O
</s>
<s>
A	O
sequential	O
"	O
copy	O
"	O
backup	B-Protocol
would	O
literally	O
contain	O
so	O
many	O
small	O
corruptions	O
that	O
the	O
backup	B-Protocol
would	O
be	O
completely	O
unusable	O
without	O
a	O
lengthy	O
repair	O
process	O
which	O
could	O
provide	O
no	O
guarantee	O
as	O
to	O
the	O
completeness	O
of	O
what	O
has	O
been	O
recovered	O
.	O
</s>
<s>
A	O
backup	B-Protocol
process	O
which	O
properly	O
accounts	O
for	O
data	B-General_Concept
consistency	I-General_Concept
ensures	O
that	O
the	O
backup	B-Protocol
is	O
a	O
snapshot	O
of	O
how	O
the	O
entire	O
database	O
looked	O
at	O
a	O
single	O
moment	O
.	O
</s>
<s>
In	O
the	O
given	O
Wikipedia	O
example	O
,	O
it	O
would	O
ensure	O
that	O
the	O
backup	B-Protocol
was	O
written	O
without	O
the	O
added	O
article	O
at	O
the	O
75%	O
mark	O
,	O
so	O
that	O
the	O
article	O
data	O
would	O
be	O
consistent	O
with	O
the	O
index	O
data	O
previously	O
written	O
.	O
</s>
<s>
Point-in-time	B-General_Concept
consistency	I-General_Concept
is	O
also	O
relevant	O
to	O
computer	O
disk	O
subsystems	O
.	O
</s>
<s>
Specifically	O
,	O
operating	B-General_Concept
systems	I-General_Concept
and	O
file	B-Application
systems	I-Application
are	O
designed	O
with	O
the	O
expectation	O
that	O
the	O
computer	O
system	O
they	O
are	O
running	O
on	O
could	O
lose	O
power	O
,	O
crash	O
,	O
fail	O
,	O
or	O
otherwise	O
cease	O
operating	O
at	O
any	O
time	O
.	O
</s>
<s>
Operating	B-General_Concept
systems	I-General_Concept
and	O
file	B-Application
systems	I-Application
do	O
this	O
by	O
ensuring	O
that	O
data	O
is	O
written	O
to	O
a	O
hard	O
disk	O
in	O
a	O
certain	O
order	O
,	O
and	O
rely	O
on	O
that	O
in	O
order	O
to	O
detect	O
and	O
recover	O
from	O
unexpected	O
shutdowns	B-Device
.	O
</s>
<s>
Data	B-General_Concept
consistency	I-General_Concept
concerns	O
arise	O
when	O
write	O
caching	O
changes	O
the	O
sequence	O
in	O
which	O
writes	O
are	O
carried	O
out	O
,	O
because	O
it	O
there	O
exists	O
the	O
possibility	O
of	O
an	O
unexpected	O
shutdown	B-Device
that	O
violates	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
expectation	O
that	O
all	O
writes	O
will	O
be	O
committed	O
sequentially	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
order	O
to	O
save	O
a	O
typical	O
document	O
or	O
picture	O
file	O
,	O
an	O
operating	B-General_Concept
system	I-General_Concept
might	O
write	O
the	O
following	O
records	O
to	O
a	O
disk	O
in	O
the	O
following	O
order	O
:	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
relies	O
on	O
the	O
assumption	O
that	O
if	O
it	O
sees	O
item	O
#1	O
is	O
present	O
(	O
saying	O
the	O
file	O
is	O
about	O
to	O
be	O
saved	O
)	O
,	O
but	O
that	O
item	O
#4	O
is	O
missing	O
(	O
confirming	O
success	O
)	O
,	O
that	O
the	O
save	O
operation	O
was	O
unsuccessful	O
and	O
so	O
it	O
should	O
undo	O
any	O
incomplete	O
steps	O
already	O
taken	O
to	O
save	O
it	O
(	O
e.g.	O
</s>
<s>
When	O
the	O
computer	O
is	O
turned	O
back	O
on	O
,	O
the	O
file	B-Application
system	I-Application
would	O
then	O
show	O
it	O
contains	O
a	O
file	O
named	O
XYZ	O
which	O
is	O
located	O
in	O
sector	O
123	O
,	O
but	O
this	O
sector	O
really	O
does	O
not	O
contain	O
the	O
file	O
.	O
</s>
<s>
Further	O
,	O
the	O
file	B-Application
system	I-Application
's	O
free	O
space	O
map	O
will	O
not	O
contain	O
any	O
entry	O
showing	O
that	O
sector	O
123	O
is	O
occupied	O
,	O
so	O
later	O
,	O
it	O
will	O
likely	O
assign	O
that	O
sector	O
to	O
the	O
next	O
file	O
to	O
be	O
saved	O
,	O
believing	O
it	O
is	O
available	O
.	O
</s>
<s>
The	O
file	B-Application
system	I-Application
will	O
then	O
have	O
two	O
files	O
both	O
unexpectedly	O
claiming	O
the	O
same	O
sector	O
(	O
known	O
as	O
a	O
cross-linked	O
file	O
)	O
.	O
</s>
<s>
A	O
disk	O
caching	O
subsystem	O
that	O
ensures	O
point-in-time	B-General_Concept
consistency	I-General_Concept
guarantees	O
that	O
in	O
the	O
event	O
of	O
an	O
unexpected	O
shutdown	B-Device
,	O
the	O
four	O
elements	O
would	O
be	O
written	O
one	O
of	O
only	O
five	O
possible	O
ways	O
:	O
completely	O
(	O
1-2-3-4	O
)	O
,	O
partially	O
(	O
1	O
,	O
1-2	O
,	O
1-2-3	O
)	O
,	O
or	O
not	O
at	O
all	O
.	O
</s>
<s>
High-end	O
hardware	O
disk	B-General_Concept
controllers	I-General_Concept
of	O
the	O
type	O
found	O
in	O
servers	O
include	O
a	O
small	O
battery	O
back-up	B-Protocol
unit	O
on	O
their	O
cache	O
memory	O
so	O
that	O
they	O
may	O
offer	O
the	O
performance	O
gains	O
of	O
write	O
caching	O
while	O
mitigating	O
the	O
risk	O
of	O
unintended	O
shutdowns	B-Device
.	O
</s>
<s>
The	O
battery	O
back-up	B-Protocol
unit	O
keeps	O
the	O
memory	O
powered	O
even	O
during	O
a	O
shutdown	B-Device
so	O
that	O
when	O
the	O
computer	O
is	O
powered	O
back	B-Protocol
up	I-Protocol
,	O
it	O
can	O
quickly	O
complete	O
any	O
writes	O
it	O
has	O
previously	O
committed	O
.	O
</s>
<s>
With	O
such	O
a	O
controller	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
may	O
request	O
four	O
writes	O
(	O
1-2-3-4	O
)	O
in	O
that	O
order	O
,	O
but	O
the	O
controller	O
may	O
decide	O
the	O
quickest	O
way	O
to	O
write	O
them	O
is	O
4-3-1-2	O
.	O
</s>
<s>
The	O
controller	O
essentially	O
lies	O
to	O
the	O
operating	B-General_Concept
system	I-General_Concept
and	O
reports	O
that	O
the	O
writes	O
have	O
been	O
completed	O
in	O
order	O
(	O
a	O
lie	O
that	O
improves	O
performance	O
at	O
the	O
expense	O
of	O
data	O
corruption	O
if	O
power	O
is	O
lost	O
)	O
,	O
and	O
the	O
battery	O
backup	B-Protocol
hedges	O
against	O
the	O
risk	O
of	O
data	O
corruption	O
by	O
giving	O
the	O
controller	O
a	O
way	O
to	O
silently	O
fix	O
any	O
and	O
all	O
damage	O
that	O
could	O
occur	O
as	O
a	O
result	O
.	O
</s>
<s>
If	O
the	O
power	O
gets	O
shut	B-Device
off	I-Device
after	O
element	O
4	O
has	O
been	O
written	O
,	O
the	O
battery	O
backed	O
memory	O
contains	O
the	O
record	O
of	O
commitment	O
for	O
the	O
other	O
three	O
items	O
and	O
ensures	O
that	O
they	O
are	O
written	O
(	O
"	O
flushed	O
"	O
)	O
to	O
the	O
disk	O
at	O
the	O
next	O
available	O
opportunity	O
.	O
</s>
<s>
Consistency	B-General_Concept
(	O
database	O
systems	O
)	O
in	O
the	O
realm	O
of	O
Distributed	B-Operating_System
database	I-Operating_System
systems	O
refers	O
to	O
the	O
property	O
of	O
many	O
ACID	O
databases	O
to	O
ensure	O
that	O
the	O
results	O
of	O
a	O
Database	B-General_Concept
transaction	I-General_Concept
are	O
visible	O
to	O
all	O
nodes	O
simultaneously	O
.	O
</s>
<s>
A	O
good	O
example	O
of	O
the	O
importance	O
of	O
transaction	O
consistency	B-General_Concept
is	O
a	O
database	O
that	O
handles	O
the	O
transfer	O
of	O
money	O
.	O
</s>
<s>
If	O
the	O
system	O
crashes	O
or	O
shuts	O
down	O
when	O
one	O
operation	O
has	O
completed	O
but	O
the	O
other	O
has	O
not	O
,	O
and	O
there	O
is	O
nothing	O
in	O
place	O
to	O
correct	O
this	O
,	O
the	O
system	O
can	O
be	O
said	O
to	O
lack	O
transaction	O
consistency	B-General_Concept
.	O
</s>
<s>
Transaction	O
consistency	B-General_Concept
ensures	O
just	O
that	O
-	O
that	O
a	O
system	O
is	O
programmed	O
to	O
be	O
able	O
to	O
detect	O
incomplete	O
transactions	O
when	O
powered	O
on	O
,	O
and	O
undo	O
(	O
or	O
"	O
roll	O
back	O
"	O
)	O
the	O
portion	O
of	O
any	O
incomplete	O
transactions	O
that	O
are	O
found	O
.	O
</s>
<s>
Application	O
consistency	B-General_Concept
,	O
similar	O
to	O
transaction	O
consistency	B-General_Concept
,	O
is	O
applied	O
on	O
a	O
grander	O
scale	O
.	O
</s>
<s>
Application	O
consistency	B-General_Concept
is	O
the	O
state	O
in	O
which	O
all	O
related	O
files	O
and	O
databases	O
are	O
synchronized	O
representing	O
the	O
true	O
status	O
of	O
the	O
application	O
.	O
</s>
