26.05.2022

file systems. What is FAT and NTFS? Features of FAT32, NTFS and exFAT file systems Types of fat ntfs file systems


Each of us at least once in our lives formatted a flash drive, SD card, external or internal HDD and probably remembers that before formatting any of the above devices, the Windows operating system always asks the question - which file system do you want to format your device with: FAT32, NTFS or exFAT?

Of course, most users do not know the difference between them, and usually choose the option that is set by default. And all because Windows, asking this question, does not explain the difference between them in any way. In this article, we will try to explain it to you in an understandable language and tell you how the FAT32 file system differs from NTFS and exFAT.

FAT32 is the oldest of the file systems under consideration and is most often used on portable flash drives - flash drives or SD cards.

NTFS is used by Windows as the primary file system for the drive on which this operating system is installed, and is also great for other built-in drives and partitions hard drive computer running Windows.

exFAT is a more modern analogue of the legacy FAT32 system and it supports more devices than NTFS, but still not as many as the "classic" FAT32.

Now let's take a closer look at each of these file systems.

FAT32 file system

FAT32 is the oldest file system considered in this article. It began to be actively used starting with Windows 95 and came to replace an even more outdated system - FAT16.

The great age of this file system has its advantages and disadvantages.

The advantages in this case include the fact that FAT32 has become a kind of standard and is still used in all removable media by default. If you buy a flash drive or SD card today, it will have the FAT32 file system installed "from the factory". This was done primarily so that your removable media could support not only modern computer and gadget, but also older devices and game consoles that have USB port and can only work with the FAT32 file system.

However, due to the age of this system, it also has some disadvantages, the main of which is the limitation on the size of the file and the entire volume. Each individual file in this file system cannot be larger than 4 gigabytes, and the entire partition with the FAT32 file system cannot be larger than 8 terabytes.

And if you can still put up with the second minus (so far, few people use drives larger than 8TB), then the file size limit is a rather serious minus - most high-quality videos now no longer fit into 4GB, especially if they are in a modern format 4K.

However, while this file system is still quite suitable for portable devices (like flash drives and SD cards, which host many small files), it is no longer suitable for a computer hard drive. First of all, it lacks some of the security features found in the more modern NTFS file system, and partly because of this, you will no longer be able to install a modern version of Windows on a FAT32 drive, you will need to reformat it to NTFS.

FAT32 Compatibility

Devices with the FAT32 file system are the most versatile and are compatible with all versions of Windows, Mac OS, Linux operating systems, any game consoles and, in general, almost everything that has a USB port.

FAT32 restrictions

The main disadvantage of this file system is file and volume size limits - the maximum file size cannot exceed 4 GB, and the maximum partition size is limited to 8 TB.

Application of FAT32

The main area of ​​​​use of this file system is external storage drives, which are not supposed to store large files and which require maximum compatibility with as many different devices as possible.

NTFS file system

NTFS- this is a more modern and technologically advanced file system, as evidenced even by the decoding of the abbreviation of its name -" new technology file system". Most of all, the Windows operating system loves it, which in general is not surprising - after all, both of them are developed by Microsoft.

Starting with the version of the operating system from Microsoft called XP, in which the NTFS system first became standard, when installing Windows, a dialog box will definitely ask you to format the system partition to this particular file system. At the moment, it is believed that you, theoretically, will not have to worry about the limitations of the NTFS file system for many years to come.

In addition to the absence of serious restrictions on the size of the file and partition, NTFS has several additional advantages, such as: support for file permissions (to improve data security), journaling of changes (to restore the file structure in case of failure), encryption, disk quotas, hard links , and other modern features that make NTFS ideal for a system drive.

That is why the partition of your disk on which the Windows operating system is installed must be formatted in NTFS. If you are going to install programs on other partitions of the same disk or on other hard disks, they must also have an appropriate filesystem.

Unfortunately, NTFS is not compatible with most other operating systems, as it was designed for the requirements of the Windows operating system. All versions of the Microsoft operating system from XP to the latest Windows 10 work perfectly with it, but other operating systems have significant limitations when working with it.

For example, Mac OS can only read data from NTFS disks, but cannot write to them. Some rare Linux distributions may be able to write to NTFS drives, but most are still limited to reading information. None of the Playstation versions can work with NTFS, just like the Xbox 360 from Microsoft, and only the new Xbox One supports this file system.

NTFS Compatibility

This file system works great with all the latest versions of the operating system. Windows systems Since XP, it has write restrictions on Mac OS and Linux, and does not work with most other devices, except perhaps the Xbox One.

NTFS limitations

Limits on the size of files or partitions in NTFS should not rest against the limits for a long time, so we can say that at the moment there are none.

NTFS application

The use of this file system is reasonable only on hard drives and SSDs on which the Windows operating system is installed, since only with it this format reveals all its advantages.

exFAT file system

exFAT was first introduced in 2008 and is the most modern of the file systems discussed in this article, its support has been added to Windows since version XP through OS updates.

