Home

This document is a cache from http://www.nobius.org/~dbg/practical-file-system-design.pdf


Practical File System Design

Document source : www.nobius.org


6 . 6
A L L O C AT I O N P O L I C I E S I N B F S
105
Allocation
group 0
Block
0
...
Block
8191
Block
8192
...
Block
16383
Allocation
group 1
Figure 6-1 The relationship of allocation groups to physical blocks.
Allocation Groups: The Underlying Organization
To help manage disk space, BFS introduces a concept called allocation groups.
An allocation group is a soft structure in that there is no corresponding data
structure that exists on disk. An allocation group is a way to divide up
the blocks that make up a file system into chunks for the purposes of the
allocation policy.
In BFS an allocation group is a collection of at least 8192 file system blocks.
Allocation group boundaries fall on block-sized chunks of the disk block
bitmap. That is, an allocation group is always at least one block of the file
system block bitmap. If a file system has a block size of 1024 bytes (the pre-
ferred and smallest allowed for BFS), then one bitmap block would contain
the state of up to 8192 different blocks (1024 bytes in one block multiplied
by eight, the number of bits in 1 byte). Very large disks may have more than
one bitmap block per allocation group.
If a file system has 16,384 1024-byte blocks, the bitmap would be two
blocks long (2
8192). That would be sufficient for two allocation groups, as
shown in Figure 6-1.
An allocation group is a conceptual aid to help in deciding where to put
various file system data structures. By breaking up the disk into fixed-size
chunks, we can arrange data so that related items are near each other. The
rules for placement are just that--rules--which means they are meant to be
broken. The heuristics used to guide placement of data structures are not
rigid. If disk space is tight or the disk is very fragmented, it is acceptable to
use any disk block for any purpose.
Even though allocation groups are a soft structure, proper sizing can affect
several factors of the performance of the overall file system. Normally an
allocation group is only 8192 blocks long (i.e., one block of the bitmap). Thus,
a
block run
has a maximum size of 8192 blocks since a
block run
cannot span
more than one allocation group. If a single
block run
can only map 8192
blocks, this places a maximum size on a file. Assuming perfect allocations
(i.e., every
block run
is fully allocated), the maximum amount of data that a
Practical File System Design:The Be File System
, Dominic Giampaolo
page 105







Summary :

If a file system has a block size of 1024 bytes (the pre- ferred and smallest allowed for BFS), then one bitmap block would contain the state of up to 8192 different blocks (1024 bytes in one block multiplied by eight, the number of bits in 1 byte). Thus, a block run has a maximum size of 8192 blocks since a block run cannot span more than one allocation group.


Tags : system,blocks,disk,8192,bitmap,groups,data,run,chunks,size,bfs,structure,maximum





Terms    |    Link pdf-search-files.com    |    Site Map
   |    Content Removal Notice   
   |    Contact   

All books are the property of their respective owners.
Please respect the publisher and the author for their creations if their books copyrighted