What fs fat format is considered. FAT file systems. Advantages and disadvantages of FAT32, NTFS and exFAT file structures

File system FAT

The FAT (File Allocation Table) file system gets its name from a simple table that specifies:

Directly addressable sections of a logical disk, allocated for placing files or their fragments in them;

Free areas of disk space;

Defective areas of the disk (these areas contain defective areas and do not guarantee that data can be read and written without errors).

In the FAT file system, the disk space of any logical drive is divided into two areas (Fig. 6.1): system area And data area.

Rice. 6.1. Logical disk structure in FAT

The system area of ​​a logical disk is created and initialized during formatting, and subsequently updated when working with the file structure. The data area of ​​a logical disk contains regular files and directory files; these objects form a hierarchy subordinate to the root directory. Catalog element


File system FAT________________________________________________ 167

ga describes a file object, which can be either a regular file or a directory file. The data area, unlike the system area, is accessible through the operating system user interface. The system area consists of the following components (located one after the other in the logical address space):

Boot Record (BR);

Reserved Sectors (ResSec);

File Allocation Table (FAT);

Root Directory (RDir).

File Allocation Table

The file allocation table is a very important information structure. We can say that it is an address map of the data area, which describes both the state of each section of the data area and its belonging to a particular file object.

The entire data area is divided into so-called clusters. A cluster is one or more adjacent sectors in the logical disk address space (more precisely, only in the data area). A cluster is the smallest addressable unit of disk memory allocated to a file (or non-root directory). Clusters are introduced in order to reduce the number of addressable units in the data area of ​​a logical disk.

Each file occupies an integer number of clusters. In this case, the last cluster may not be fully used, which, if the cluster size is large, can lead to noticeable loss disk space. On floppy disks, a cluster occupies one or two sectors, and on hard disks its size depends on the size of the partition (Table 6.1). In the FAT table, clusters belonging to the same file (or directory file) are linked into chains. The FAT 16 file system uses a 16-bit word to specify the cluster number, so you can have up to 2 10 = 65,536 clusters (numbered 0 to 65,535).

Table 6.1. Relationship between partition size and cluster size in FAT16

Partition capacity, MB Number of sectors in the cluster Cluster size, KB

Note that in Windows NT/2000/XP, FAT file system partitions can be up to 4097 MB in size. In this case, the cluster will already unite 128 sectors.

The cluster number always refers to the disk's data area (the space reserved for files and subdirectories). The cluster numbers correspond to the elements


168_________________________________________________ Chapter 6, File systems

ments of the file allocation table. The first valid cluster number always starts with 2.

The logical division of the data area into clusters as a collection of sectors instead of using single sectors has the following meaning:

First of all, the size of the FAT table itself is reduced; - possible file fragmentation is reduced;

Access to a file is accelerated, since the length of the chains of disk space fragments allocated for it is reduced several times.

However, too big size cluster leads to inefficient use of data area, especially in the case of a large number of small files. As we just noticed, on average about half of the cluster is lost per file. From the table 6.1 it follows that with a cluster size of 32 sectors (the volume of the partition is from 512 to 1023 MB), that is, 16 KB, the average loss per file is 8 KB, and with several thousand files 1 losses can be more than 100 MB. Therefore, in modern file systems, cluster sizes are limited (usually from 512 bytes to 4 KB), or the ability to choose the cluster size is provided.

The idea of ​​a file system using a file allocation table is illustrated quite clearly in Fig. 6.2.

Rice. 6.2. Illustration of the basic concept of FAT

The figure shows that the MYFILE.TXT file is located starting from the eighth cluster. In total, the MYFILE.TXT file occupies 12 clusters. The chain of clusters for our example can be written as follows: 8, 9.0A, 0B, 15,16,17,19,

1 For example, the number of 10,000-15,000 files (or even more, especially when the files are small) on a 1000 MB logical drive is quite common.


File system FAT169

1A, 1B, 1C, 1D. Cluster number 18 is marked with a special code F7 as bad; it cannot be used to host data. When formatting, the surface of a magnetic disk is usually checked, and those sectors from which errors occurred during test reading are marked in FAT as bad. Cluster 1D is marked with the FF code as the final (last in the chain) cluster belonging to this file. Free (unoccupied) clusters are marked with code 00; When a new cluster is allocated for writing a file, the first free cluster is taken. Possible values ​​that can be assigned to the elements of the FAT table are given in table. 6.2.

Table 6.2. FAT element values

Value Description

OOOOh Free Cluster

fffOh-fff6h Reserved Cluster

