Other meanings of File control block
Computing
A file control block (FCB) is a data structure used by an operating system to store metadata about an open file, including its name, location on disk, current read/write position, and access permissions. It serves as the kernel's internal representation of a file during input/output operations, bridging the gap between user-level file descriptors and the physical storage layout. The FCB is a fundamental concept in file system design, appearing in various forms across different operating systems, from early mainframe systems to modern Unix-like and Windows platforms.
A file control block is a per-file data structure maintained by the operating system to manage an open file instance. It typically contains the file's name, device identifier, current file position, access mode, and pointers to disk blocks or inodes. The FCB is created when a file is opened and updated as the file is read or written, ensuring that each process has a consistent view of the file's state.1
In Unix-like systems, the FCB is conceptually split into the inode (which stores persistent metadata) and the file table entry (which holds dynamic state like the offset). In contrast, Windows NT uses a more unified structure called the File Object, which combines both aspects. The FCB is essential for enforcing access control and coordinating concurrent access, as it holds locks and permission flags.2
The term 'file control block' gained prominence with Digital Research's CP/M operating system, where it was a user-visible structure used for file operations via the BDOS interface. CP/M's FCB was a 36-byte structure containing fields for drive number, filename, extension, and extent information, and it was manipulated directly by application programs.
MS-DOS inherited this design, providing FCB-based file functions (INT 21h functions 0Fh–17h) for compatibility, though they were soon overshadowed by the more robust handle-based API. Early mainframe systems, such as IBM's OS/360, also used similar control blocks (e.g., the Data Control Block) to manage dataset I/O, reflecting the universal need for such structures.
In modern operating systems, the FCB has evolved into more abstract structures. Linux uses a combination of the inode, file structure, and dentry to represent an open file, with the file structure containing the current offset and flags. Windows NT uses the File Object, which is part of the object manager and includes a pointer to the file system's control block.3
Network file systems like NFS and SMB implement their own FCB-like structures to manage remote file state, often caching metadata locally to reduce network traffic. The concept also extends to database systems, where a similar structure, sometimes called a 'file descriptor' or 'file handle', is used to track open tables and indexes.4
One overlooked detail is that in CP/M, the FCB was not just an internal structure but a user-visible data area that programmers had to initialize manually, including setting the drive code and filename fields. This exposed the FCB to bugs, such as forgetting to clear the extent field, which could cause data corruption.
Another niche fact is that MS-DOS's FCB-based functions were notoriously limited: they could not handle subdirectories or long filenames, and they required the current directory to be set correctly. This led to their deprecation in favor of handle-based functions, but they remained for backward compatibility until Windows 9x.
In some early systems, the FCB was stored in memory adjacent to the file's data buffers, allowing direct manipulation by device drivers, which could lead to security vulnerabilities if not properly protected.5
The file control block remains a foundational concept in operating system design, though its implementation has evolved to meet the demands of modern computing.
Help improve the encyclopedia. Reports go straight to the site manager.