<s>
Free-space	B-Application
bitmaps	I-Application
are	O
one	O
method	O
used	O
to	O
track	O
allocated	O
sectors	B-Application
by	O
some	O
file	B-Application
systems	I-Application
.	O
</s>
<s>
While	O
the	O
most	O
simplistic	O
design	O
is	O
highly	O
inefficient	O
,	O
advanced	O
or	O
hybrid	O
implementations	O
of	O
free-space	B-Application
bitmaps	I-Application
are	O
used	O
by	O
some	O
modern	O
file	B-Application
systems	I-Application
.	O
</s>
<s>
The	O
simplest	O
form	O
of	O
free-space	B-Application
bitmap	I-Application
is	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
,	O
i.e.	O
</s>
<s>
For	O
explanatory	O
purposes	O
,	O
we	O
will	O
use	O
a	O
4GiB	O
hard	B-Device
drive	I-Device
with	O
4096-byte	O
sectors	B-Application
and	O
assume	O
that	O
the	O
bitmap	O
itself	O
is	O
stored	O
elsewhere	O
.	O
</s>
<s>
When	O
the	O
operating	B-General_Concept
system	I-General_Concept
(	O
OS	O
)	O
needs	O
to	O
write	O
a	O
file	O
,	O
it	O
will	O
scan	O
the	O
bitmap	O
until	O
it	O
finds	O
enough	O
free	O
locations	O
to	O
fit	O
the	O
file	O
.	O
</s>
<s>
If	O
a	O
12KiB	O
file	O
were	O
stored	O
on	O
the	O
example	O
drive	O
,	O
three	O
zero	O
bits	O
would	O
be	O
found	O
,	O
changed	O
to	O
ones	O
,	O
and	O
the	O
data	O
would	O
be	O
written	O
across	O
the	O
three	O
sectors	B-Application
represented	O
by	O
those	O
bits	O
.	O
</s>
<s>
A	O
2TB	O
drive	O
could	O
be	O
fully	O
represented	O
with	O
a	O
mere	O
64MB	O
bitmap	O
(	O
for	O
4096-byte	O
sectors	B-Application
)	O
.	O
</s>
<s>
If	O
the	O
bitmap	O
is	O
larger	O
than	O
available	O
memory	B-Architecture
,	O
performance	O
drops	O
precipitously	O
on	O
all	O
operations	O
.	O
</s>
<s>
Fragmentation	B-Application
:	O
If	O
free	O
sectors	B-Application
are	O
taken	O
as	O
they	O
are	O
found	O
,	O
drives	O
with	O
frequent	O
file	O
creation	O
and	O
deletion	O
will	O
rapidly	O
become	O
fragmented	O
.	O
</s>
<s>
Fragmented	O
data	O
also	O
slows	O
down	O
reading	O
speeds	O
on	O
mechanical	O
hard	B-Device
drives	I-Device
due	O
to	O
seeking	O
latency	O
of	O
the	O
magnetic	O
head	O
,	O
though	O
this	O
is	O
not	O
an	O
issue	O
on	O
flash	B-Device
memory	I-Device
.	O
</s>
<s>
To	O
address	O
this	O
,	O
real-world	O
implementations	O
of	O
free-space	B-Application
bitmaps	I-Application
will	O
find	O
ways	O
to	O
centralize	O
information	O
on	O
free	O
space	O
.	O
</s>
<s>
A	O
separate	O
array	O
then	O
stores	O
the	O
number	O
of	O
free	O
sectors	B-Application
in	O
each	O
chunk	O
,	O
so	O
chunks	O
with	O
insufficient	O
space	O
can	O
be	O
easily	O
skipped	O
over	O
,	O
and	O
the	O
total	O
amount	O
of	O
free	O
space	O
is	O
easier	O
to	O
compute	O
.	O
</s>
<s>
Finding	O
free	O
space	O
now	O
entails	O
searching	O
the	O
summary	O
array	O
first	O
,	O
then	O
searching	O
the	O
associated	O
bitmap	O
chunk	O
for	O
the	O
exact	O
sectors	B-Application
available	O
.	O
</s>
<s>
If	O
the	O
combined	O
size	O
of	O
the	O
summary	O
array	O
and	O
bitmap	O
is	O
greater	O
than	O
can	O
readily	O
be	O
stored	O
in	O
memory	B-Architecture
,	O
and	O
a	O
large	O
number	O
of	O
files	O
with	O
scattered	O
sectors	B-Application
are	O
freed	O
,	O
an	O
enormous	O
amount	O
of	O
disk	O
access	O
is	O
necessary	O
to	O
find	O
all	O
the	O
sectors	B-Application
,	O
decrement	O
the	O
summary	O
counter	O
and	O
flip	O
the	O
bits	O
back	O
to	O
zero	O
.	O
</s>