File system exFAT was created and optimized for use on external drives - flash drives, SD cards and external hard drives, and is intended to replace the outdated FAT32 system. It is the lightest and simplest file system due to the absence of various specialized features inherent in NTFS, as well as the almost complete absence of file and partition size restrictions that FAT32 has.

Also, exFAT has better compatibility with various operating systems than NTFS, and devices with it are perfectly readable and rewritable both on Windows and Mac OS, and on Linux (provided that some software is installed).

Since exFAT is supported by Mac OS by default, it is likely to be supported by most other modern devices that Apple devices work with, such as digital cameras.

Modern versions of game consoles, such as the Xbox One and Playstation 4, also support devices with the exFAT file system, unlike their previous versions(Xbox 360 and Playstation 3).

exFAT Compatibility

exFAT works great with all modern versions of Windows (starting with XP) and Mac OS. To work with Linux, you will need to install additional software. There are many more different devices that support this file system than NTFS, but some of them (mostly older versions) can still only work with FAT32.

exFAT restrictions

Also, as in the case of NTFS, there are no realistic limits on the size of a file or partition in the exFAT system yet.

exFAT application

This file system is great for use on a variety of removable media that can have files larger than 4 GB ( external rigid disks, large flash drives). If all the devices you work with are up-to-date, you may very well ditch FAT32 on removable drives in favor of exFAT.

Summing up, we can draw the following conclusions: NTFS is great for system hard disk with Windows OS, exFAT is best used on removable media, and FAT32 should only be used if you want maximum compatibility with all the variety of your devices.

Prior to the advent of the Microsoft Windows NT operating system, personal computer users rarely had the problem of choosing a file system. All owners of operating systems (OS) MS-DOS and Microsoft Windows used one of the varieties of the file system called FAT (FAT-12, FAT-16 or FAT-32).

Now the situation has changed. When installing Microsoft Windows NT/2000/XP OS, when formatting a disk, you need to make a choice between three file systems - FAT-16, FAT-32 or NTFS.

In this article, we will talk about internal arrangement listed file systems, consider their inherent disadvantages and advantages. Armed with this knowledge, you will be able to make an informed choice in favor of a particular file system for Microsoft Windows.

Briefly about the FAT file system

The FAT file system appeared at the dawn of the development of personal computers and was originally intended for storing files on floppy disks.

Information is stored on disks and floppy disks in portions, in sectors of 512 bytes. The entire space of a floppy disk was divided into regions of a fixed length, called clusters. A cluster may contain one or more sectors.

Each file occupies one or more clusters, possibly non-contiguous. File names and other information about files, such as size and date of creation, are located in the initial area of ​​the floppy disk dedicated to the root directory.

In addition to the root directory, other directories can be created in the FAT file system. Together with the root directory, they form a tree of directories containing information about files and directories. As for the location of file clusters on the disk, this information is stored in the initial area of ​​\u200b\u200bthe diskette, called the file allocation table (File Allocation Table, FAT).

For each cluster, the FAT table has its own individual cell, which stores information about how this cluster is used. Thus, the file allocation table is an array containing information about clusters. The size of this array is determined by the total number of clusters on the disk.

The directory stores the number of the first cluster allocated to a file or subdirectory. The numbers of the remaining clusters can be found using the FAT file allocation table.

When developing the FAT table format, the task was to save space, because The floppy disk has a very small size (from 180 KB to 2.44 MB). Therefore, only 12 binary digits were allocated to store the cluster numbers. As a result, the FAT table was packed so tightly that it occupied only one sector of the floppy disk.

The FAT table contains critical important information about the location of directories and files. If the FAT table becomes corrupted as a result of hardware, software or malware failure, access to files and directories will be lost. Therefore, for the purpose of safety net, two copies of the FAT table are usually created on the disk.

Various versions of FAT

After the advent of large-capacity hard disks (in those days, disks of 10-20 MB in size were considered large), the number of clusters increased, and 12 bits were not enough to store their numbers. A new 16-bit file allocation table format was developed, where two bytes were allocated to store the number of one cluster. The old file system designed for floppy disks became known as FAT-12, and the new one became FAT-16.

The enlarged FAT-16 table no longer fits in one sector, however, with large disk volumes, this drawback did not play a significant role. As before, for insurance, two copies of the FAT table were stored on the disk.

However, when the volume of the disk began to be measured in hundreds of MB and even in gigabytes, the FAT-16 file system again became inefficient. In order for cluster numbers to fit into 16 digits, when formatting large disks, you have to increase the cluster size to 16 KB or even more. This caused problems when it was necessary to store a large number of small files on the disk. Since file storage space is allocated in clusters, even a very small file has to allocate too much disk space.

As a result, another, apparently, the last attempt to improve the FAT file system was made - the cell size of the file allocation table was increased to 32. This made it possible to format disks of hundreds of MB and units of GB using a relatively small cluster size. The new file system became known as FAT-32.

Standard 8.3

Before the advent of Microsoft Windows 95, personal computer users were forced to use the very inconvenient "8.3 standard" for naming files, in which the file name had to consist of 8 characters plus 3 extension characters. This limitation was imposed not only by the programming interface of the MS-DOS operating system, but also by the directory entry structure of the FAT file system.

