Back to ComputerTerms

Terms:

See Also DiskStructures

Data Blocks

Data blocks contain whatever the user put into them. There are two sizes in Free BSD, one large block size (LBS) and smaller fragment size (SFS).

   LBS = n x SFS 
   LBS > SFS
   n   = LBS:SFS <= 8:1.

Allocation Example Suppose that LBS=8K and SFS=2K. Given a file of 18,000 bytes we would allocate

2 8K blocks + 1 2K block = 16384 + 2048 
                         = 18,432 bytes.

When a file is being created and we insert 1K into it a fragment would be allocated. If we then continued later and added 2K, two fragments would be allocated and we would have to copy the first fragment. This can happen several times until we have copied the original fragment 7 times. Free BSD tries to avoid this by allocating a second fragment directly after the first one, but this can not always take place. This problem is known as the Fragment recopying problem.

Back to ComputerTerms