fff7h Bad cluster

fffSh-ffffh Last cluster in the chain

0002h-ffefh Number of the next cluster in the chain

Since files on the disk are changed (deleted, moved, increased or decreased), the mentioned rule of allocating the first free cluster for a new portion of data leads to fragmentation files, that is, the data of one file may not be located in adjacent clusters, but sometimes in very distant ones from each other, forming complex chains. Naturally, this leads to a significant slowdown in working with files.

Because the FAT table is used very intensively during disk access, it is usually loaded into RAM (in I/O buffers or cache) and remains there for as long as possible. If the table is large and the file cache is relatively small, only the most recently accessed fragments of the table are stored in memory.

Due to the extreme importance of the FAT table, it is usually stored in two identical copies, the second of which immediately follows the first. Copies of FAT are updated simultaneously, but only the first copy is used. If for some reason it turns out to be destroyed, then the second copy will be contacted. For example, the utility for checking and restoring the file structure ScanDisk from Windows 9x if a discrepancy between the primary and backup copy FAT offers to restore the main table using data from a copy.

The root directory differs from a regular directory file in that, in addition to being located in a fixed location on the logical disk, it also has a fixed number of elements. For each file and directory, information is stored in the file system in accordance with the structure presented in Table. 6.3.

To work with data on magnetic disks in DOS systems which have a FAT file system, it is convenient to use the well-known Disk Editor utility from


170___________________________________________ Chapter 6. File Systems

Peter Norton's utility kit. She has many advantages. First of all, it is compact, easily placed on a system floppy disk with MS DOS, and is equipped with a built-in hint system and the necessary reference information. Using it, you can save, modify and restore the boot record, restore the FAT table if it is damaged, and also perform many other operations. The main disadvantages of this program today are limitations on disk and partition sizes and the lack of support for working with such common file systems as FAT32 and NTFS. Instead, the Partition Magic utility is now often used, but the best alternative to this program today can be considered the Disk Administrator utility from Acronis.

Table 6.3. Catalog Item Structure

Data field size, bytes Field content

11 File or directory name

1 File attributes

1 Reserve field

3 Creation time

2 Creation date

2 Date of last access

2 Reserved

2 Time of last modification

2 Date of last modification

2 Starting cluster number in FAT

4 File size

Structure boot entry DOS

The sector containing the DOS system loader is the very first sector on the C: logical drive. Let us recall that on a floppy disk the system bootloader is located in the very first sector; its physical address is 0-0-1. The boot record consists, as we already know, of two parts: disk parameters block(Disk Parameter Block, DPB) and bootloader(System Bootstrap, SB). The disk options block serves to identify the physical and logical formats of a logical disk, and the system boot loader plays a significant role in the DOS boot process. This information structure is shown in Table. 6.4.

The first two bytes of the boot record are occupied by an unconditional jump instruction (JMP) to the SB program. The third byte contains code 90H (NOP - no operation). Next is an eight-byte system identifier, which includes information about the developer and version of the operating system. This is followed by a block of disk parameters, and after that comes the system bootloader.

To work with the DOS boot record, as well as with other service information structures, it is convenient to use the already mentioned Disk program


File system FAT________________________________________________ 171

Editor from Peter Norton's suite of utilities. Using it, you can save, modify and restore the boot record, as well as perform many other operations. Working with this utility is described in sufficient detail in.

Table 6.4. Boot record structure for FAT16

Field Offset, Field Length, Designation Field Contents
byte field byte

UN (0) 3 JUMP 3EH Unconditional jump to start

boot loader

OZN (3) 8 System ID

OVN (11) 2 SectSize Sector size, bytes

UN (13) 1 ClastSize Number of sectors in the cluster

0EN(14) 2 ResSecs Number of reserved sectors

10Н (16) 1 FATcnt Number of FAT copies

11Н (17) 2 RootSize Maximum number of Rdir elements

13Н (19) 2 TotSecs Number of sectors on the logical disk,

if its size does not exceed 32 MB; otherwise 0000Н

15Н (21) 1 Media Media descriptor

16Н(22) 2 FATsize FAT size, sectors

18Н(24) 2 TrkSecs Number of sectors per track

1АН(26) 2 HeadCnt Number of working surfaces

1СН(28) 4 HidnSecs Number of hidden sectors

20Н (32) 4 Number of sectors on the logical disk,

if its size exceeds 32 MB

24Н (36) 1 Logical disk type (UN - flexible,

80N - hard)

25Н (37) 1 Reserved

26Н (38) 1 Marker with code 29Н