After modifying the structure of directory entries, the limit on the number of characters in a file name was practically removed. The filename can now be up to 255 characters long, which is obviously sufficient in most cases. However, this modified FAT file system became incompatible with the operating system. MS-DOS system, as well as with the Microsoft Windows shell versions 3.1 and 3.11 running in its environment.

You can read more about the formats of internal FAT structures in our article "Data Recovery in FAT Partitions" published on this site.

FAT file system limitations

When deciding whether to use the FAT file system to format a drive, you should be aware of its inherent limitations. These restrictions concern, first of all, the maximum size of a FAT drive, as well as the maximum size of a file located on this drive.

Maximum size FAT-16 logical drive is 4 GB, which is very small by modern standards. Microsoft, however, does not recommend creating FAT-16 disks larger than 200 MB, as thus the disk space will be used very inefficiently.

Theoretically, the maximum size of a FAT-32 drive can be 8 TB, which should be enough to deploy any modern application. This value is obtained by multiplying maximum number clusters (268 435 445) by the maximum cluster size allowed in FAT-32 (32 KB).

However, in practice the situation looks a little different.

Due to internal limitations, the ScanDisk utility in Microsoft 95/98 is unable to work with disks larger than 127.53 GB. A year ago, such a limitation would not have caused problems, but today inexpensive 160 GB disks have already appeared on the market, and soon their volume will be even larger.

As for the new Microsoft Windows 2000/XP operating systems, they are not able to create FAT-32 partitions larger than 32 GB. If you need partitions of this size or more, Microsoft will suggest that you use the NTFS file system.

Another significant limitation of FAT-32 is imposed on the size of files - it cannot exceed 4 GB. This limitation will affect, for example, when recording video clips to disk or when creating large database files.

A FAT-32 directory can store a maximum of 65534 files.

Disadvantages of FAT

In addition to the limitations discussed above, the FAT file system has other disadvantages. The most important seems to be complete absence means of access control, as well as the possibility of losing information about the location of all files after the destruction of a fairly compact FAT table and its copy.

By booting the computer from a system floppy disk, an attacker can easily access any files stored on disks with the FAT file system. It will not be difficult for him to then copy these files to a ZIP device or some other external storage medium.

When using FAT on server disks, it is impossible to provide reliable and flexible differentiation of user access to directories. That is why, and also because of its low fault tolerance, FAT is not commonly used on servers.

The presence of compact FAT file allocation tables makes this file system a vulnerable target for computer viruses- it is enough to destroy the initial fragment of the FAT disk, and almost all data will be lost.

NTFS file system

The modern NTFS file system, developed by Microsoft for its Microsoft Windows NT operating system, is devoid of the limitations and disadvantages of FAT. Since its inception, the emerging NTFS file system has undergone several enhancements, the most recent of which (at the time of this writing) has been made in Microsoft Windows XP.

In the NTFS file system, all file attributes (name, size, location of file extents on disk, etc.) are stored in a hidden system file$MFT. To store information about each file (and directory) in $MFT is allocated from one to several KB. With a large number of files stored on disk, the size of the $MFT file can reach tens or even hundreds of MB.

Small files (on the order of hundreds of bytes) are stored directly in $MFT, which significantly speeds up access to them.

Note, however, that the overhead of NTFS for storing system information, although it exceeds the overhead of FAT, is still not very large compared to the volume of modern disks. Due to the fact that the $MFT file is usually located closer to the middle of the disk, the destruction of the first tracks of an NTFS disk does not lead to such fatal consequences as the destruction of the initial areas of a FAT disk.

The NTFS file system has many features not found in FAT. They allow you to achieve much more flexibility, reliability and security compared to FAT.

Let's list some of the most interesting features of NTFS in modern versions.

Access control tools

NTFS access control tools are quite flexible and allow you to control access at the level of individual files and directories, providing (or blocking) access to them to individual users or groups of users.

Although at first glance it may seem that access control tools are needed only for file servers, they will also be required if several users have access to the computer.

File encryption

The access control tools mentioned above will be useless if the physical NTFS disk falls into the hands of an attacker. Using modern utilities, the contents of such a disk can be easily read in any operating system environment - DOS, Microsoft Windows or Linux.

In order to protect user files from unauthorized access, Microsoft Windows 2000/XP operating systems provide additional encryption of files stored on NTFS partitions. And although the strength of such encryption may not be very high, it is quite sufficient in most cases.

Software RAID

Using NTFS, you can create a so-called software RAID array 1 (Mirrored set). This array, made up of two physical or logical disks of the same size, allows you to duplicate (or, as they say, "mirror") files.

Such an array can save your files in the event of a physical failure of one of the disks that make up the array, so it is often used to increase the reliability of the disk system.

Volume Sets

The NTFS file system allows you to combine several partitions located on one or more physical disks into one logical volume. This may be necessary, for example, to store large database files that do not fit on one physical disk, or to create a directory with a total volume of files that exceeds the size physical disk.

Sets created from several partitions or physical disks are called Volume Set (in Microsoft Windows NT terminology) or Spanned Volume (in Windows 2000/XP terminology).

