Block allocation map: Difference between revisions

Content deleted Content added
Removing links to deleted file File:View BAM.gif
m Add acronym
 
(13 intermediate revisions by 6 users not shown)
Line 1:
In [[computer file system]]s, a '''block allocation map''' ('''BAM''') is a [[data structure]] used to track [[Block size (data storage and transmission)|disk blocks]] that are considered "allocatedin use". Blocks may also be referred to as allocation units or "free[[Data_cluster|clusters]].<ref>{{cite forbook|title=CP/M writingPlus Operating System System Guide|year=1983|publisher=Digital Research, Inc."|location=Monterey, CA|edition=Second|page=41}}</ref>
{{Unreferenced stub|auto=yes|date=December 2009}}
<!-- Deleted image removed: [[Image:View BAM.gif|frame|right|Here, the ''View BAM'' utility on the [[Commodore 1541]] ''Test/Demo Disk'' is displaying a portion of the block allocation map for that disk.]] -->
In [[computer file system]]s, a '''block allocation map''' ('''BAM''') is a [[data structure]] used to track [[Block size (data storage and transmission)|disk blocks]] that are considered "allocated" or "free for writing."
 
[[CP/M]] used a block allocation map in its [[Directory_(file_systems)|directory]]. Each directory entry could list 8 or 16 blocks (depending on disk format) that were allocated to a file. If a file used more blocks, additional directory entries would be needed. Thus, a single file could have multiple directory entries. A benefit of this method is the possibility to use [[sparse files]] by declaring a large file size but only allocating blocks that are actually used.<ref name="cpm_pg">{{cite book|title=CP/M Plus Operating System Programmer's Guide|year=1983|publisher=Digital Research, Inc.|location=Monterey, CA|edition=Second|page=2-12,3-16}}</ref> A detriment of this method is the disk may have free space (unallocated blocks) but data cannot be appended to a file because all directory entries are used.<ref name="cpm_pg" />
Very rapid file access was made possible by consulting a Block Allocation Map only when it absolutely had to (that is, when writing), and ignoring it when reading. This arguably made writing to the [[diskette|disk]] more time consuming than reading. Nonetheless, the difference between reading and writing was negligible when taking into account the time involved waiting for the medium to speed up, and synchronize into position. Regardless of whether the medium was a 5.25&nbsp;inch floppy diskette, or a 3.5&nbsp;inch 'semi-rigid' diskette, most of the time was spent waiting for the medium to get into place before reading or writing was suitable.
 
== Errata ==
In terms of [[Commodore 128|Commodore Business Machines]] compatible Disk Drives, the BAM was located at a different physical track and sector on each of the [[Commodore 1541]], [[Commodore 1571]], and [[Commodore 1581]] disk drives. It is not the same thing as a simple bitmap because it actually involves a series of 1 byte counters (denoting how many blocks are free on that track) and a bitmap (which sectors on that track are allocated, and which are free).
The [[Commodore DOS]] used a similarly named but significantly different [[noting]].
 
== See also ==
* [[File Allocation Table]] (FAT)
*[[Commodore DOS]]
* [[Design of the FAT file system]]
*[[File Allocation Table]]
 
== References ==
{{Reflist}}
{{DEFAULTSORT:Block Allocation Map}}
 
[[Category:Computer file systems]]
 
 
{{Compu-storage-stub}}
 
[[pt:Block allocation map]]