Home

FIFOs

A FIFO, or first-in, first-out, is a method for organizing data so that the oldest item added is the first to be processed or removed. FIFOs are used in computing as a principle for queues, buffers, and intercomponent communication, where preserving insertion order is important.

In computer science, a FIFO is typically implemented as a queue data structure. It supports operations such

In hardware and digital design, a FIFO buffer decouples timing between producers and consumers. Hardware FIFOs

In operating systems and interprocess communication, a FIFO can refer to a named pipe in Unix-like systems.

Variants and considerations include circular buffers, lock-free queues for concurrent environments, and potential drawbacks such as

as
enqueue
(add
to
the
end),
dequeue
(remove
from
the
front),
and
peek
(inspect
the
front
element).
Elements
are
processed
in
the
exact
order
they
were
received.
Implementations
may
use
linked
lists
or
arrays;
fixed-capacity
versions
often
employ
circular
buffers.
Enqueue
and
dequeue
operations
are
usually
designed
to
be
constant
time,
with
memory
usage
proportional
to
the
number
of
stored
elements.
use
memory
with
separate
read
and
write
pointers
and
flags
indicating
full
or
empty
status.
They
are
common
in
data
paths
such
as
UARTs,
USB
controllers,
network
interfaces,
and
clock-domain
crossings,
where
smooth
data
transfer
between
sampling
rates
or
clocks
is
required.
Created
with
tools
such
as
mkfifo,
a
named
pipe
provides
a
unidirectional
channel
(or
two
channels
when
paired)
for
data
exchange
between
processes.
Access
is
controlled
by
permissions,
and
reads
or
writes
can
block
until
the
other
side
is
ready,
making
it
a
simple
synchronization
mechanism.
head-of-line
blocking
or
fixed
capacity
limits.
Overall,
FIFOs
offer
predictable
ordering
and
straightforward
semantics
across
software,
hardware,
and
IPC
contexts.