Packing files

To save disk space, you can use the ability of NTFS to pack (compress) files. In addition, NTFS allows you to create so-called sparse (sparse) files that contain areas of null data. Such files can be large but take up little disk space because only the significant bytes of the file are actually stored.

Note that packing files will result in some slowdown. This circumstance, however, will not always matter. For example, office documents can be packed without a noticeable decrease in speed, but the same cannot be said about database files that are accessed simultaneously by a large number of users. With relatively inexpensive, high-capacity discs on the market, packaging media should only be used when really needed. This, however, applies to other NTFS features as well.

Multithreaded files

If necessary, several streams of information can be stored in one file recorded on an NTFS disk. This allows, in particular, to supply document files with additional information, store several versions of documents in one file (for example, in different languages), store in separate streams of one file programming code and data, etc.

hard ties

Hard links (hard links) allow you to assign several different names to one physical file by placing these names (ie links to the file) in different directories. Deleting a link does not delete the file itself. Only when all links of the file are destroyed will the file itself be deleted.

Note that such features are typical for file systems used in Unix-like operating systems, for example, in Linux, FreeBSD, etc.

Override points

NTFS system objects such as reparse points allow you to override any file or directory. In this case, for example, rarely used overridden files or directories can actually be stored on magnetic tape, loaded to disk only when necessary.

Transitions

Using NTFS transitions, you can mount another hard drive or CD into the drive's directory. This feature originally existed in the file systems of Unix-like operating systems.

Disk space quota

The NTFS file system, used in Microsoft Windows 2000/XP, allows you to quote or limit the disk space available to users. This feature is especially useful when creating file servers.

Change Logging

In the course of its work, the operating system performs various actions on files (creation, modification, deletion). All such changes are stored in a special journal created on an NTFS volume and can be used by programs Reserve copy, indexing systems, etc. Logging changes increases the reliability of the file system, allowing in some cases to continue working after non-critical failures of the operating system and hardware. Although, of course, most serious failures result in the need to recover data from backup or using special data recovery utilities.

NTFS limitations

Despite the abundance of features, the NTFS file system also has some limitations. However, in most cases they do not play a significant role.

The maximum size of an NTFS logical drive is approximately 18,446,744 TB, which is obviously enough for all modern applications, as well as applications that will appear in the near future. The maximum file size is even larger, so this limitation is also not significant.

There is no limit to the number of files stored in a single NTFS directory, so this also has an advantage over FAT.

Comparison of NTFS and FAT for file access speed

From a perspective point of view, functionality, security and reliability NTFS is far ahead of FAT. However, comparing the performance of these file systems does not give an unambiguous result, since performance depends on many different factors.

Because FAT is much simpler in operation and internal structures than NTFS, FAT is likely to be faster when dealing with small directories. However, if the contents of the directory are so small that they fit entirely within one or more $MFT file entries, or vice versa, if the directory is very large, NTFS will "win".

The palm will most likely go to NTFS when searching for non-existent files or directories (because it does not require a complete scan of the contents of the directory), when accessing small files (on the order of hundreds of bytes), and also in case of severe disk fragmentation.

To increase the performance of NTFS, you can increase the cluster size, but this can lead to wasteful use of disk space when storing a large number of files that are larger than 1-2 KB and amount to tens of KB. By increasing the cluster size to 64 KB, you can get the maximum performance improvement, but you will have to forego packing files and using defragmentation utilities.

Packing files located on small disks (about 4 GB) may increase performance, while compressing large disks may decrease performance. In any case, the packaging will cause additional load on the CPU.

So what to choose - FAT or NTFS?

As you can see, NTFS has numerous advantages over FAT, and its limitations are negligible in most cases. If you are faced with choosing a file system, consider using NTFS first and FAT second.

What might be the barriers to replacing FAT with NTFS?

The most serious obstacle is the need to use Microsoft Windows NT/2000/XP. For normal operation this OS needs at least 64 MB random access memory and a processor with a clock frequency of at least 200-300 MHz. However, these requirements are not met only by very old computers that are not capable of running modern versions of Microsoft Windows.

If your computer can run under Microsoft Windows 2000/XP, and you do not have a single application designed exclusively for Microsoft Windows 95/98/ME, we recommend that you switch to a new operating system as soon as possible, replacing this FAT to NTFS.

At the same time, you will also get a noticeable increase in the reliability of work, because. after installing all required fix packs ( service pack), as well as the correct versions of peripheral device drivers, Microsoft Windows 2000/XP will run very stably.

In some cases, you have to combine several file systems within one physical disk. For example, if your computer has three operating systems Microsoft Windows ME, Microsoft Windows XP and Linux, you can create three file systems - FAT, NTFS and Ext2FS. The first of them will be "visible" when working in Microsoft Windows ME and Linux, the second - only in Microsoft Windows XP, and the third - only in Linux (note that in LINUX there is also the possibility of accessing NTFS partitions).

But if you are creating a server (file, database or Web) based on Microsoft Window NT/2000/XP, then NTFS is the only reasonable choice. Only in this case it will be possible to achieve the necessary stability, reliability and security of the server.

