Cisco CloudCenter: Get the Hybrid IT Advantage

File Descriptor (FD)

Definition - What does File Descriptor (FD) mean?

For most operating systems, a file descriptor (FD) is a small non-negative integer that helps in identifying an open file within a process while using input/output resources like network sockets or pipes. In a way, it can be considered as an index table of open files. When there are read, write or closing file operations, one of the input parameters considered is the file descriptor. File descriptors form an important component of POSIX application programming interface and provide a primitive, low-level interface to input or output operations.

Techopedia explains File Descriptor (FD)

A kernel creates a file descriptor whenever it encounters an open call. In many ways, the gateway into the kernel’s abstractions of underlying hardware can be considered as file descriptors. In the Unix operating system, the standard input is represented by file descriptor 0, the standard output is represented by file descriptor 1 and standard error file is represented by file descriptor 2. In other words, corresponding to the three standard streams, each UNIX process would have three standard file descriptors. Both streams and file descriptors can represent a device connection, however for controlling specific devices, file descriptors need to be used. In most operating systems such as UNIX, file descriptors are represented as objects of type “int.” The file descriptor is used by the kernel as an index in the file description table in order to determine which process originally opened a specific file and then allow performing the requested operations on the opened device or file.

From an application programming perspective, file descriptors need to be used if there are any input or output operations in special modes, including non-blocking inputs. Unlike streams which provide high functions for controlling, a file descriptor interface provides only simple functions for the transfer of character blocks. Low-level operations can be performed directly on the file descriptor.

Share this:

Connect with us

Email Newsletter

Join thousands of others with our weekly newsletter

The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.