AN!Wiki :: Block
A block is a collection of physical units of storage on a storage device or medium. A common 'block size' is 2,048 bytes, which could consist of 4x512byte sectors on a hard drive. A block is the smallest unit of space that a file system will use when storing data. If a file is smaller that this size, it will still use up the rest of the space.
This of a block as a filing cabinet drawer with a set number of file folders (which actually store your documents). The difference is that once you start to store a document in a given block, even though some of the file folders may not be needed, no other document can be stored in it. The reason is that when you want to retrieve the file later, you will look up a list, and the list will tell you that file 'X' is in blocks (filing cabinet drawers) 1, 2-10, 12 and 15. You then go, pull the files out (in order) from those drawers and you will have your full file back. If two different files tried to use the same block, there would be no way to know what bits of info in a given drawer belonged to which file, so they are just kept separate.
To save space, you would rightly think "well, why not use the smallest blocks you can?". The reason larger blocks are desirable is because the more data you can put into a single block, the fewer blocks you need to look into to rebuild a file. So the trade off is;
Smaller blocks = More efficient disk usage but slower access Larger blocks = More wasted space but faster to collect all the bits of a file.
Because most all storage mediums (hard drives, etc) internally use 512 byte sectors, blocks will generally always be a multiple of 512 (ie: 1,024, 2,048, 4,096, etc).
|Any questions, feedback, advice, complaints or meanderings are welcome.
|© Alteeve's Niche! Inc. 1997-2024
|Anvil! "Intelligent Availability®" Platform
|legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.