File Systems Overview: FAT, HPFS, and NTFS
Simplicity of FAT: FAT (File Allocation Table) is the most basic file system supported by Windows NT. It is widely used for managing files and directories on computers, particularly in small drives or removable storage devices where simplicity and speed are crucial.
Structure:
Characterized by a table at the top of the volume called the FAT, which keeps track of which clusters are in use or free.
Two copies of the FAT are kept for protection against corruption, enhancing reliability by allowing recovery even if one copy is damaged.
FAT tables and the root directory must be in a fixed position for the boot process, ensuring that the system can locate critical data quickly during startup.
Allocation:
Data is allocated in clusters; size depends on the volume size, which can range typically from 512 bytes to 32 KB.
Each file creation results in a directory entry that points to the first cluster of the file, which may link to additional clusters if the file is larger than one cluster.
Fragmentation can occur over time as files are created and deleted, leading to inefficient use of disk space.
FAT Updates:
Critical to regularly update the FAT table to prevent data loss; this can be time-consuming due to the necessary disk head repositioning, particularly on mechanical hard drives.
Directory Structure:
The structure lacks organization; files are saved in the first available slot on the disk, which can make file management cumbersome as the number of files increases.
Only supports basic file attributes: read-only, hidden, system, and archive, limiting user capabilities in managing file properties.
FAT Naming Convention
8.3 Naming:
Filenames can be up to 8 characters, followed by a 3-character extension, adhering to the old DOS file naming conventions.
Must start with a letter or number; cannot include spaces or specific reserved characters like *, ?, or /.
Reserved names such as CON, AUX, COM1, COM2, etc., cannot be used, and all characters are automatically converted to uppercase to ensure uniformity.
Advantages of FAT
Undelete Capability:
Files on a FAT partition can be undeleted if accessed under MS-DOS immediately after restart, offering a way to recover accidentally deleted files, although success can depend on how much the disk has been used since deletion.
Optimal for Small Drives:
Performs best on drives or partitions below 200 MB due to minimal overhead, making it a preferable choice for USB flash drives and memory cards.
Disadvantages of FAT
Inefficiency in Large Drives:
Not ideal for volumes over 200 MB, as performance declines significantly due to overhead and increased fragmentation.
File Size Limitation:
Maximum partition size is 4 GB under Windows NT and 2 GB under MS-DOS, restricting the file system's applicability for modern large drives.
HPFS Overview
Introduction of HPFS:
Developed for OS/2 to support larger hard drives and enhance file management and security, offering more sophisticated features than FAT.
Directory Organization:
Maintains directory organization similar to FAT but adds automatic sorting by filenames, making file retrieval more efficient.
File Structure:
Supports filenames of up to 254 double-byte characters, allowing for more descriptive file names, and includes additional file attributes to enhance user control over files.
Storage Efficiency:
Allocates in physical sectors (typically 512 bytes), thus minimizing lost space and enhancing overall storage efficiency compared to FAT.
Performance Improvements:
Attempts to keep files in contiguous sectors to improve access speed, using 8-MB bands for organization and has allocation bitmaps to keep track of used and free space efficiently.
Unique Structures of HPFS
Super Block:
Located in logical sector 16; contains the pointer to the root directory. Loss of the Super Block can lead to data loss, resulting in potential downtime for recovery processes.
Spare Block:
Located in sector 17; contains hot fixes that redirect bad sector requests to good sectors. HPFS does not support hot fixing in Windows NT versions, limiting its usefulness in some recovery scenarios.
Advantages and Disadvantages of HPFS
Best Volume Size:
Optimal for drives in the range of 200-400 MB, where it performs well due to efficient use of space and fast access times.
Efficiency Downsides:
Not efficient for volumes under 200 MB and overhead increases performance issues in larger drives (>400 MB), causing potential slowdowns and increased wear on hardware.
NTFS Overview
File Organization:
Organizes files into directories without dependency on hardware specifics, allowing for better management of larger and complex file systems.
Goals include reliability, added functionality, POSIX compliance, and overcoming FAT and HPFS limitations to ensure better performance and security in modern computing environments.
Reliability Features:
Tracks transactions for consistency and can recover from failures without user intervention, making it highly reliable for critical data.
Uses multiple copies of the Master File Table to avoid single-sector failures, significantly improving data integrity.
Added Functionality of NTFS
Flexible Platform:
Supports multiple data streams, user-defined attributes, and an extensive security model including file permissions and auditing capabilities.
POSIX Support:
Enables case-sensitive file naming, allowing for more flexibility in naming conventions, and allows hard links, enhancing file management options.
Removal of Limitations in NTFS
Increased Capacity:
Supports file and volume sizes up to a staggering 16 exabytes, making it a viable choice for large-scale data storage solutions.
Utilizes clusters sized according to the hardware's capabilities, ensuring optimal allocation and usage of available disk space.
Unicode Support:
All filenames are Unicode-based, maintaining compatibility with 8.3 filenames, providing support for international character sets.
Advantages of NTFS
Performance:
Best suited for volumes of 400 MB or larger; performance remains steady regardless of size, making it efficient for both small and large systems.
Recoverability:
Users typically do not need to run disk repair tools due to built-in recoverability features, reducing maintenance effort.
Disadvantages of NTFS
Space Overhead:
Not recommended for volumes smaller than 400 MB due to overhead usage, making it less viable for older or smaller storage options.
No Built-in Encryption:
Vulnerable to low-level disk access in other operating systems, posing a risk to sensitive data if the volume is accessed outside its intended context.
Floppy Disk Limitations:
Cannot format floppy disks with NTFS due to size constraints of NTFS overhead, limiting usability on legacy systems.
NTFS Naming Conventions
File and Directory Names:
Up to 255 characters, including extensions, case-preserved but not case-sensitive, allowing diverse naming structures.
Notably, restricted characters include: ?, ", /, \, <, >, |, : which must be avoided when creating file names to ensure compatibility across systems.
Conclusion:
For effective file system management, understanding the structure, pros, and cons of FAT, HPFS, and NTFS is crucial, especially when deciding on systems for different uses, particularly within Windows environments. This knowledge aids in selecting the appropriate file system to balance performance, capacity, and reliability.