Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Comparison of FAT32 and the NTFS File System

Bjoern Lillebekk CS 558, Operating Systems and Computer Architecture 2

Outline
Overview of FAT32 File System
Example using Norton Disk Editor

Overview of the NTFS File System Comparing FAT 32 and NTFS Conclusion

FAT 32 overview
First introduced in Windows 95 OSR 2 Still supported by Windows XP Divides partition into clusters Maximum partition size 2 TB

Layout of a FAT 32 partition

FAT 32, boot sector


Located at relative address zero Contains information about
Bytes per sector(512 4096) Number of sectors per cluster Number of root directories Number of sectors per FAT Magic number 0x55aa at end of sector

FAT 32 File system information sector


Comes right after the Partition Boot Sector Contains additional information to the Partition Boot Sector
Ex. Number of free clusters, next free cluster

Only included in FAT 32

FAT 32, File Allocation Table


Both FAT 1 and FAT 2 contains the same information
FAT 2 is used for recovery in case of corruption Stored at fixed location Each entry in the FAT has 32 bits, but only 28 bits used

First two entries are unused

FAT 32, File Allocation Table cont.


End of file <EOF> entry is indicated by value 0xffffffff The File Allocation Table also has information about bad clusters and unused clusters

Example of beginning of File Allocation Table

FAT 32, Directory structure


An ordinary cluster chain Directory entry
32 bytes for both files and directories For deleted entries, first byte is set to 0xE5 First two entries in subdirectories are . and.. Uses more than one entry to implement long filenames

NTFS, Overview
New Technology File System Designed to meet new goals not supported in the FAT filesystem Clustersize from 512 4096 bytes Maximum partition size 16 TB bytes using clustersize of 4096 bytes
Partition boot sector Master File Table System files File area

Layout NTFS partition

NTFS, Boot sector


Allocates the first 16 blocks of the partition Consists of 2 different structures
BIOS Parameter Block(information about the partition) Volume Boot Code(Bootstrap code)

NTFS, Master File Table

NTFS, Master File Record


First located at entry 17 in the MFT Allocates a certain amount of space to each record Files smaller than 1500 bytes can be stored within a record Small directories fits in the record, larger uses Btree structure as pointers to outside MFT directories
Standard information File or directory name Security descriptor Data or index

Layout Master File Record

NTFS features
Multiple data streams Compressed files NTFS encryption NTFS sparse files Data integrity and recoverability
Logging and recoverability Clustered remapping

Comparing FAT 32 and NTFS


Partition size: 2 TB vs 16 Okta byte
Internal fragmentation

Performance
FAT good on small partition vs NTFS good on large part.

Storage efficiency
Higher fragmentation on FAT 32

Directory structure
Higher performance for NTFS

Reliability
FAT 32 is not fault tolerant vs NTFS transaction management

Recovery Security and Access control


Only available in NTFS

Compatibility

Conclution
NTFS outperformes FAT 32 on almost each, except when partitions are very small.

References
Ntfs.com, http://www.ntfs.com Microsoft Product Support Service
http://support.microsoft.com

Milenkovic, Milan. Operating System Concepts and Design Blaybrook, Billy G. File Management Techniques Tech TV inc, 2003, NTFS vs FAT32
http://www.techtv.com

Questions?

You might also like