There is also a generally accepted (and, in our opinion, erroneous) opinion that home computer users do not need either the Microsoft Window NT/2000/XP operating system or the NTFS file system.

Of course, if the computer is used exclusively for gaming, for compatibility reasons, it is best to install Microsoft Windows 98/ME and format the drives in FAT. However, if you work not only in the office, but also at home, it is better to use modern, professional and reliable solutions. This will allow, in particular, to organize protection against intrusion on your computer via the Internet, restrict access to directories and files with critical data, and also increase the chances of successful information recovery in the event of various kinds of failures.

There are many ways to store information and programs on a hard drive. A very well-known system that saves various information in the form of files, grouping them into folders with a unique assignment. However, few people thought about how the physical storage of information on the media actually takes place.

In order for information to be stored on a physical medium, it must be prepared for use in a computer operating system. The operating system allocates free disk space to save information. To do this, you need to divide the disk into small containers - sectors. Formatting a disk at a low level allocates a certain size for each sector. The operating system groups these sectors into clusters. Top-level formatting sets all clusters to the same size, typically between 2 and 16 sectors. In the future, one or more clusters are allocated for each file. The cluster size depends on the operating system, disk capacity, and the required speed.

In addition to the area for storing files on the disk, there are areas necessary for the operation of the operating system. These areas are designed to store boot information and information to map file addresses to physical locations on the disk. The boot area is used to start the operating system. After BIOS boot the boot area of ​​the disk is read and executed to start the operating system.

FAT file system

The FAT file system appeared along with the operating system. Microsoft system DOS, after which it was improved several times. It has FAT12, FAT16 and FAT32 versions. The name FAT itself comes from the file system's use of a kind of database in the form of a "file allocation table" (File Allocation Table), which contains an entry for each cluster on the disk. The version numbers refer to the number of bits used in the item numbers in the table. Therefore, the file system has a limit on the supported disk size. In 1987, it did not support disks larger than 32 MB. WITH advent of Windows 95 came out a new version FAT32 file system with theoretical support for drives up to 2 TB. Persistent problems with support for large disks appear due to a fixed number of elements, limited by the number of bits used in determining the position of the cluster. For example, the FAT16 version does not support more than 2 16 or 65536 clusters. The number of sectors in a cluster is also limited.

Another problem with large disks was the inability to use the huge space allocated for small files. Due to the fact that the number of clusters is limited, their size was increased in order to cover the entire capacity of the disk. This leads to inefficient use of space when storing most files that are not a multiple of the cluster size. For example, FAT32 allocates 16 KB clusters for disk partitions ranging from 16 GB to 32 GB. To store a 20 KB file, you will need two 16 KB clusters, which will occupy 32 KB of disk space. 1 KB files take up 16 KB of disk space. Thus, on average, 30-40% of the disk capacity is wasted for storing small files. Partitioning a disk into small partitions allows you to reduce the size of the cluster, but it is not used in practice for disks with a capacity of more than 200 GB.

File fragmentation is also not a small problem of the file system. Since a file may require several clusters to locate, which may not be physically consecutive, the time it takes to read slows down programs. Therefore, there is a constant need for.

NTFS file system

In the early 1990s, Microsoft began developing completely new software designed for environments with more resource consumption than typical home users. For the needs of business and industry, the resources provided by DOS-based Windows operating systems have become insufficient. Microsoft Corporation, together with IBM, worked on the OS / 2 operating system with the HPFS file system (High Performance File System is a high performance file system). Corporate development did not bring success and soon each company again went its own way. Microsoft developed various versions of the Windows NT operating system that Windows 2000 and Windows XP are based on. Each of them uses its own version of the NTFS file system, which continues to evolve.