27N (39) 4 Serial number volume 1

2ВН (43) 11 Volume label

36Н (54) 8 File system name

ZEN (62) Boot Loader

1FEH (510) 2 Signature (word AA55N)

1 Volume is a single logical address space. A volume can be a regular logical disk or multiple disk spaces.

Formatting a flash drive is not only quick way cleansing him from unnecessary files, but also the choice of a specific file system that will allow a wide variety of devices to easily read information from this media: PCs, laptops, radios, TVs, DVD players, game consoles, etc. Therefore, first, let’s look at which system is best for formatting a flash drive for you, touching on the features of each. Then we will dwell in detail on formatting algorithms for the popular FAT32 and NTFS.

What is a file system

A file system is a variant of organizing data on a particular medium. Every OS (and even has one) music player) its own system, harmoniously compatible with it. Or even several. Thus, when formatting an external or hard drive with a specific file system, you first of all determine which OS will be able to read it.

Many people believe that it is only possible to format a flash drive in FAT32 or NTFS, but this is a misconception. There are many more file systems. Let's list the most famous:

  • On Windows: FAT32, exFAT, NTFS.
  • On Mac OS: HFS+.
  • On Linux: EXT2, EXT3.

Let's get to know each of them in more detail.

FAT32

This file system is the oldest, most widespread and most reliable - it is the one that replaced FAT16. Therefore, many people, when deciding to format a flash drive in FAT32 or NTFS, traditionally choose the first option.

This is a rare format that is supported by all operating systems and almost all game consoles and other devices with USB. But FAT32 imposes the following restrictions: the size of one file on the disk should not be more than 4 GB, and one partition should not be more than 8 TB.

Many flash drives sold in stores are set to good old FAT by default, so that these drives can be read by both modern and legacy devices. For hard drives this system is completely unsuitable today - to install modern Windows, the drive must be formatted in at least NTFS.

Your choice is FAT32 if you want to get a flash drive on which you are supposed to write light-weight information, and with which the maximum number of different devices can work.

NTFS

Another Microsoft product. A flash drive formatted in this system can work mainly with Windows, sometimes with Linux. Apple technology can only read it, and game consoles do not support it at all (Xbox, PS). NTFS allows a single file size on media larger than flash media available today, and the partition limit is 16 Eb!

In addition, the file system includes the following capabilities:

  • recording changes to restore the system in case of a crash;
  • establishing access rights to stored files;
  • disk quotas;
  • encryption, etc.

Thus, formatting a removable drive on this system is not practical because... it is more tailored for hard drives and to work with Windows, rather than with other operating systems.

exFAT

When figuring out where it is better to format a flash drive - in FAT32 or NTFS, many ignore the more modern exFAT, also the brainchild of Windows. And it allows you to write files of almost unlimited size, setting the limit for one partition to a cosmic 64 Zb! Windows, the latest versions of Apple OS and Linux work well with it when installing additional packages. Modern versions of game consoles also support exFAT, which cannot be said about the Xbox 360 and Playstation 3.

So, exFAT is the most modern file system from Windows, incorporating the compatibility capabilities of FAT32 and the broader functionality of NTFS. One drawback is that it only works with the latest versions of existing OSes and is useless on devices with outdated hardware.

EXT2, 3 and HFS+

HFS+ is a file system developed by Mac OS. Linux and Xbox also work with it; Windows is not supported. There are practically no restrictions on the size of one file; for a section - 8 Eb.

EXT2, 3 is a Linux product. The maximum file size on a flash drive formatted in this system is 16 GB, for a partition - 32 TB. Among third-party OSes, only Xbox works with this format.

How to format a flash drive to FAT32

The algorithm is very simple:

  1. Connect the external drive to your computer, after the system sees it, go to “My Computer”. No formatting software is required for this system.
  2. RMB on the desired flash drive - “Format”.
  3. The desired system, as a rule, is already selected by default - all you have to do is click on “Start”.
  4. After a while, the computer will notify you that formatting is complete. That's all!

How to format a flash drive to NTFS

Formatting in this file system is more difficult, because it, in fact, is not intended for For the procedure, you will need the flash drive itself and a PC:

  1. In the "Control Panel" go to "System".
  2. In "Properties" you need the "Hardware" tab, and then "Device Manager".
  3. Next - “Disk devices” - double click on the desired flash drive to open its properties.
  4. Then "Policy" and "Optimize for Execution". Confirm the action and close the windows.
  5. Now go to "My Computer", select the desired removable drive.
  6. RMB by its name, then “Format”.
  7. How to format a flash drive to NTFS? The name you are looking for now appears in the "File system" drop-down menu - select it.
  8. Format the drive by clicking on "Start".
  9. In "My Computer" go to "Systems".
  10. Next - "Hardware", "Device Manager" - "Disk".
  11. Select the formatted removable drive, then go to its Properties.
  12. In "Policy" check "Optimize for quick removal", confirm your choice.

