File systems

Often times people have asked us what makes up the file system, what are the differences between FAT16, FAT32 and NTFS.  This page will go over the basics of each file system used by Microsoft.


What is the file system?
A basic way of thinking of a hard disk is like this:  Imagine a open field that is then paved with asphalt and then lines are drawn to make parking spaces.  The open field is the hard disk itself, as it comes from the factory.  Then when you do a low-level format, you smooth out the field with asphalt.  A low-level format is when a special program or sometimes a device writes 0s to the entire disk.  Now the operating system comes along and has to store stuff on the disk, but needs to know how to organize it and find it.  The operating system paints the lines and then numbers the parking spaces.  There are many different types of file systems in use today.   Windows NT supports 4 file systems:  FAT16, NTFS, HPFS, and CDFS. 

The hard disk drive:
What is the disk drive?  A disk drive is basically a thin metal disk or piece of thin film that spins at a very high speed.  The surface has to be extremely smooth and there must not be any dust or foreign particles in the drive, which is why it is sealed up very well.  To read and write information to the drive, heads mounted on arms move across the drive like a record player stylus.  The disk is then divided up into tracks, heads, and sectors.   Most hard disks have 512 bytes in one sector.

FAT16
Why is it called FAT?  FAT stands for File Allocation Table.   All the file locations are contained in 2 tables, one is the working FAT and the other is the backup FAT.  The FAT points to the cluster that the file starts at.   A cluster made up of one or more sectors, usually 512 bytes in size.   Depending on the size of the drive, the cluster size changes.  The problem?   Let's say you have a file that is 1 KB in size.  You save it on a disk that has 2 KB clusters.  You waste the other 1 KB in the cluster because a cluster can only be occupied by one file.  But what if you have a drive that is bigger than 1024 MB, and it has 32 KB clusters?  You loose 31 KB!!!  So on a drive with a lot of small files that is big does not use it's space efficiently.  Another problem that comes about is fragmentation.  When a file is greater then the cluster size, it has to be split up in to multiple pieces.  Sometimes it is possible to place each unit next to each other sequentially, so that when the file is read, the disk head doesn't have to move much to read the entire file.  But if the pieces are far from each other on the disk, the heads have to move to each track which slows down the file read. 

FAT16

 
Partition Size Cluster Size
0 MB - 32 MB 512 Bytes
32 MB - 64 MB 1 KB
65 MB - 127 MB 2 KB
128 MB - 255 MB 4 KB
256 MB - 511 MB 8 KB
512 MB - 1023 MB 16 KB
1024 MB - 2 GB (4 GB in NT) 32 KB

FAT32
To solve the problem with the fact that the largest volume size for FAT16 can be 2 GB and the wasted space because the cluster sizes are large, Microsoft introduced FAT32.   FAT32 was added to Windows 95 OSR2 (aka, B) but OSR2 only comes in the OEM version, not the upgrade version (unless you know a secret to get around it!!!). It is also included in Windows 98, with a converter.  FAT32 can handle up to 2 TB (tera-bytes).   The other advantage is that on smaller drives, space is used more efficiently,

a 2 GB partition with 32 KB clusters would now have 4 KB clusters, reducing the space wasted.  FAT32 Problems:  The only problems with FAT32 is incompatibility with old DOS programs that depended on FAT16, such as disk utilities.  

FAT32

 
Partition Size Cluster Size
260 MB - 8 GB 4 KB
8 GB - 16 GB 8 KB
16 GB - 32 GB 16 KB
32 GB - 2 TB 32 KB

NT 4.0 does NOT support FAT32 in any way.  This is extremely important to consider when creating a dual-boot system, The C: drive must be FAT16 or NTFS.  NT 5.0 will support FAT32.  There are Third-party drivers to allow you to read, not write, to FAT32 volumes under NT.

NTFS
NTFS stands for NT File System (very cleaver!).  Only supported by Windows NT, it is a far superior file system compared to FAT16 and FAT32.  NTFS adds security and POSIX compatibility, and higher fault-tolerance.  It also is very efficient because of the cluster sizes, and you can actually format a volume with whatever cluster size you want.  It can handle volumes up to 16 exabytes, or roughly 18.5 x 1018 bytes, which is pretty damn big!  The current cluster sizes however limit it to 2 TB, but it is expected that newer versions of NTFS will support larger cluster sizes.   All file data is stored in the Master File Table (MFT) which includes file cluster locations, security attributes and file names up to 255 characters.  It keeps a transaction log for recoverability - file operations that have not occurred are still logged so if the system goes down, the file system can be easily updated.  It I/O performance is much better than FAT16, and the number of files in a directory are not limited (256 files/directories in FAT16). 

NTFS

 
Partition Size Default Cluster Size
512 MB or less 512 Bytes
513 MB - 1024 MB 1 KB
1025 MB - 2048 MB 2 KB
2049 MB - 4096 MB 4 KB
4097 MB - 8192 MB 8 KB
8193 MB - 16,384 MB 32 KB
32,728 or more 64 KB
Note:   These are defaults, you can choose between any of them, depending on your application needs.

 













Back to ntsecrets...


Source:  PC Today, September 1997