NTFS (New Technology File System - "file system new technology”) is the standard file system for Windows NT-based operating systems. It was designed to replace FAT. NTFS is more flexible than FAT. Its system areas store mostly files rather than fixed structures like FAT, allowing them to be modified, expanded, or moved during use. A simple example is the Master File Table (MFT). MFT is a kind of database with various information about files on a disk. Small files (1 KB or less) can be stored directly in the MFT. For large files, NTFS allocates clusters, but unlike FAT, the cluster size usually does not exceed 4 KB, and the built-in compression method eliminates problems with unused space allocated for files. And in NTFS you can use .

The NTFS file system is designed for a multi-user environment and has built-in security and access control mechanisms. For example, operating systems Windows 2000 and Windows XP (except "Home Edition") allow you to set access permissions for individual files and encrypt them. However, a high level of security complicates the work of ordinary users with a computer. You must be extremely careful when setting passwords and file permissions so as not to lose important data.

File management systems.

File system FAT. File systems VFATAndFAT32.

1. Areas of a logical drive

2. Boot sector

3. File Allocation Table

4. Root directory

5.VFAT file system

6.FAT32 file system

In the FAT file system, the disk space of any logical drive is divided into two areas:

system area and

the data area.

System area is created and initialized when formatting, and subsequently updated when manipulating the file structure.

The system area consists of the following components:

· the boot sector containing the boot record (boot record) ;

Reserved sectors (they may not be);

· file allocation tables (FAT, File Allocation Table);

Root directory (ROOT) .

These components are located on the disk one after another.

Data area contains directory files subordinate to the root.

Unlike the system area, the data area is accessible through the DOS user interface.

boot sector

Formation boot record occurs during formatting (for example, FORMAT). The format of the boot sector depends on the OS and even on the version.

The boot sector is the very first on a logical drive. It contains a boot record.

The boot record consists of two parts:

Disk parameter block - often called. BIOS Parameter Block (BPB) or Extended BPB (for older OS versions)

OS bootstrap programs (system bootstrap).

The first two bytes of the boot record are the command to unconditionally jump to the system loader - JMP 3Eh . In the third byte - NOP (90h).

This is followed by a block of disk parameters, and after it - the OS loader.

The disk parameter block contains the following information

sector size,

the number of sectors in the cluster,

the number of reserved sectors,

the number of FAT copies,

the maximum number of ROOT elements,

the number of sectors in the FAT table,

the number of sectors per track,

Volume label

file system name

and other parameters (byte-description of the medium at offset 0Ah = F8H- railway of any capacity; F0-floppy disk 1.44, 3.5’’).

Boot records of various operating systems usually differ in the structure of the parameter block. Some have additional fields.

We will get acquainted with the boot record in detail in the laboratory work.

Between the boot sector and FAT there may be reserved sectors that are service for the file system or are not used. The number of reserved sectors is defined in BPB. (In format view - Reserved sectors at beginning - if =1, then it is MBR)

To view and edit, as well as save and restore a boot record, you can use utilitydisk editor.

File Allocation Table

T file allocation table (File Allocation Table - FAT) is essentially a map of the data area.

The data area is divided into so-called clusters. A cluster is one or more contiguous sectors of a data area. On the other hand, a cluster is the smallest addressable unit of disk space allocated to a file. Those. a file or directory occupies an integer number of clusters. To create and write a new file to disk, the operating system allocates several free disk clusters for it. These clusters do not have to follow each other. For each file, a list of all cluster numbers that are provided to this file is stored.

On floppy disks, the cluster occupies one or two sectors, and on hard disks, depending on the size of the partition:

for partitions with a capacity of 16-127 MB - 4 sectors in a cluster (cluster size - 2 KB);

for partitions with a capacity of 128-255 MB - 8 sectors in a cluster (4 KB);

for partitions with a capacity of 256-511 MB - 16 sectors in a cluster (8 KB);

for partitions with a capacity of 512-1023 MB - 32 sectors in a cluster (16 KB);

for partitions with a capacity of 1024-2047 MB ​​- 64 sectors in a cluster (32 KB).

Splitting a data area into clusters instead of using sectors allows you to:

· reduce the size of the FAT table ;

Reduce file fragmentation

Reduces the length of file chains Þ speed up file access.

However, a cluster size that is too large leads to inefficient use of the data area, especially in the case of a large number of small files (after all, an average of half a cluster is lost for each file).

In modern file systems (FAT32, HPFS, NTFS) this problem is solved by limiting the cluster size (maximum 4 KB)

Each element of the FAT table (12, 16, or 32 bits) corresponds to one disk cluster and characterizes its state: free, busy, or a bad cluster.

· If the cluster is allocated to any file (ie, busy), then the corresponding FAT element contains the number of the next file cluster;

· the last cluster of the file is marked with a number in the range FF8h - FFFh (FFF8h - FFFFh);

· if the cluster is free, it contains the zero value 000h (0000h);

· A cluster that is unusable (failed) is marked with the number FF7h (FFF7h).

Thus, in the FAT table, clusters belonging to the same file are linked into chains.

First element of FAT describes the boot sector environment. Its first byte is the same as the medium descriptor byte of the storage medium (offset 0ah- see Table 4) and is equal to 0F0h for flexible magnetic 3.5 dm. disk or 0F8h for hard drive. The next 5 bytes (7 bytes) for the 12-bit (16-bit) format contain the value 0FFh .

The file allocation table is stored immediately after the boot record of the logical disk, its exact location is described in a special field in the boot sector.

It is stored in two identical copies that follow each other. When the first copy of the table is destroyed, the second is used.

Due to the fact that FAT is used very heavily when accessing a disk, it is usually loaded into the RAM (into the I / O buffer or cache) and remains there for as long as possible.

The main disadvantage of FAT is slow file handling. When creating a file, the rule works - the first free cluster is selected. This leads to disk fragmentation and complex file chains. Hence the slowdown in working with files.

To view and edit the FAT table, you can use utilitydisk editor.

Root directoryROOT

Detailed information about the file itself is stored in another structure called the root directory. Each logical disk has its own root directory (ROOT, English - root).

Root directory describes files and other directories. The directory element is a file descriptor (descriptor).

The descriptor of each file and directory includes it

name (8 bytes)

extension (3)

date of creation or last modification (2)

time of creation or last modification (2)

attributes (1) (archive, directory attribute, volume attribute, system, hidden, read-only)

file length (for directory - 0) (4)

a reserved field that is not used (10)

· the number of the first cluster in the chain of clusters assigned to the file or directory; having received this number, the operating system, referring to the FAT table, will also find out all the other file cluster numbers (2 bytes).

So, the user launches the file for execution. The operating system looks for a file with the desired name by looking at file descriptions in the current directory. When the required element is found in the current directory, the operating system reads the number of the first cluster given file, and then determines the rest of the cluster numbers from the FAT table. Data from these clusters is read into RAM, combined into one continuous section. The operating system transfers control to the file, and the program starts running.

To view and edit the ROOT directory, you can also use utilitydisk editor.

Comment. Recently, the volumes of disk mechanisms have greatly exceeded the maximum allowable size acceptable for FAT - 8.4 GB. This limit is explained by the maximum possible values ​​in the address of the sector, for which only 3 bytes are allocated. Therefore, in the vast majority of cases, when working in a Windows system environment, FAT is not used (either FAT32 or NTFS is used).

File systemVFAT

The VFAT (virtual FAT) file system first appeared in Windows for Workgroups 3.11 and was designed for file I/O in protected mode.

This file system is used in Windows 95. It is also supported in Windows NT 4.

VFAT is Windows95's "native" 32-bit file system. It is controlled by the VFAT.VXD driver.

Manages various file systems and applications installed file system manager -Installable File Systems Manager.

VFAT uses 32-bit code for all file operations and can use 32-bit protected mode drivers.

BUT, the file allocation table entries remain 12- or 16-bit, so the same data structure (FAT) is used on the disk. Those. f table formatVFAT is the same, just like the FAT format.

VFAT along with "8.3" names supports long filenames. (VFAT is often said to be FAT with support for long names).

There is a special mechanism for converting long names into short ones and vice versa.

You remember that the length of the name for DOS is subject to the “8.3” rule, that is, the length of the name should not exceed 8 characters, A extensions - 3. Main Feature file system Windows 95 for the user is that maximum filename length in Windows 95 can be up to 256 characters, including spaces. The length of the file name is limited by the path to the file: the total length of the path and file name cannot exceed 260 characters.

When creating a file inWindows95 gives it two names at once - long and short (8.3). A short name is formed from a long one by removing spaces and symbols / : * ? “ “< >I. For an eight-character file name, the first six remaining characters of the long name, the “~” (tilde) character, and the serial number are used. A three-letter extension uses the first three characters after the last dot in the long filename.

For example, short names for files (in the following order)

Article about Windows 95.DOS

Next article about Windows 95.DOS

Article about Windows NT.DOS

Microsoft Office.HTML

Microsoft Windows. HTML

will look like this

At the same time, in the ROOT structure, along with the usual descriptor (called an alias) for a file or directory, special descriptors are created, in which the long name is stored. For special descriptors, the Read Only (read-only), System (system), Hidden (hidden), Volume Label (Volume Label) attributes are set. The number of special descriptors depends on the length of the name.

The special descriptor refers to cluster number O. The real number of the first cluster allocated to a file or directory is in the standard (alias) descriptor immediately following the special ones.

For VFAT volumes, you cannot use any utilities other than utilities that “understand” VFAT

The main disadvantage of VFAT is the large losses for clustering with large logical disk sizes and restrictions on the size of the logical disk itself.

File systemFAT32

This is a new implementation of the idea of ​​using the FAT table.

FAT 32 is a completely independent 32-bit file system.

First used in Windows OSR2 (OEM Service Release 2).

FAT32 is currently used in Windows 98 and Windows ME.

It contains numerous improvements and additions over previous FAT implementations.

1. Much more efficient use of disk space due to the fact that it uses smaller clusters (4 KB) - it is estimated that it saves up to 15%.

2. Has an extended boot record that allows you to create copies of critical data structures Þ increases the resistance of the disk to violations of the disk structures

3. Can use a FAT backup instead of a standard one.

4. Can move the root directory, in other words, the root directory can be in an arbitrary location Þ removes the limit on the size of the root directory (512 elements, since ROOT was supposed to occupy one cluster).

5. Improved root directory structure

Added additional fields:

creation time (2)

creation date (2)

date of last access (2)

High word of initial cluster number

low word of initial cluster number

· check sum

There are still multiple descriptors for a long filename.

For FAT32 volumes, you cannot use any utilities other than utilities that “understand” FAT32

In addition to all other tasks, it fulfills its main purpose - it organizes work with data according to a certain structure. For these purposes, the file system is used. What is a FS and what it can be, as well as other information about it will be presented below.

general description

The file system is a part of the operating system that is responsible for placing, storing, deleting information on media, providing users and applications with this information, and ensuring its safe use. In addition, it is she who helps in data recovery in the event of a hardware or software failure. This is why the file system is so important. What is FS and what can it be? There are several types:

For hard drives, that is, devices with random access;

For magnetic tapes, that is, devices with serial access;

For optical media;

Virtual systems;

Network systems.5

The logical unit of data storage in the file system is a file, that is, an ordered collection of data that has a specific name. All data used by the operating system is presented in the form of files: programs, images, texts, music, videos, as well as drivers, libraries, and so on. Each such element has a name, type, extension, attributes, and size. So, now you know, the File system is a collection of such elements, as well as ways to work with them. Depending on the form in which it is used and what principles are applicable to it, several main types of FS can be distinguished.

Program approach

So, if a file system is considered (what it is and how to work with it), then it should be noted that this is a multi-level structure, at its top level there is a file system switch that provides an interface between the system and a specific application. It converts file requests into a format that is accepted by the next level - drivers. They, in turn, refer to specific device drivers that store the necessary information.

For client-server applications, the requirements for file system performance are quite high. Modern systems designed to provide efficient access, support for large volumes of media, data protection from unauthorized access, maintaining the integrity of information.

FAT file system

This type was developed back in 1977 by Bill Gates and Mark McDonald. It was originally used in OS 86-DOS. If we talk about what the FAT file system is, then it is worth noting that initially it was not able to support hard drives, but only worked with flexible media up to 1 megabyte. Now this restriction is no longer relevant, and this FS was used by Microsoft for MS-DOS 1.0 and subsequent versions. FAT uses certain file naming conventions:

The name must start with a letter or number, and it can contain any ASCII character, in addition to spaces and special elements;

The length of the name should be no more than 8 characters, after it a dot is placed, and then the extension is indicated, which consists of three letters;

File names can use any case, and are not distinguished or preserved.

Since FAT was originally designed for the single-user DOS operating system, it did not provide for the storage of data about the owner or access rights. At the moment, this file system is the most widespread, most support it to one degree or another. Its versatility makes it possible to use it on volumes that are being worked with by different operating systems. This is a simple FS that is not able to prevent file corruption due to incorrect computer shutdown. As part of operating systems based on it, there are special utilities that check the structure and correct file inconsistencies.

NTFS file system

This FS is the most preferred for working with Windows NT, as it was developed specifically for it. The OS includes the convert utility, which converts volumes with FAT and HPFS to NTFS volumes. If we talk about what the NTFS file system is, it is worth noting that it has significantly expanded the ability to control access to certain directories and files, introduced many attributes, implemented dynamic file compression tools, fault tolerance, and supports the requirements of the POSIX standard. In this FS, you can use names up to 255 characters long, while a short name in it is generated in the same way as in VFAT. Understanding what the NTFS file system is, it is worth noting that in the event of an operating system failure, it is able to recover itself, so the disk volume will remain available, and the directory structure will not suffer.

Features of NTFS

On an NTFS volume, each file is represented by an entry in the MFT table. The first 16 table entries are reserved by the file system itself for storing special information. The very first entry describes the file table itself. When the first record is destroyed, the second is read to find the mirror MFT file, where the first record is identical to the main table. The logical center of the disk contains a copy of the bootstrap file. The third entry in the table contains the log file, which is used for data recovery. The seventeenth and subsequent entries of the file table contain information about the files and directories that are on the hard disk.

The transaction log contains a complete set of operations that change the volume structure, including operations to create files, as well as any commands that affect the directory structure. The transaction log is designed to recover NTFS from a system crash. The entry for the root directory contains a list of the directories and files that are in the root directory.

EFS Features

The Encrypting File System (EFS) is a Windows component, with which information on the hard drive can be stored in an encrypted format. Encryption has become the strongest protection that this operating system can offer. In this case, encryption for the user is a fairly simple action, for this you only need to check the box in the properties of the folder or file. You can specify who can read such files. Files are encrypted when they are closed, and when they are opened, they are automatically ready for use.

Features of RAW

Devices designed for data storage are the most vulnerable components, which are most often subject to damage not only physically, but also logically. Certain hardware problems can be fatal, while others have solutions. Sometimes users have a question: "What is the RAW file system?"

As you know, in order to write any information to a hard drive or flash drive, the drive must have a file system. The most common are FAT and NTFS. And RAW isn't even the file system we usually think of. In fact, this is a logical error of an already installed system, that is, its actual absence for Windows. Most often, RAW is associated with the destruction of the structure of the file system. After that, the OS does not just access the data, but also does not display technical information by equipment.

UDF Features

The Universal Disk Format (UDF) is designed to replace CDFS and add support for DVD-ROM devices. If we talk about what it is, then this is a new implementation old version for which it meets the requirements It is characterized by certain features:

Filenames can be up to 255 characters long;

The name can be lower or upper case;

The maximum path length is 1023 characters.

Starting with Windows XP, this file system is read/write.

This FS is used for flash drives that are supposed to be used when working with different computers running different operating systems, in particular Windows and Linux. It was EXFAT that became the “bridge” between them, since it is able to work with data received from the OS, each of which has its own file system. What it is and how it works will be clear in practice.

conclusions

As is clear from the above, each operating system uses certain file systems. They are intended for storing ordered data structures on physical media. If you suddenly, when using a computer, have a question about what the final file system is, then it is quite possible that when you tried to copy a certain file to the media, you received a message about exceeding the allowed size. That is why it is necessary to know in which file system what file size is considered acceptable so that you do not encounter problems when transferring information.


2023
maccase.ru - Android. Brands. Iron. News