There are multiple types of file systems, including FAT12, FAT16, FAT32, and NTFS for devices under Windows OS, Ext2, Ext3, and Ext4 for devices under Linux, HFS/HFS+ for storage media in Mac OS X, and ISO-9660, UDF (Universal Disc Format), and CDFS (Compact Disc File System) for optical disc. If a partition is formatted without a file system or the file system is damaged, all files saved in this partition will be inaccessible for operating systems do not know where these files are saved.
Windows only uses one file system in its latest version and that is NTFS, which is why you never had to worry about it when installing that particular operating system (OS).
You probably noticed that your files are organized in a tree-like structure: you have one root (say C:/ on Windows) and inside that folder you can add either more folders or simple files. These other folders can also have sub-folders and files themselves, in the end forming a hierarchical tree structure.
But the disk does not have a hierarchical structure, so someone must figure out where the file C:/Folder1/File1.txt actually is on the disk. The filesystem is a collection of methods and data structures used by the OS to organize and keep track of the files on your disk. Among other information, these data structures contain mappings between the logical name/location in the hierarchical structure and their location on the physical disk.
How do they work?
You can view the disk as a really long series of equally-sized blocks arranged in a single sequence:
[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] ...
Any file on your logical disk (the tree-like structure you can create on Windows) must have at least one of these blocks and the OS must know which blocks belong to each file. For instance, a short text file will need only one block and the OS may assign block 1 to it. If you download a video from the internet, it will need more than one block and it may be assigned blocks 2,3,4 and 5.
The way this information is stored and the way the blocks are assigned depends on how the filesystem is implemented. The assignment may very well be block 1 for the text file and blocks 2,3,4 and 8 for the video file because the blocks 5 to 7 are used by another file.
This is all nice and simple, but what happens if you delete a file? You will have to use that space again, but how do you deal with the fact that you now have a gap? If the file has more than one block, how do you decide what blocks to give to the file? If you assign the blocks consecutively, how do you store a big file if you have many small gaps? If you assign blocks that are far apart from each other, how will you deal with the fact that it takes much longer to find them?
This gap problem is called fragmentation and is only one of the problems you have to think about when designing a file system. People tried to find different ways to work around the problems that these questions pose which resulted in the wide selection of filesystems available today.
But it is not as simple as that, because you cannot objectively say that one file system is better than the other unless you are comparing a modern filesystem with an old one. This is not a problem for general use, but if you use your computer in a very specialized way, one filesystem may have significant advantages over the rest.
FAT16 and FAT32 were old filesystems used by Windows. They are also used on Floppy Discs. They proved to be very slow and would require alot of RAM to support on very large discs. One of the most known limitations of FAT32 is that it cannot store files larger than 4GB. As the disks grew larger, FAT32 became worse. Microsoft had to come up with a new solution and NTFS was it. NTFS brings significant improvements, new features and gets rid of alot of limitations from FAT32. BUT, FAT32 is still better for small discs.
The extended file system (ext) was created for the Linux OS and it is another approach at implementing a file system.
These are probably the only two filesystems you will have to think about when installing an OS on your laptop.
However, there are plenty other lesser known file systems that are made for specialized use. JFS is one of them, created by IBM for use in high performance environments. The ISO filesystem is used for CD-ROMs. NFS is a filesystem that allows multiple computers to share files over a network.
Hard disks are the biggest bottleneck in computer performance and as such, many of today's supercomputers have their own filesystem designed for a specific use because the currently available filesystems do not cut it.
0 Comments