File Control Block

FCB ( File Control Block) file control block

A File Control Block is a temporary data structure to manage open files with certain computer operating systems. The operating system stores and manages in a FCB all the information that it requires a specific file opened for its use. By the FCB is normally in the memory of the application program and not in the operating system 's own memory, a program can hold as many files simultaneously opened, as it wants, provided it allocates enough memory for FCBs required for this purpose. In this flexible memory use - a program that requires fewer files, less space for FCBs must indeed so spend and can use memory instead otherwise - is the main advantage of FCBs. An important disadvantage of them is, however, that the application program, the size of the FCB must be known, since it has to provide it the necessary memory itself; Therefore, this quantity can in later operating system versions not be increased - take about additional required internally by the operating system information - without breaking compatibility with older application programs will be destroyed.

CP / M used exclusively for FCB file addressing. MS- DOS uses a different file system (FAT ), but used in versions 1.x still the traditional FCBs for file access, even to third-party CP / M- based software to allow a quick and easy porting their programs.

MS- DOS version 2.0 and newer MS- DOS - compatible operating systems came upon the size problem described above, because there is no space in the FCB place to store information that were necessary for use of the newly introduced sub-directories. Make FCBs only for compatibility reasons available, and they use file handles as a standard method for file access, where actual administrative data are managed to a file now internally in a specially reserved operating system memory area.

The FCBs are in these operating systems only dummies that include a reference to the actual, managed in the operating system 's own memory file information. The number of such dummies is limited, usually to 4; to increase, you can specify the FCBS = parameter in the CONFIG.SYS file at boot time, but each possible FCB dummy a certain amount of memory is reserved permanently, who is not otherwise used. This parameter exists even in Windows 2000 or Windows XP (32- bit version ), but only when they use certain DOS programs such as WordStar important.

Structure of an FCB with the CP / M

An FCB consists of a sequence of 33 or 36 bytes with drive, file name and other information.

CP / M provides a default FCB at address 005CH prepared exactly one file can be opened with the. More files manages the application of additional FCBs in its own address space. FCBs are placed in the area on the storage medium is copied into memory when opening a file and written back when closing.

  • File Management
334054
de