What is a File Descriptor, and how does the OS use the Open-File Table to manage file access across processes?

Last updated 5 July 2026

  • A file descriptor is a small integer indexing a per-process table (0, 1, 2 are stdin, stdout, stderr), whose entries point into a system-wide open-file table.

  • Each open-file table entry holds the current offset, access mode, and a pointer to the in-memory inode. Separate open() calls get separate entries with independent offsets.

  • After fork() or dup(), descriptors share one entry and thus one offset. Reference counts tell the OS when close() can release resources.

  • https://growthequityinterviewguide.com/firms/b-capital
  • https://www.interviewbit.com/sre-interview-questions/
  • https://medium.com/@avinashkumar808482/operating-system-interview-questions-2026-0db6b4674980
  • https://lmskkhsou.in/eservices/e-Resources/Resources/NEP%20Syllabus%202024/core/BCA_Syllabus.pdf
All Operating Systems interview questions