What Is a File Control Block?

Please wait 0 seconds...
Scroll Down and click on Go to Link
Congrats! Link is Generated

A file control block (FCB), also called a file descriptor, is a type of data structure that is temporarily allocated by a computer operating system to maintain the status of a data file that is being created or otherwise manipulated. In most instances, a file control block is used to store basic information about a file, such as its name, extension and location on a logical drive, as well as dynamic information such as the current address within the file that is being read. Originally, a file control block was a very well-defined structure under certain operating systems, but it since has become a more generic term for the structure used to track information about an actively handled file.

A file control block stores basic information about a computer program that is being used.
A file control block stores basic information about a computer program that is being used.

One important purpose of a file control block is to help the file system keep track of what state the file is in to prevent different operations from attempting to modify the file in conflicting ways, such as reading from an area of the file that is currently being written to. The structure not only is used for data files, but also can be used to track information about directories, although the data structure usually is shortened to remove unnecessary fields, because a directory cannot contain data.

Two operating systems, specifically the Microsoft® Disk Operating System (MS-DOS) and the Control Program for Microprocessors (CP/M), were the first operating systems to use a block scheme to manage files. These systems used very similar structures to help manage files that were being accessed. As other operating systems and file systems were developed, the concept of a block remained, but the implementation changed and the data structure varied greatly from one system to the next. Most computer operating systems in use in 2011 use some form of a file control block, especially when using custom file systems for removable hardware, although the data structure that is employed is not compatible with earlier versions without emulation and generally is larger and hidden from most high-level programming applications.

Broadly, a file control block contains information that can be changed during the use of a file by the operating system. Aside from the name and location, memory pointers to different points within the file itself are maintained. This allows sequential reading and writing, as well as random access reading and writing when paired with a variable in the FCB that stores the size of a random access record. File permissions, such as read-only or executable status, also are tracked. The use of a FCB also provides a mechanism to prevent two or more processes from operating on the same file in an unpredictable way, such as attempting to append information to the end of a file while that same file is being copied to another location.

Post a Comment

Read also:
Flash Sale! Do Shopify customization or bug fixing. Get It Now
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using AdBlock Extension in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your AdBlock Settings.
Site is Blocked
Sorry! This site is not available in your country.