Show in graph
OS

Software → Operating Systems

File Descriptor

A small integer handle used by a process to refer to an open file, socket, pipe, or device.

Motivation

File descriptor solves the problem of giving processes a uniform handle to files, sockets, pipes, and devices.

Where it fits

File Descriptor belongs to operating systems and I/O.

Mental model

A process does not manipulate every resource directly; it uses small numeric handles managed by the OS.

Common mistakes

  • Thinking file descriptors are only for disk files.
  • Forgetting to close descriptors in long-running processes.

File Descriptor connects to process, pipe, socket, disk I/O, and virtual file system.