FS Mod4
FS Mod4
• If file contains so many blocks that the block index does not fit into memory.
Solution: PAGES -> B-tree structure
The use B-tree index for sequence set of blocks leads an hybrid structure called as B+
tree
• Content of Index are separator instead of keys.
• Separators do not need to have actual keys in the index set can save
space by placing the shortest separator in the index structure
• Separator can be treated as variable-length entities within index structure
save space by placing the shortest separator in the index structure
The simple prefix B+ Tree
• B-tree index is called index set combined together with sequence set, forms
a file structure called a simple prefix B+ tree.
• Simple prefix => shortest separator rather than actual keys
Simple prefix B+ tree Maintenance
• Deletions on the sequence set delete the records for EMBRY and FOLKS
limited to changes within blocks
• Insertion of EATON to tree makes tree remain unchanged.
• Consider B-tree order is three and so need maximum 2 seperators.
• Insertion in block 1 => split
• Deletion of a record from block 2 of the sequence set cause an underflow
condition in the sequence set need a concatenation of blocks 2 and 3
• Have to remove block 3 and remove the separator CAM cause an underflow
in the index set node => merging need a concatenation of index nodes
• Bring BO back down from the root
Index Set Block Size
• Common block size for the index and sequence sets
• the block size that is best for the sequence set is usually best for the
index set
• a common block size makes it easier to implement a buffering scheme
to create a virtual simple prefix B+ tree
• use of one file for both kinds of blocks is simpler if the block sizes are
the same
Internal Structure of Index Set
Blocks: A Variable-Order B-Tree
• Variable-length separators and corresponding index
• separator count to find the middle element in the index to the separators
for binary search
• total length of separators is a list of merged separators varies in length from
block to block Separators and relative block numbers