Category: 

What Is a File Control Block?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 24 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Snake charmers get snakes to “dance” because of the movement of their flute-like instruments, not their music.  more...

December 4 ,  1945 :  The United States Senate approved of US participation in the United Nations.  more...

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.

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.

Ad

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.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email