Mastering Unix File Descriptors and I/O Control Mechanisms

Understanding File Descriptors In Unix-like operating systems, every open file, device, or socket is represented by a file descriptor. This descriptor is a non-negative integer used by the kernel to track open files within a process. While a single file may have multiple descriptors associated with it across different processes or within the sa ...

Posted on Mon, 11 May 2026 10:57:38 +0000 by jeff2007XP

Non-Blocking IO and Multiplexing Mechanisms

Non-Blocking I/O The recv function can operate in a non-blocking manner by passing the MSG_DONTWAIT flag as its final argument, though this approach is often cumbersome for consistent behavior. A more persistent method involves specifying the O_NONBLOCK flag during the open system call. Alternatively, the fcntl function modifies the status flag ...

Posted on Sat, 09 May 2026 15:05:52 +0000 by supernova

Linux I/O Modes: Blocking and Non-Blocking Operations

Blocking and Non-Blocking I/O1. Fundamental ConceptsScenarios Causing BlockageReading from device or network files (e.g., terminal /dev/tty) often leads to blocking, unlike reading regular files which completes in a finite duration.Reading from a terminal without a newline character in the input buffer causes the read call to suspend the callin ...

Posted on Sat, 09 May 2026 02:50:50 +0000 by optiplex