What's easier: format a flash drive in FAT32 or NTFS? The answer is obvious.

Support programs

To format a drive in a rare file system, sometimes the capabilities of one OS are not enough. Let's introduce some helper programs for formatting:

  • In NTFS - convert.exe (built-in Windows utility), HP USB Disk Storage Format Tool, Format USB Or Flash Drive Software.
  • In HFS+ and for SD, SHDC, SDXC, SD-C, LLC cards - SD Formatter.
  • For JetFlash, Transcend and A-DATA - JetFlash Recovery Tool.
  • Support for all file systems - MiniTool Partition Wizard.

When thinking about whether to format a flash drive in FAT32 or NTFS, first of all, note what you need this drive for - to write large files, work with a variety of devices, store secret data, etc. After familiarizing yourself with the pros and cons of these file systems, you You can easily select the desired formatting algorithm in this article.

Greetings!

Whatever the data carrier - be it HDD, SSD drive or flash drive (MicroSD, microSDXC, USB Flash Drive etc.) they all need a file system so that data can be written to and read from them.

There are a number of file systems, but in this article we will look at the most popular and respectively used.

The information presented will be very useful in situations where you need to format a hard drive (SSD drive) or one of its partitions, a flash drive, etc.

File system FAT16, FAT32 - history and features

Let's start the story with the file system FAT16(it is also called simply FAT) - it was created primarily for the MS DOS operating system, and its support was available in Windows 95 and Windows 98. The maximum size limit for a single file was 2 Gigabytes. The maximum partition size could be exactly the same.

The dominance of FAT16 did not last long; it was soon replaced by the FAT32 file system - it was standard for Windows 95 and Windows 98, although for compatibility reasons, as mentioned above, these operating systems also supported FAT16.

In FAT32, the maximum file size was already 4 Gigabytes. Those. the number of files can be any, but the size of any of them cannot exceed 4 Gigabytes. And the maximum partition size could be a theoretical 8 Terabytes, but in Windows it was artificially limited. For example, in Windows 98, the partition size could not be more than 137 Gigabytes.

You may have a natural question why, after so many years, flash drives can be formatted into this file system and hard disks small volume. The answer to this question is below.

  • Compatibility: FAT32 is still widely supported today by major operating systems: Windows, MacOS, Linux, various standalone devices (set-top boxes, MP3 players, phones, smartphones, etc.) and embedded systems.
  • Restrictions: If you try to write a file whose size is larger than 4 Gigabytes, you will not be able to do this and an error will appear. There are solutions to this problem.

    There are also restrictions on partition size - although FAT32 theoretically supports storage media up to 8 Terabytes, in Windows XP (and later) you will not be able to format a disk or partition larger than 32 Gigabytes in FAT32. This limitation was introduced by Microsoft in order to maintain optimal performance when working with this file system.

  • Today, this file system is successfully used on flash drives and drives to ensure maximum compatibility with the widest class of devices.

    Another advantage is the absence of redundant writing/reading of “technical data” during interaction with this file system. For Flash disks, which have a limited read/write resource for memory cells, this is undoubtedly a benefit.

NTFS file system - description, application and key properties

File system NTFS Today it is relevant and widespread. Having first debuted in Windows XP, it continues to be used in all modern versions of the Microsoft OS, including the most latest Windows 10.

Its developers did their best, endowing this file system with many features that were dictated by modern realities. For example, by recording technical information of all file operations carried out, it was significantly possible to increase the reliability of data safety in the event of a sudden loss of power to the storage device.

Also, the ability to set permissions on files and folders was added to NTFS, which significantly improves overall security when working in Windows. Don't forget about the possibility of creating shadow copies files and data during the operation of a system that actively uses Windows OS in order to ensure high performance during data backup, encryption and simply normal operation of the operating system.

Naturally, this is not a complete list of what the modern NTFS file system offers.

As mentioned above, this file system is standard for Windows XP and subsequent operating systems released by Microsoft. During the installation of the operating system, you will not even be able to select a file system - the hard drive or SSD will be formatted strictly in NTFS.

Due to the significant complication of the principles of file operation NTFS systems and some licensing issues, it has very limited support from other operating systems and devices.

