Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
File Control Block
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== In CP/M, [[86-DOS]] and [[PC DOS]] 1.x/MS-DOS 1.xx, the FCB was the only method of accessing files. Under DOS a few INT 21h subfunctions provided the interface to operate on files using the FCB.<ref name="stanislavs"/><ref name="Duncan_1988_MS-DOS_Encyclopedia"/><ref name="Chappell_1994_DOS-Internals"/> When, with MS-DOS 2, preparations were made to support multiple processes or users,<ref name="Duncan_1988_MS-DOS_Encyclopedia"/><ref name="Chappell_1994_DOS-Internals"/> use other filesystems<ref name="Duncan_1988_MS-DOS_Encyclopedia"/><ref name="Chappell_1994_DOS-Internals"/> than FAT or to share files<ref name="Chappell_1994_DOS-Internals"/> over networks in the future, FCBs were felt to be too small to handle the extra data required for such features<ref name="Chappell_1994_DOS-Internals"/> and therefore FCBs were seen as inadequate for various future expansion paths.<ref name="Duncan_1988_MS-DOS_Encyclopedia"/> Also, they didn't provide a field to specify sub-directories.<ref name="Duncan_1988_MS-DOS_Encyclopedia"/> Exposing file system related data to user-space was also seen as a security risk.<ref name="Chappell_1994_DOS-Internals"/> FCBs were thus superseded by [[file handle]]s, as used on [[UNIX]] and its derivatives.<ref name="Duncan_1988_MS-DOS_Encyclopedia"/> File handles are simply consecutive integer numbers associated with specific open files. If a program uses the newer file handle API to open a file, the operating system will manage its internal data structure associated with that file in its own memory area. This has the great advantage that these structures can grow in size in later operating system versions without breaking compatibility with application programs; its disadvantage is that, given the rather simplistic [[memory management]] of DOS, space for as many of these structures as the most "file-hungry" program is likely to use has to be reserved at boot time and cannot be used for any other purpose while the computer is running. Such memory reservation is done using the [[FILES (CONFIG.SYS directive)|FILES]]= directive in the [[CONFIG.SYS]] file. This problem does not occur with FCBs in DOS 1 or in CP/M, since the operating system stores all that it needs to know about an open file inside the FCB and thus does not need to use any per-file memory in operating system memory space. When using FCBs in MS-DOS 3 or later, the FCB format depends on whether SHARE.EXE is loaded and whether the FCB refers to a local or remote file and often refers to a SFT entry. Because of this, the number of FCBs which can be kept open at once in DOS 3 or higher is limited as well, usually to 4; using the [[FCBS (CONFIG.SYS directive)|FCBS]]= directive in the CONFIG.SYS file, it may be increased beyond that number if necessary. Under [[DR-DOS]], both FILES and FCBS come from the same internal pool of available handles structures and are assigned dynamically as needed.<ref name="Paul_1997_NWDOSTIP"/> FCBs were supported in all versions of MS-DOS and [[Microsoft Windows|Windows]] until the introduction of the [[FAT32]] filesystem. [[Windows 95]], [[Windows 98]] and [[Windows Me]] do not support the use of FCBs on FAT32 drives due to its 32-bit cluster numbers,<ref name="Chappell_1994_DOS-Internals"/><!-- While this source predates the introduction of FAT32, it discusses the various real and potential future limitations of the FCB approach and the cumbersome workarounds introduced in DOS 3, DOS 4 and DOS 5 to keep FCBs alive for a bit longer --> except to read the volume label. This caused some old DOS applications, including [[WordStar]], to fail under these versions of Windows. The FCB interface does not work properly on [[Windows NT]], [[Windows 2000|2000]], etc. either β WordStar does not function properly on these operating systems. DOS emulators [[DOSEMU]] and [[DOSBox]] implement the FCB interface properly, thus they are a way to run older DOS programs that need FCBs on modern operating systems.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)