Home

Descriptorequivalent

Descriptor-equivalent describes a relation between two descriptors (such as file descriptors, handles, or similar resource identifiers) indicating that they reference the same underlying resource in a given system and are interchangeable for certain operations. The concept emphasizes the observable effect of using the descriptors rather than the identifiers themselves.

In practice, descriptor equivalence appears in operating systems that support descriptor duplication and sharing. In POSIX

The criteria for equivalence are context dependent. Commonly, two descriptors are equivalent if they reference the

Applications include resource management, optimization of descriptor usage, and correctness analysis in systems programming. Because descriptor

See also: file descriptor, handle, descriptor duplication, resource management, equivalence relation.

systems,
two
file
descriptors
are
considered
equivalent
if
they
refer
to
the
same
open
file
description;
they
share
the
same
file
offset
and
status
flags,
and
closing
one
descriptor
does
not
close
the
resource
until
the
last
descriptor
referring
to
it
is
closed.
Conversely,
descriptors
referring
to
different
resources
are
not
equivalent,
even
if
they
point
to
the
same
file
on
disk.
same
resource
and
offer
indistinguishable
behavior
for
a
given
sequence
of
operations,
such
as
read
or
write,
within
the
current
process
state.
Some
contexts
also
require
identical
access
modes
and
permissions.
Equivalence
may
be
partial
or
full:
partial
equivalence
might
ignore
minor
state
differences,
while
full
equivalence
requires
identical
effect
on
the
resource
and
its
lifecycle.
semantics
can
vary
across
platforms,
descriptor-equivalence
is
usually
defined
relative
to
a
specific
API,
system
call
behavior,
or
resource
type.