For example, the MacOS operating system can only read data from media that uses NTFS, but cannot write data to media with this file system.

On Linux the situation is better. Although Linux normally can only read data from NTFS media, some endpoints Linux distributions support for recording on NTFS disk And.

As for standalone devices, game consoles (Sony PlayStation, Xbox 360), etc., then in most cases NTFS is not supported by them.

  • Compatibility: Fully supported in all modern versions of Microsoft OS. In Macintoshes (MacOS) only read is supported, but in Linux read and in some final distributions also write. As for other devices, in most cases it is not supported at all.
  • Restrictions: There are no restrictions on the number and size of files and folders.
  • Optimal scope of application: The file system was created with an eye to use for hard drives (and subsequently SSDs), mainly in the Windows environment.

ExFat file system - what it is, why it was created

ExFat(also called FAT64) is a file system that debuted in 2006, created for flash drives. During its development, the best of FAT32 was taken and its inherent limitations were eliminated. ExFat has no restrictions on the maximum file size that can be written to media with a given file system.

The situation has also been further improved by eliminating the excessive number of technical read/write operations in order to ensure maximum speed basic file operations with a minimum impact on memory cells in order to prevent and delay their wear as much as possible.

If we talk about compatibility, then the situation with it is much better when compared with the same NTFS. MacOS has full support for read/write operations, and there is also support from Linux, provided that several packages are installed from the repository.

As for external devices, then the situation with ExFat support is improving, but support on all devices definitely cannot be guaranteed.

  • Compatibility: Has full support on Windows starting from Windows XP, MacOS and Linux OS (you may need to install the support package from the repository).

    May not be supported on older standalone devices (MP3 players, cameras, etc.).

  • Restrictions: This file system does not have any restrictions on either the maximum file size or their number.
  • Optimal scope of application: Any flash drives and storage devices (MicroSD, microSDXC, USB Flash Drive, etc.) larger than 4 GB. A flash drive with this file system will demonstrate high speed performance and will last longer than if it uses NTFS.

Brief summary

To summarize what was said above, it turns out that the NTFS file system should be used for hard drives (HDD) and SSD drives that are installed inside the computer, and ExFat for external flash drives.
And FAT32 is optimally used for small flash drives (up to 4 Gigabytes), as well as flash drives that are used in older devices and do not understand ExFat.

That's all! See you in new materials! In order not to miss them, you should subscribe!

