File Control Block: Difference between revisions

Content deleted Content added
Added {{Technical}} tag
mNo edit summary
 
Line 6:
A '''File Control Block''' ('''FCB''') is a file system structure in which the state of an open [[Computer file|file]] is maintained. A FCB is managed by the operating system, but it resides in the memory of the program that uses the file, not in operating system memory. This allows a process to have as many files open at one time as it wants, provided it can spare enough memory for an FCB per file.
 
The FCB originates from [[CP/M]] and is also present in most variants of [[DOS]], though only as a backwardsbackward compatibility measure in [[MS-DOS]] versions 2.0 and later. A full FCB is 36 bytes long; in early versions of CP/M, it was 33 bytes. This fixed size, which could not be increased without breaking application compatibility, led to the FCB's eventual demise as the standard method of accessing files.
 
The meanings of several of the fields in the FCB differ between CP/M and DOS, and also depending on what operation is being performed. The following fields have consistent meanings:<ref name="stanislavs"/>