150 likes | 291 Views
Macintosh Hierarchical File System. by Imad Qamar 2190-B. What is HFS?. Hierarchical File System ( HFS ), is a file system developed by Apple Computers for use on computers running Mac OS. Designed for use on floppy and hard disks. Also known as Mac OS Standard. Design.
E N D
MacintoshHierarchical File System by Imad Qamar 2190-B
What is HFS? • Hierarchical File System (HFS), is a file system developed by Apple Computers for use on computers running Mac OS. • Designed for use on floppy and hard disks. • Also known as Mac OS Standard.
Design • The Hierarchical File System divides a volume into logical blocks. • Logical blocks are then grouped together into allocation blocks. • Size of allocation block depends upon size of volume. • No# of allocation blocks: 65,536
HFS Volume • Five structures make up an HFS volume. • Boot Blocks • Master Directory Block • Volume Bitmap • Extent Overflow File • Catalog File
Boot Blocks • Logical blocks 0 and 1. • Contain system startup information. • e.g. System and Shell (Finder) Files loaded at startup.
Master Directory Block • Logical Block 2 • Defines a variety of data about the volume: • Time of volume creation. • Size of logical structures (e.g. allocation blocks) • Location of volume structures.
Volume Bitmap • Logical Block 3. • Keeps track of which allocation blocks are in use and which are free. • Allocation represented by a bit: • Set = Block in use. • Not set = Block is free.
Extent Overflow File • Follows a B-tree data structure. • Contains extra extents to record which allocation blocks are allocated to which files. • Is used after all 3 extents of the Catalog File are used up.
Catalog File • Also follows a B-tree data structure. • Contains records for all the files/directories stored in the volume. • File/Directories are located by their Catalog Node ID.
Catalog File (Continued) • Each file consists of: • File Thread Record • File Record • Each directory consists of: • Directory Thread Record • Directory Record
Catalog File (Continued) • File Thread Record:Stores: • Filename • CNID of its parent directory. • File Record:Stores meta data of a file: • CNID • Size of file
Catalog File (Continued) • Directory Thread Record:Stores: • Directory name. • CNID of its parent directory. • Directory Record:Stores data such as: • No# of files stored in directory • CNID of the directory
HFS (Some more info) Max file size:2 GB Max no# of files:65535 Max filename size:31 char Max Volume size:2 TB Directory Contents:B-tree File Allocation:B-tree Bad Blocks:B-tree