<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayoub Lahmami</title>
    <description>The latest articles on DEV Community by Ayoub Lahmami (@ayoub_lahmami).</description>
    <link>https://dev.to/ayoub_lahmami</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3629560%2Fcb39b068-ee7f-41d2-ac73-4d3e518016db.jpeg</url>
      <title>DEV Community: Ayoub Lahmami</title>
      <link>https://dev.to/ayoub_lahmami</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayoub_lahmami"/>
    <language>en</language>
    <item>
      <title>🚀 File Descriptors in Linux — The Underrated Heroes of I/O</title>
      <dc:creator>Ayoub Lahmami</dc:creator>
      <pubDate>Thu, 27 Nov 2025 00:16:40 +0000</pubDate>
      <link>https://dev.to/ayoub_lahmami/file-descriptors-in-linux-the-underrated-heroes-of-io-5e0m</link>
      <guid>https://dev.to/ayoub_lahmami/file-descriptors-in-linux-the-underrated-heroes-of-io-5e0m</guid>
      <description>&lt;p&gt;Most programs you use or write rely on File Descriptors (FDs) — even if you never think about them.&lt;br&gt;
If a process reads input, writes output, opens a file, or sends data over a socket, it’s using FDs behind the scenes.&lt;/p&gt;

&lt;p&gt;🔍 What Exactly Is an FD?&lt;/p&gt;

&lt;p&gt;A File Descriptor is simply a small integer the kernel gives to a process.&lt;br&gt;
It’s not the file itself — it’s a handle the kernel uses to manage any I/O resource.&lt;/p&gt;

&lt;p&gt;💡 Why They’re So Important&lt;/p&gt;

&lt;p&gt;Unified interface: files, pipes, sockets — all use open(), read(), write(), close().&lt;/p&gt;

&lt;p&gt;Process isolation: each process has its own FD table.&lt;/p&gt;

&lt;p&gt;State tracking: the kernel keeps the read/write offset and mode for each FD, even if multiple processes open the same file.&lt;/p&gt;

&lt;p&gt;⚙️ Under the Hood&lt;/p&gt;

&lt;p&gt;Linux manages I/O through three layers:&lt;/p&gt;

&lt;p&gt;Per-Process FD Table — what your program sees (0, 1, 2, ...).&lt;/p&gt;

&lt;p&gt;Open File Table — stores the state of each open resource.&lt;/p&gt;

&lt;p&gt;Inode Table — contains the actual file metadata on disk.&lt;/p&gt;

&lt;p&gt;This architecture is a big reason why Unix-like systems are so flexible, consistent, and developer-friendly.&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
  </channel>
</rss>