This file system is used by operating systems such as Windows NT/2000/XP. When installing NTFS, the disk is divided into two unequal parts: the first is allocated for the MFT (Master File Table - a common file table), called the MFT zone and occupies about 12% of the total disk size, the second part is occupied by your data itself. There is also a third zone, but more on that later. What kind of beast is this MFT? This is the basis of NTFS. It lies, as mentioned earlier, in the MFT zone, i.e. at the beginning of the disk. Each entry in MFT corresponds to a file and takes up about 1 Kb. At its core, this is a directory of all files located on the disk. It should be noted that any data element in NTFS is considered as a file, even MFT. The first 16 files (metafiles) in the MFT zone are a special caste. They contain service information, they have a fixed position and are inaccessible even to the operating system. By the way, the first of these 16 is the MFT file itself. A copy of the first three entries exists. Remember, I talked about the third zone, so that’s where it lies and with its position, so to speak, divides the disk in half. Why was this done? Yes, to be safe, in case of loss of information in the MFT file, you can always restore the information, and then it’s a matter of technology, as they say. All other files in the MFT zone can be located arbitrarily. It should be noted that theoretically there is nothing in the MFT zone except service files. But there are cases when there is no space left on the part of the disk that is reserved for the user: - (and then the MFT zone is reduced. Accordingly, space appears in the second half of the disk for recording data. When enough free space is freed up in this zone, MFT - the zone expands again. And here the problem appears. Ordinary files get into the MFT zone and it begins to fragment. This is not fatal, of course, but there is not much pleasant here either. But let’s return to our sheep, that is, metafiles. Each of them is responsible for any area of ​​work. They begin with the name symbol $ (those who are involved in programming know the icon). I will give an example of some of them:

  • MFT is nothing more than MFT itself
  • MFTmirr - the same copy that is in the middle of the disk
  • LogFile is a log file
  • Boot - as the name suggests, His Majesty boot sector
  • Bitmap - map of the free space of the partition

And so on. Information about metafiles is located in the MFT file. Difficult? There is such a thing. But all this garbage was invented to increase the reliability of NTFS and is justified. Let's move on. NTFS has virtually no restrictions on disk sizes (at least with current hard drive production technologies). The cluster size can vary from 512 b to 64 Kb, although its usual size is 4 Kb.

Let's talk now about the catalogue. This is a metafile with the notation $. . It is divided into parts, each of which contains the file name, its attributes and a link to the MFT file. And all the other information is already there. The directory is a binary tree. Let's try to figure out what kind of bullshit this is. In the directory, information about the data on the disk is located in such a way that when searching for a file, the directory is split into two parts and the answer lies in which part contains what you are looking for. The same operation is then repeated on the selected half. And so on until the desired file is found.

And now about the files. They don't exist as such. Normal, yes! There are so-called streams, or in normal Russian language - streams. That is, any unit of information represents several streams. One thread is the data itself, it is the main one. Other streams are file attributes. You can attach any other file to any file. Simply put, you can attach a completely new stream to streams of the same data and write new data there. But the information on the file size is taken based on the volume of the main stream. Empty or small files on disk are displayed only in metafiles. This was done in order to save disk space. In general, it should be noted that the concept of a file is much deeper and broader and it is quite difficult to describe all the properties. Please note that the maximum file name length can reach 255 characters.

In addition, NTFS files have such a wonderful attribute as compressed. Any file or even directory can be compressed. The compression operation itself occurs unnoticed, since its speed is quite high. Before the heap, so-called virtual compression is used, i.e. one part of the file can be compressed, but the other cannot. Compression is carried out in blocks. Each block is equal to 16 clusters.

NTFS uses data encryption. Thus, if you demolished the system and installed it again, you will not be able to read the encrypted files without appropriate authorization.

Now about logging. But first, let's define the concept of transaction. A transaction is an action that must be performed entirely (read correctly), otherwise it will not be performed at all. So, based on this garbage, if there is a failure while writing data to disk, no notes about the new file will be made in the metafiles. And the place where the recording was started will be considered clean. This is necessary to protect :-) from various types of hemorrhoids. In short, I completed the action to the end - I made a recording, it failed - and there is no need to record it. But it should be noted that the journaling function preserves the functionality of the file system, not your data.

And finally, NTFS has two more functions: Symbolic Links - the ability to create virtual directories, and Hard Links - support for multiple names for the same file. That's probably all.

On this moment At the time, this file system is the most common, although it is gradually losing its position after the release of Windows XP. All operating systems of the Windows family starting from Windows 95 OSR2 support FAT 32. So, FAT 32 (File Allocation Table) is a spreadsheet for file allocation. It is located almost at the very beginning of the disk. FAT disk structure:

    1. boot sectors of the main and additional partitions;
    2. boot sector of the logical disk;
    3. root directory;
    4. data area;
    5. cylinder for performing diagnostic read/write operations;

The main advantage of FAT 32 over FAT 16 is that instead of 16-bit entries, 32-bit entries are used. This in turn increases the number of clusters in the partition to 268,435,456 (in FAT - 65,536). When using FAT 32, the volume size is 2 Tb, and the size of one file can reach 4 Gb. A noticeable difference between FAT 32 and previous tables is that the root directory does not take up fixed disk space and can be of any size.

The cluster size when using FAT 32 in a 2 Gb partition with 5,000 files is 4 Kb (in FAT 16 - 32 Kb), the table will use up to 524,288 records. In this case, the table itself will weigh about 2 MB.

Comparison of NTFS and FAT 32.

Well, let's get down to the thankless task of comparing two file systems.

Advantages:

    1. Fast access speed to small files;
    2. The size of disk space today is practically unlimited;
    3. File fragmentation does not affect the file system itself;
    4. High reliability of data storage and the file structure itself;
    5. High performance when working with large files;

Flaws:

    2. Working with medium-sized catalogs is difficult due to their fragmentation;

Advantages:

    2. Low RAM requirement;
    3. Effective work with medium and small files;
    4. Lower disk wear due to fewer read/write head movements.

Flaws:

    1. Low protection against system failures;
    2. Ineffective work with large files;
    3. Limitation on the maximum volume of a partition and file;
    4. Reduced performance due to fragmentation;
    5. Reduced performance when working with directories containing a large number of files;

So, some thoughts. Both file systems store data in clusters whose minimum size is 512 b. Usually regular size cluster is 4 Kb. This is where the similarities probably end. Something about fragmentation: NTFS performance decreases sharply when the disk is 80 - 90% full. This is due to the fragmentation of service and work files. The more you work with such a busy disk, the stronger the fragmentation and the lower the performance. In FAT 32, fragmentation of the working area of ​​the disk occurs at earlier stages. The point here depends on how often you write/erase data. As with NTFS, fragmentation greatly reduces performance. Now about RAM. Volume itself spreadsheet FAT 32 can take up several megabytes of RAM. But caching comes to the rescue. What is written to the cache:

    1. The most used directories;
    2. Data about all files currently in use;
    3. Data about free disk space;

What about NTFS? Large directories are difficult to cache, and they can reach several tens of megabytes in size. Plus MFT, plus information about free disk space. Although it should be noted that NTFS still uses RAM resources quite economically. We have a successful data storage system; in MFT, each record is approximately 1 Kb. But still, the requirements for the amount of RAM are higher than for FAT 32. In short, if your memory is less than or equal to 64 Mb, then FAT 32 will be more effective in terms of speed. If it is more, the difference in speed will be small, and often none at all. Now about the hard drive itself. To use NTFS, Bus Mastering is required. What is this? This is a special mode of operation of the driver and controller. When using BM, the exchange occurs without the participation of the processor. The absence of a VM will affect system performance. In addition, due to the use of a more complex file system, the number of movements of the read/write heads increases, which also affects the speed. The presence of a disk cache has an equally positive effect on both NTFS and FAT 32.

Everyone who has ever installed an operating system has encountered the fact that at the stage of formatting the installation hard section disk, the program prompts you to select the file system type FAT or NTFS.

And those who happened to format a flash drive or other external storage device needed to decide between three file systems: FAT32, NTFS and exFAT. Most often, users choose the default formatting because they do not know what the difference is.

This article is addressed to those who want to fill this gap in their knowledge.

FAT file structure: principles and purpose

File structure or File system was developed in the 70s of the last century by Microsoft and represented a certain procedure for organizing space for storing and accessing data on computers and other digital devices.

The purpose of the functionality is to provide the user with convenient management of information stored on a disk or external gadget. The file system includes files, folders and directories, as well as a set of system tools that interact with them to perform the functions of read-write, create-delete, copy, name, etc. In addition, this structure organizes shared access to information between users and provides protection against unauthorized actions through encryption, operation in read-only mode, etc.

Structurally, the entire disk space area is divided into clusters, like a sheet of checkered paper. Each cell is a block, the size of which is set during formatting and must be a multiple of 2. The minimum size can be 512 bytes (for a flash drive), for hard drive it is 32 KB. One file can occupy several such clusters. You can figuratively imagine disk space as a notebook, where the cluster is a letter, the file is a word, and the file structure is the table of contents of the notebook.

When accessing a file, the operating system must find it in several clusters located in different places on the disk, thus forming a chain of clusters. Each cluster has its own label, which identifies it as one of three types:

  1. Free, ready to record data.
  2. Busy, which stores part of the information and has in the label data about the next cluster in the chain, while the latter is marked with a special label.
  3. BAD block is a cluster with errors that is no longer accessible after formatting.

The size of the label is determined by the type of file structure: for FAT32 it is 32 bytes.

The entire file system consists of the following parts:

  • the boot sector, which is located at the beginning of the disk, is activated after the OS boots and stores the partition parameters;
  • a file allocation table (“table of contents”) that stores cluster labels;
  • copies of the file allocation table to recover data if the file structure is damaged;
  • root directory;
  • data areas;
  • cylinder to perform read/write operations.

There are three types of FAT file systems: FAT12, FAT16 and FAT32. FAT has been replaced by NTFS, and exFAT is an extended version of FAT32 and is mainly used for flash drives.

Advantages and disadvantages of FAT32, NTFS and exFAT file structures

In order to decide on the choice of the most optimal file system for formatting, we will consider descriptions of all three options, focusing on the advantages and disadvantages of each.

FAT32

Among the three considered file structures FAT32 is the oldest. It replaced FAT16 and until recently was the most progressive. The release of FAT32 was timed to coincide with the release of the operating room Windows systems 95 OSR2 in 1996. Main distinctive features: 32-bit cluster addressing and size limitations: file no more than 4 GB and volume 128 GB.

Advantages

Despite some moral backwardness, FAT32 has a number of advantages over other file systems. Its main attraction is compatibility and versatility. FAT32 works with all versions of operating systems, including Windows (comparison of all versions), Linux and MacOS, and is suitable for any game consoles and other gadgets with USB port. Today it is used in all external drives (flash drives, CD cards) by default, since many old devices: PCs, laptops, set-top boxes with a USB input can only work with FAT32.

Other important advantages of the file system are: high-speed performance, low demands on the amount of RAM, productive work with medium and small files, and low disk wear due to smaller head movements. However, it is also subject to fragmentation, and periodic defragmentation will definitely not hurt.

Flaws

The main disadvantage of this file system is its size limitations. For clusters, it cannot be more than 64 KB, otherwise some applications may incorrectly calculate disk space.

The file size should not exceed 4 GB, so the maximum disk size for a cluster size for a 32 KB file allocation table would be about 8 TB.

When formatting a disk using ScanDisk, which is a 16-bit program, taking into account the FAT tables themselves and with a maximum cluster size of 32 KB, the volume size is limited to 128 gigabytes.

Considering that not many computer devices are equipped with a hard drive larger than 8 TB, this drawback will not be noticeable for most users. However, the fact that FAT32 works with files up to 4 GB in size is a significant disadvantage, since most high-quality video files in the modern 4K format today are larger than these 4 GB, and therefore are not compatible with this file system.

Besides its size limitations, FAT32 has other disadvantages. It does not support long file names, which is not very convenient for users who want to identify files logically based on their contents. There are complaints about the security system (an additional anti-virus scanner would not hurt) and file protection in case of failures (features of hard drives), as well as low speed when working with directories containing many files.

Thus, FAT32 is more suitable for portable, low-capacity devices and older computers. The latest versions of Windows can no longer be installed on a disk formatted with the FAT32 system; reformatting to NTFS is necessary.

The main use of the FAT32 file system today is in portable flash drives and SD cards (features), which contain few files and are compatible with a variety of digital devices.

NTFS

This file system was developed by Microsoft in 1993 and introduced with Windows NT 3.1. In the title itself new technology file system, which means new technology file system, lies its progressive essence.

After formatting a disk in NTFS, it is divided into three zones:

  • MFT - zone or general file table (Master File Table), where information about files and directories is stored;
  • user data;
  • metafiles containing service information.

Each of the metafiles is responsible for certain area. For example, LogFile is a logging file in which all operations are recorded in the log, Boot is the boot sector, Bitmap controls the free space in the partition, etc. This structure reliably protects files from any failures, be it OS freezes or power outages.

Advantages

Unlike FAT32, this file structure has virtually no restrictions on the size of files and directories. The cluster size can vary from 512 bytes to 64 KB, with the optimal size being 4 KB.

Thanks to many significant improvements to improve security, such as support for file access rights, HPFS quotas, encryption, journaling, access control and auditing, hard links, etc., NTFS is ideal for formatting a disk for the system area. Other hard drive partitions can also be formatted in this system, since NTFS allows optimal use of disk space when there are many small files.

The advantage of this file organization is the fast access speed to small files, high performance when working with large files, as well as the ability to use long file names.

Flaws

The main disadvantage of the NTFS system is its incompatibility with all operating systems below Windows NT, as well as limitations in compatibility with other operating systems. So, Mac OS reads files from NTFS disks, but cannot write them, the same situation with compatibility Linux files. The most popular gaming consoles Playstation and Xbox 360 do not work with NTFS, only Xbox One can interact with it.

Disadvantages of NTFS also include high RAM requirements, lower speed compared to FAT32, and difficulty managing medium-sized directories.

Thus, it is more advisable to use the NTFS file structure on hard drives, including SSDs running the latter Windows versions, starting from NT.

exFAT

This file system is the latest to be reviewed in terms of release time. It appeared in 2008 with regular updates to Windows XP and is, in fact, an extended version of FAT32.

The main goal of the developers is to create a productive, convenient and universal file structure for portable storage devices: flash drives, SD cards and removable hard drives.

Advantages:

  • Simple organization without specialized features and restrictions on file and partition sizes.
  • Excellent compatibility with all Windows operating systems, as well as Mac OS and Linux. In the latter option, installation of additional software is required.
  • Support from all modern Apple devices, as well as Xbox One and Playstation 4 game consoles.

The main disadvantage of the exFAT file organization is Microsoft's licensing policy, which prohibits its free use in the public domain.

The most optimal file structure

Having considered the descriptions of three popular file systems, we can draw the following conclusions:

  • For computer devices With operating system Above Windows NT, it would be more appropriate to format the hard drive in the NTFS system;
  • for older devices, as well as for the purpose of compatibility with various modern digital gadgets, the best option would be to choose FAT32;
  • for any removable media it would be ideal to use the system

And lastly: information about what file structure is implemented on your disks can be found in the “General” tab (right mouse button “Properties”).