Differences between revisions 2 and 3
Revision 2 as of 2004-03-31 17:47:00
Size: 807
Editor: yakko
Comment:
Revision 3 as of 2004-03-31 17:50:16
Size: 1319
Editor: yakko
Comment:
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
'''Allocation Example'''
Line 30: Line 31:

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

Terms:

  • data blocks
  • block sizes max ratio 8:1
  • Allocation Example
  • fragment recopying problem
  • inodes
  • direct blocks and indirect blocks, single, double and triple indirection
  • directories, hard links and symbolic links
  • mapping a file descriptor to an inode

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

FileSystem (last edited 2004-03-31 19:19:36 by yakko)