Macintosh Hierarchical File System by Imad Qamar 2190-B.
-
Upload
silas-chambers -
Category
Documents
-
view
221 -
download
0
Transcript of Macintosh Hierarchical File System by Imad Qamar 2190-B.
MacintoshMacintoshHierarchical File SystemHierarchical File System
byby
Imad QamarImad Qamar
2190-B2190-B
What is HFS?What is HFS?
Hierarchical File SystemHierarchical File System ((HFSHFS), is a file system ), is a file system developed by Apple Computers developed by Apple Computers for use on computers running for use on computers running Mac OS.Mac OS.
Designed for use on floppy and Designed for use on floppy and hard disks.hard disks.
Also known as Also known as Mac OS Mac OS StandardStandard..
Design Design
The Hierarchical File System The Hierarchical File System divides a volume into divides a volume into logical logical blocks.blocks.
Logical blocks are then grouped Logical blocks are then grouped together into together into allocation blocks.allocation blocks.
Size of allocation block depends Size of allocation block depends upon size of volume.upon size of volume.
No# of allocation blocks:No# of allocation blocks: 65,536 65,536
HFS Volume HFS Volume
Five structures make up an HFS Five structures make up an HFS volume.volume.
Boot BlocksBoot Blocks Master Directory BlockMaster Directory Block Volume BitmapVolume Bitmap Extent Overflow FileExtent Overflow File Catalog FileCatalog File
Boot BlocksBoot Blocks
Logical blocks 0 and 1.Logical blocks 0 and 1.
Contain system startup Contain system startup information.information.
e.g. System and Shell (Finder) e.g. System and Shell (Finder) Files loaded at startup.Files loaded at startup.
Master Directory BlockMaster Directory Block
Logical Block 2Logical Block 2
Defines a variety of data about Defines a variety of data about the volume:the volume: Time of volume creation.Time of volume creation. Size of logical structures (e.g. Size of logical structures (e.g.
allocation blocks)allocation blocks) Location of volume structures.Location of volume structures.
Volume BitmapVolume Bitmap Logical Block 3.Logical Block 3.
Keeps track of which allocation Keeps track of which allocation blocks are in use and which are blocks are in use and which are free.free.
Allocation represented by a bit:Allocation represented by a bit: Set = Block in use.Set = Block in use. Not set = Block is free.Not set = Block is free.
Extent Overflow FileExtent Overflow File
Follows a B-tree data structure.Follows a B-tree data structure.
Contains extra Contains extra extents extents to record to record which allocation blocks are which allocation blocks are allocated to which files.allocated to which files.
Is used after all 3 Is used after all 3 extents extents of the of the Catalog File are used up.Catalog File are used up.
Catalog FileCatalog File
Also follows a B-tree data Also follows a B-tree data structure.structure.
Contains records for all the Contains records for all the files/directories stored in the files/directories stored in the volume.volume.
File/Directories are located by File/Directories are located by their their Catalog Node IDCatalog Node ID..
Catalog File (Continued)Catalog File (Continued)
Each file consists of:Each file consists of: File Thread RecordFile Thread Record File RecordFile Record
Each directory consists of:Each directory consists of: Directory Thread RecordDirectory Thread Record Directory RecordDirectory Record
Catalog File (Continued)Catalog File (Continued)
File Thread Record:File Thread Record:Stores:Stores: Filename Filename CNID of its parent directory.CNID of its parent directory.
File Record:File Record:Stores meta data of a file:Stores meta data of a file: CNIDCNID Size of fileSize of file
Catalog File (Continued)Catalog File (Continued)
Directory Thread Record:Directory Thread Record:Stores:Stores: Directory name.Directory name. CNID of its parent directory.CNID of its parent directory.
Directory Record:Directory Record:Stores data such as:Stores data such as: No# of files stored in directoryNo# of files stored in directory CNID of the directoryCNID of the directory
HFS (Some more info)HFS (Some more info)
Max file size:Max file size: 2 GB2 GB
Max no# of files:Max no# of files: 6553565535
Max filename size:Max filename size: 31 31 charchar
Max Volume size:Max Volume size: 2 TB2 TB
Directory Contents:Directory Contents: B-treeB-tree
File Allocation:File Allocation: B-treeB-tree
Bad Blocks:Bad Blocks: B-treeB-tree
The EndThe End