The file system format is fat. A few words, before the description of the FAT16 file system ...

Everyone who has ever installed an operating system has come across the fact that at the stage of formatting the installation partition hard disk the program offers to choose the type of file system FAT or NTFS.

And those who happened to format a flash drive or other external storage device had to decide between the three file systems FAT32, NTFS and exFAT. More often than not, users choose the default formatting because they don't know what the difference is.

This article is addressed to those who wish 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 order of 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 control 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 reading-writing, creating-deleting, copying, naming, etc. In addition, this structure organizes joint access to information between users and provides protection against unauthorized actions by encryption, work in the "read-only" mode, and so on.

Structurally, the entire area of \u200b\u200bdisk space is divided into clusters, like a sheet of paper in a cage. Each cell is a block, the size of which is specified during formatting and must be a multiple of 2. The minimum size can be 512 bytes (for a flash drive), for a hard disk it is 32 KB. One file can occupy several such clusters. Figuratively, you can imagine disk space as a notebook, where the cluster is a letter, a 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 defines it as one of three types:

  1. Free, ready to write data.
  2. Busy, who stores some of the information and has data in the label about the next cluster in the chain, while the latter is marked with a special label.
  3. BAD-block - a cluster with errors, which becomes unavailable after formatting.

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

The entire file system consists of the following parts:

  • 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") storing cluster labels;
  • copies of the file allocation table to recover data in case of damage to the file structure;
  • root directory;
  • data areas;
  • cylinder to perform read / write operations.

There are three types of FAT file system in total: FAT12, FAT16, and FAT32. FAT was replaced by NTFS, and exFAT is an extended version of FAT32 and is used mainly for flash drives.

Pros and cons of FAT32, NTFS, and exFAT file structures

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

FAT32

Of the three file structures under consideration, FAT32 is the oldest. It replaced FAT16 and was the most progressive until recently. FAT32 release timed to release operating system Windows 95 OSR2 in 1996. The main distinguishing features are: 32-bit cluster addressing and size restrictions: a file no more than 4 GB and a volume of 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, suitable for any game consoles and other gadgets with a 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 USB-input can only work with FAT32.

Other important advantages of the file system are: high-speed performance, undemanding amount of RAM, efficient work with files of medium and small size, as well as low wear of the disk due to less head movements. However, it is also prone to fragmentation, and periodic defragmentation will definitely not hurt.

disadvantages

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 must not exceed 4GB, so the maximum disk size for a 32KB file allocation table cluster size would be about 8TB.

When formatting a disk with 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 is limited to 128 GB.

Given the fact that not many computer devices are equipped with a hard drive with a capacity of more than 8 TB, this disadvantage 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 of modern 4K format today are larger than these 4 GB, which means they are not compatible with this file system.

Besides size limitations, FAT32 has other disadvantages. It does not support long file names, which is inconvenient for users who want to logically identify files based on their contents. There are complaints about the security system (an additional antivirus scanner will not interfere) and the security of files in case of failures (especially hard drives), as well as low speed when working with directories containing many files.

Thus, FAT32 is more suitable for portable, not very capacious devices and old computers. The last windows versions it is no longer possible to install on a disk formatted with the FAT32 system, you must reformat to NTFS.

The main use of the FAT32 file system today is 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 together with Windows NT 3.1. In the name itself new technology file systemwhich means new technology file system, its progressive essence is laid.

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 a specific area. For example, LogFile is a log file in which all operations are written to the log, Boot is the boot sector, Bitmap monitors the free space in the partition, etc. Such a structure reliably protects files from any failures, be it an OS freeze or a power outage.

Advantages

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

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

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

disadvantages

The main disadvantage of NTFS is 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 Linux file compatibility. The most popular Playstation and Xbox 360 game consoles do not work with NTFS, only the Xbox One can communicate with it.

Among the disadvantages of NTFS are high RAM requirements, slower speed compared to FAT32, and difficulties in managing medium-sized directories.

Thus, it is more expedient to use the NTFS file structure on hard drives, including SSDs under control latest versions Windows starting from NT.

exFAT

This file system is the last to be considered for release. It appeared in 2008 with the next 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 versatile 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 OS as well as Mac OS and Linux. The latter option requires the installation of additional software.
  • 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

After reviewing the descriptions of three popular file systems, the following conclusions can be drawn:

  • for computer devices with an operating system higher than Windows NT, it will be more expedient to format the hard disk in the NTFS system;
  • for old devices, as well as for compatibility with various modern digital gadgets, the best option would be to choose FAT32;
  • for any removable media, the system will be ideal

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

This article is about file systems ... When installing, Windows prompts you to select the file system on the partition where it will be installed, and PC users must choose from two options FAT or NTFS.

In most cases, users are content with knowing that NTFS is "better", and choose this option.

However, sometimes they wonder and what exactly is better?

In this article I will try to explain what a file system is, what they are, how they differ, and which one should be used.

The article simplifies some of the technical features of file systems for a clearer understanding of the material.

File system Is a way of organizing data on storage media. The file system determines where and how files will be written to the medium and gives the operating system access to those files.

Additional requirements are imposed on modern file systems: the ability to encrypt files, access control for files, additional attributes. Usually the file system is written at the beginning of the hard disk. ().

From an OS point of view, hDD Is a collection of clusters.

Cluster Is an area of \u200b\u200ba disk of a certain size for storing data. The minimum cluster size is 512 bytes. Since a binary number system is used, the cluster sizes are multiples of powers of two.

The user can figuratively imagine the hard drive as a checkered notebook. One cell on a page is one cluster. The file system is the contents of the notepad and the file is the word.

For hard drives in a PC, two file systems are currently most common: FAT or NTFS... First appeared FAT (FAT16)then FAT32, and then NTFS.

FAT (FAT16)it is an abbreviation for File Allocation Table (in translation File Allocation Table).

The FAT framework was developed by Bill Gates and Mark MacDonald in 1977. It was used as the main file system in the DOS and Microsoft Windows operating systems (up to Windows ME).

There are four versions of FAT - FAT12, FAT16, FAT32 and exFAT... They differ in the number of bits allocated for storing the cluster number.

FAT12 used mainly for floppy disks, FAT16 - for small disks, and new exFAT mainly for flash drives. The maximum cluster size supported in FAT is 64Kb. ()

FAT16first introduced in November 1987. Index 16 in the name indicates that 16 bits are used for the cluster number. As a consequence, the maximum size of a disk partition (volume) that this system can support is 4GB.

Later, with the development of technologies and the appearance of disks with a volume of more than 4 GB, the file system appeared FAT32... It uses 32-bit cluster addressing and was introduced with Windows 95 OSR2 in August 1996. FAT32 limited in volume size to 128GB. Also this system can support long filenames. ().

NTFS (abbreviation NewTechnologyFileSystem - File system New Technology ) is the standard file system for the Microsoft Windows NT family of operating systems.

Introduced July 27, 1993 with Windows NT 3.1. NTFS is based on the HPFS file system (abbreviation HighPerformanceFileSystem - High Performance File System), created by Microsoft in conjunction with IBM for the operating system OS / 2.

Main features of NTFS: built-in capabilities to delimit access to data for different users and user groups, as well as assign quotas (restrictions on the maximum amount of disk space occupied by certain users), use the journaling system to improve the reliability of the file system.

Filesystem specifications are proprietary. Typically, the cluster size is 4K. In practice, it is not recommended to create volumes larger than 2TB. Hard drives have just reached this size, perhaps in the future we will have a new file system. ().

During the installation of Windows XP, it is proposed to format the disk in the system FAT or NTFS... This means FAT32.

All file systems are built on the principle: one cluster - one file. Those. one cluster stores the data of only one file.

The main difference for the average user between these systems is the cluster size. “A long time ago, when disks were small and files were very small,” this was very noticeable.

Let's look at an example of one volume on a 120GB disk and a 10KB file.

For FAT32the cluster size will be 32Kb, and for NTFS -4Kb.

IN FAT32such a file will occupy 1 cluster, leaving 32-10 \u003d 22Kb of unallocated space.

IN NTFSsuch a file will take up 3 clusters, leaving 12-10 \u003d 2Kb of unallocated space.

By analogy with a notebook, a cluster is a cell. And having put an end to the cage, we already logically occupy it all, but in reality there is a lot of free space.

Thus, the transition from FAT32to NTFSallows more optimal use of the hard disk when there are a large number of small files in the system.

In 2003, I had a 120GB disk, divided into 40GB and 80GB volumes. When I upgraded from Windows 98 to Windows XP and converted the disk from FAT32in NTFS, I got about 1GB of free disk space. At that time, it was a significant "increase".

To find out which file system is used on the hard disk volumes of your PC, you need to open the volume properties window and on the tab "General" read this data.

Tom - this is a synonym for a disk partition, users usually call the volume "drive C", "drive D", etc. An example is shown in the picture below:

Currently, 320GB and larger disks are widely used. Therefore, I recommend using the system NTFSfor optimal use of disk space.

Also, if there are several users on a PC, NTFS allows you to configure access to files in such a way that different users cannot read and change files of other users.

In organizations when working in local network system administrators use the rest of NTFS as well.

If you are interested in organizing access to files for several users on one PC, then the following articles will describe this in detail.

When writing the article, materials from sites ru.wikipedia.org were used

Article author: Maxim Telpari
PC user with 15 years of experience. Support specialist of the video course "Confident PC User", after studying which you will learn how to assemble a computer, install Windows XP and drivers, restore the system, work in programs and much more.

Make money with this article!
Sign up for an affiliate program. Replace the course link in the article with your affiliate link. Add the article to your site. You can get a reprint version.

In addition to all other tasks, it fulfills its main purpose - organizes work with data according to a certain structure. The file system is used for these purposes. What is 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, random access devices;

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

For optical media;

Virtual systems;

Networked systems.5

A file serves as a logical unit of data storage in the file system, 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, etc. 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.

Programmatic approach

So, if the file system is considered (what is it 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 requests for files into a format that is understood by the next layer - drivers. They, in turn, refer to specific device drivers that store the necessary information.

For client-server applications, the FS performance requirements are quite high. Modern systems are designed to provide efficient access, support for large storage media, protect data from unauthorized access, and maintain the integrity of information.

FAT file system

This type was developed back in 1977 by Bill Gates and Mark MacDonald. 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 floppy media up to 1 megabyte. Now this limitation is no longer relevant, and this FS was used by Microsoft for MS-DOS 1.0 and later versions. FAT uses certain conventions for naming files:

The name must have a letter or number at the beginning, and any ASCII character can be present in it, in addition to the space and special elements;

The name must be no more than 8 characters long, followed by a dot, and then the extension is indicated, which consists of three letters;

Any case can be used in file names; it is not distinguished or preserved.

Since FAT was originally designed for a single-user DOS operating system, it did not provide for storing information about the owner or access rights. At the moment, this file system is most widely distributed, to one degree or another it is supported by the majority. Its versatility makes it possible to use it on volumes with which different operating systems work. This is a simple file system that is not able to prevent the corruption of files due to improper shutdown of the computer. Operating systems based on it have special utilities that check the structure and correct file inconsistencies.

File system NTFS

This file system is the most preferable for working with Windows NT, as it was developed specifically for it. The operating system includes a convert utility that converts FAT and HPFS volumes to NTFS volumes. If we talk about what the NTFS file system is, it is worth noting that it significantly expanded the ability to control access to certain directories and files, introduced many attributes, implemented dynamic file compression, fault tolerance, and supported the POSIX standard requirements. In this FS, you can use names up to 255 characters long, while the short name is generated in it 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 accessible, and the directory structure will not suffer.

Features of NTFS

On an NTFS volume, each file is represented by an entry in the MFT. The first 16 records of the table 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 a mirrored MFT file, where the first record is identical to the main table. A copy of the boot file is located at the logical center of the disk. The third record of the table contains the log file that is used for data recovery. The seventeenth and subsequent entries in 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 structure of a volume, 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 directories and files that are in the root directory.

EFS features

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

RAW features

Data storage devices are the most vulnerable components that are most often prone 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 a RAW file system?"

As you know, to write any information to a hard disk or flash drive, the drive must have a file system. The most common are FAT and NTFS. And RAW is not even the file system that we usually imagine. 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 data, but also does not display technical information on the equipment.

Features of UDF

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

File names can be up to 255 characters long;

The name can be upper or lower case;

The maximum path length is 1023 characters.

Starting with Windows XP, this file system supports reading and writing.

This FS is used for flash drives that are supposed to be used when working with different computersrunning 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 is and how it works will be clear in practice.

conclusions

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

FAT (eng. File Allocation Table- "file allocation table") - the classic architecture of the file system, which, due to its simplicity, is still widely used for flash drives. Used in floppy disks, and some other storage media. Previously used on hard drives.

The file system was developed by Bill Gates and Mark McDonald in 1977 and was originally used in the 86-DOS operating system. Later 86-DOS was acquired by Microsoft and became the basis for MS-DOS 1.0, released in August 1981. FAT was designed to work with floppy disks less than 1 MB in size and did not initially support hard drives.

There are currently four versions of FAT - FAT8, FAT12, FAT16 and FAT32... They differ in the bitness of records in the disk structure, that is the number of bits allocated for storing the cluster number... FAT12 is used mainly for floppy disks, FAT16 for small disks, FAT32 for hard disks. A new file system was developed based on FAT exFAT (extended FAT), used primarily for flash drives.

The FAT file system fills the free disk space sequentially from beginning to end. When creating a new file or growing an existing one, it looks for the first free cluster in the file allocation table. If some files have been deleted and others have changed in size, then the resulting empty clusters will be scattered across the disk. If the clusters containing the file data are not arranged in a row, then the file is fragmented... Heavily fragmented files significantly reduce the efficiency of work, since the read / write heads, when searching for the next file record, will have to move from one area of \u200b\u200bthe disk to another. It is desirable that the clusters allocated for storing the file should be undermined, as this allows to reduce the time of its search. However, this can only be done using a special program, a similar procedure is called defragmentation file.

The disadvantage of FAT is also that its performance depends on the number of files in one directory. With a large number of files (about a thousand), it may take several minutes to read the list of files in the directory. FAT does not store information such as ownership or permission to access a file.

FAT is a simple file system that does not prevent file corruption due to abnormal computer shutdowns, it is one of the most common file systems and is supported by most operating systems.

Fat filesystem organization

All modern disk operating systems provide the creation of a file system intended for storing data on disks and providing access to them. In order for data to be written to a disk, its surface must be structured, ie. split into sectors and track.

A-track

C- cluster

Figure 1- Disk structure

Tracks are concentric circles that cover the surface of the disc. The track closest to the edge of the disc is numbered 0, followed by 1, and so on. If the diskette is double-sided, both sides are numbered. The first side number is 0, the second side number is 1.

Each track is divided into sections called sectors... Sectors are also assigned numbers. The first sector on the track is numbered 1, the second 2, and so on.

A hard drive consists of one or more circular platters. Both surfaces of the plate are used to store information. Each surface is divided into tracks, tracks, in turn, into sectors. Tracks of the same radius are cylinder... Thus, all zero tracks make up cylinder number zero, tracks with number 1 make up cylinder number 1, and so on.

Therefore, the surface of a hard disk can be viewed as a three-dimensional matrix, the dimensions of which are numbers surface, cylinderand sector.A cylinder is understood as the totality of all tracks belonging to different surfaces and located at an equal distance from the axis of rotation.

FAT file systems

FAT16

The FAT16 file system dates back to pre-MS-DOS and is supported by all Microsoft operating systems for compatibility. Its name File Allocation Table perfectly reflects the physical organization of the file system, the main characteristics of which include the fact that the maximum size of a supported volume (hard disk or partition on a hard disk) does not exceed 4095 MB. In the days of MS-DOS, 4 GB hard disks seemed like a pipe dream (20-40 MB were a luxury), so this margin was quite justified.

A volume formatted to use FAT16 is divided into clusters. The default cluster size depends on the size of the volume and can range from 512 bytes to 64 KB. Table 2 shows how the cluster size depends on the volume size. Note that the cluster size can be different from the default, but must be one of the values \u200b\u200bshown in table. 2.

It is not recommended to use the FAT16 file system on volumes larger than 511 MB, since disk space will be used extremely inefficiently for relatively small files (a 1-byte file will occupy 64 KB). Regardless of the cluster size, the FAT16 file system is not supported for volumes larger than 4 GB.

FAT32

Starting with Microsoft Windows 95 OEM Service Release 2 (OSR2), 32-bit FAT support appeared in Windows. For Windows NT-based systems, this file system was first supported in Microsoft Windows 2000. While FAT16 can support volumes up to 4GB, FAT32 can handle volumes up to 2TB. The cluster size in FAT32 can vary from 1 (512 bytes) to 64 sectors (32 KB). FAT32 cluster values \u200b\u200brequire 4 bytes to store (32 bits, not 16 as in FAT16). This means, in particular, that some file utilities designed for FAT16 cannot work with FAT32.

The main difference between FAT32 and FAT16 is that the size of the logical partition has changed. FAT32 supports volumes up to 127 GB. At the same time, if using FAT16 with 2 GB disks required a 32 KB cluster, then in FAT32 a 4 KB cluster is suitable for 512 MB to 8 GB disks (Table 4).

This accordingly means more efficient use of disk space - the smaller the cluster, the less space is required to store the file and, as a result, the disk becomes less fragmented.

When using FAT32, the maximum file size can be up to 4 GB minus 2 bytes. If using FAT16 the maximum number of entries in the root directory was limited to 512, then FAT32 can increase this number to 65,535.

FAT32 imposes restrictions on the minimum volume size - it must be at least 65,527 clusters. At the same time, the size of the cluster cannot be such that FAT occupies more than 16 MB – 64 KB / 4 or 4 million clusters.

When using long file names, the data required to access from FAT16 and FAT32 does not overlap. When a file with a long filename is created, Windows creates a corresponding 8.3 name and one or more entries in the directory to store the long name (13 characters from the long filename for each occurrence). Each subsequent occurrence stores the corresponding portion of the file name in Unicode format. Such entries have the attributes "volume identifier", "read-only", "system" and "hidden" - a set that MS-DOS ignores; in this operating system, the file is accessed by its "alias" in the 8.3 format.

File system NTFS

Microsoft Windows 2000 includes support for the new version of the NTFS file system, which, in particular, provides work with Active Directory directory services, reparse points, information security, access control and a number of other features.

As with FAT, the main unit of information in NTFS is the cluster. Table 5 shows the default cluster sizes for volumes of different capacities.

When the NTFS file system is built, the formatter creates a Master File Table (MTF) file and other areas for storing metadata. Metadata is used by NTFS to implement the file structure. The first 16 entries in the MFT are reserved by NTFS itself. The location of the $ Mft and $ MftMirr metadata files is recorded in the boot sector of the disk. If the first record in the MFT is corrupted, NTFS reads the second record to find a copy of the first. A complete copy of the boot sector is located at the end of the volume. Table 6 lists the basic metadata stored in the MFT.

The remaining MFT entries contain entries for each file and directory located on this volume.

Usually one file uses one MFT record, but if the file has a large set of attributes or becomes too fragmented, then additional records may be required to store information about it. In this case, the first record in the file, called the base record, stores the location of the other records. Small files and directories (up to 1500 bytes) are fully contained in the first record.

File Attributes in NTFS

Each occupied sector on an NTFS volume belongs to a particular file. Even the filesystem metadata is part of the file. NTFS treats each file (or directory) as a set of file attributes. Elements such as the file name, security information, and even the data in it are file attributes. Each attribute is identified by a specific type code and, optionally, an attribute name.

When file attributes fit into a file record, they are called resident attributes. These attributes are always the name of the file and the date it was created. In cases where the information about a file is too large to fit into one MFT record, some file attributes become nonresident. Resident attributes are stored in one or more clusters and represent a stream of alternative data for the current volume (more on this below). NTFS creates an Attribute List attribute to describe the location of resident and non-resident attributes.

Table 7 shows the basic file attributes defined in NTFS. In the future, this list may be expanded.

File system CDFS

Windows 2000 provides support for the CDFS file system, which conforms to the ISO'9660 standard for the location of information on CD-ROMs. Long filenames are supported according to ISO'9660 Level 2.

When creating a CD-ROM for use under Windows 2000, keep the following in mind:

  • all directory and file names must be less than 32 characters;
  • all directory and file names must contain only uppercase characters;
  • directory depth should not exceed 8 levels from the root;
  • the use of file name extensions is optional.

Comparing file systems

Microsoft Windows 2000 can use FAT16, FAT32, NTFS, or a combination of these. The choice of an operating system depends on the following criteria:

  • how the computer is used;
  • hardware platform;
  • the size and number of hard drives;
  • information security

FAT file systems

As you may have noticed, the numbers in the names of the file systems - FAT16 and FAT32 - indicate the number of bits required to store information about the cluster numbers used by the file. So, in FAT16 16-bit addressing is used and, accordingly, it is possible to use up to 2-16 addresses. In Windows 2000, the first four bits of the FAT32 file location table are required for their own use, so in FAT32 the number of addresses reaches 2 28.

Table 8 shows the cluster sizes for FAT16 and FAT32 file systems.

In addition to significant differences in cluster size, FAT32 also allows the root directory to expand (FAT16 limits the number of entries to 512 and may even be lower when using long filenames).

FAT16 advantages

Among the advantages of FAT16 are the following:

  • the file system is supported by MS-DOS, Windows 95, Windows 98, Windows NT, Windows 2000, as well as some UNIX operating systems;
  • there are a large number of programs that allow you to correct errors in this file system and recover data;
  • if there are problems with booting from the hard disk, the system can be booted from a floppy disk;
  • this file system is efficient enough for volumes less than 256 MB.
Disadvantages of FAT16

The main disadvantages of FAT16 include:

  • the root directory cannot contain more than 512 entries. Using long filenames dramatically reduces the number of these elements;
  • FAT16 supports a maximum of 65,536 clusters, and since some clusters are reserved by the operating system, the number of available clusters is 65,524. Each cluster is a fixed size for a given LUN. When the maximum number of clusters at their maximum size (32 KB) is reached, the maximum volume supported is 4 GB (under Windows 2000). To maintain compatibility with MS-DOS, Windows 95 and Windows 98, the volume under FAT16 should not exceed 2 GB;
  • fAT16 does not support built-in file protection and compression;
  • large disks waste a lot of space by using the maximum cluster size. The space for the file is allocated based on the size of the cluster, not the file.
FAT32 advantages

Among the advantages of FAT32 are the following:

  • disk space allocation is more efficient, especially for large disks;
  • the root directory in FAT32 is a regular cluster chain and can be located anywhere on the disk. Because of this, FAT32 does not impose any restrictions on the number of elements in the root directory;
  • due to the use of smaller clusters (4 KB on disks up to 8 GB), the occupied disk space is usually 10-15% less than under FAT16;
  • FAT32 is a more reliable file system. In particular, it supports the ability to move the root directory and use a FAT backup. In addition, the boot record contains a number of data that is critical for the file system.
Disadvantages of FAT32

The main disadvantages of FAT32:

  • the volume size when using FAT32 under Windows 2000 is limited to 32 GB;
  • fAT32 volumes are not accessible from other operating systems - only from Windows 95 OSR2 and Windows 98;
  • boot sector backup is not supported;
  • fAT32 does not support built-in file protection and compression.

File system NTFS

When using Windows 2000, Microsoft recommends formatting all hard disk partitions to NTFS, except for those configurations when multiple operating systems are used (except Windows 2000 and Windows NT). Using NTFS instead of FAT allows you to use the features available in NTFS. These include, in particular:

  • the possibility of recovery. This capability is built into the file system. NTFS guarantees the safety of data due to the fact that it uses the protocol and some data recovery algorithms. In the event of a system failure, NTFS uses the protocol and additional information to automatically restore the integrity of the file system;
  • compression of information. For NTFS volumes, Windows 2000 supports compression of individual files. Such compressed files can be used by Windows applications without preliminary unpacking, which happens automatically when reading from a file. When closed and saved, the file is compressed again;
  • in addition, the following advantages of NTFS can be distinguished:

Some operating system features require NTFS;

The access speed is much higher - NTFS minimizes the number of disk accesses required to find a file;

Protection of files and directories. Only on NTFS volumes it is possible to set access attributes to files and folders;

When using NTFS, Windows 2000 supports volumes up to 2TB;

The file system supports backup boot sector - it is located at the end of the volume;

NTFS supports the Encrypted File System (EFS), which protects against unauthorized access to file contents;

By using quotas, you can limit the amount of disk space that users use.

Disadvantages of NTFS

Speaking about the disadvantages of the NTFS file system, it should be noted that:

  • NTFS volumes are not available in MS-DOS, Windows 95, and Windows 98. In addition, a number of features that are implemented in NTFS under Windows 2000 are not available in Windows 4.0 and earlier;
  • small volumes containing many small files may experience performance degradation compared to FAT.

File system and speed

As we have already found out, for small volumes, FAT16 or FAT32 provides faster file access compared to NTFS, because:

  • FAT has a simpler structure;
  • the size of directories is smaller;
  • FAT does not support file unauthorized access protection - the system does not need to check file permissions.

NTFS minimizes the number of disk accesses and the time it takes to find a file. Also, if the directory is small enough to fit in a single MFT entry, the entire entry is read in one go.

One FAT entry contains the cluster number for the first cluster in the directory. To view a FAT file, you need to search the entire file structure.

When comparing the speed of operations performed for directories containing short and long file names, it should be borne in mind that the speed of operations for FAT depends on the operation itself and the size of the directory. If FAT searches for a non-existent file, it searches the entire directory — this operation takes longer than NTFS's B-tree-based search. The average time it takes to find a file is expressed as a function of N / 2 in FAT, and log N in NTFS, where N is the number of files.

A number of the following factors affect the speed of reading and writing files under Windows 2000:

  • file fragmentation. If the file is highly fragmented, NTFS usually requires fewer disk accesses than FAT to find all the fragments;
  • cluster size. For both file systems, the default cluster size depends on the volume of the volume and is always expressed as a power of 2. Addresses in FAT16 are 16-bit, in FAT32 - 32-bit, in NTFS - 64-bit;
  • the default cluster size in FAT is based on the fact that the file location table can have a maximum of 65,535 entries - the cluster size is a function of the volume divided by 65,535. Thus, the default cluster size for a FAT volume is always larger. than the cluster size for an NTFS volume of the same size. Note that the larger cluster size for FAT volumes means that FAT volumes can be less fragmented;
  • location of small files. When using NTFS, small files are contained in the MFT record. The size of a file that fits into one MFT record depends on the number of attributes in that file.

Maximum size of NTFS volumes

In theory, NTFS supports volumes with up to 2 32 clusters. But nevertheless, in addition to the lack of hard drives of this size, there are other restrictions on the maximum volume size.

One such limitation is the partition table. Industry standards limit the size of a partition table 2 to 32 sectors. Another limitation is the sector size, which is usually 512 bytes. Since the sector size may change in the future, the current size gives a limit on the size of a single volume - 2 TB (2 32 x 512 bytes \u003d 2 41). Thus, 2 TB is a practical limit for NTFS physical and logical volumes.

Table 11 shows the main limitations of NTFS.

Controlling access to files and directories

When using NTFS volumes, you can set permissions for files and directories. These access rights indicate which users and groups have access to them and what level of access is allowed. These access rights apply both to users working at the computer on which the files are located and to users accessing files over the network when the file is located in a directory open for remote access.

Under NTFS, you can also set remote access permissions combined with file and directory permissions. In addition, file attributes (read-only, hidden, system) also restrict access to the file.

Under FAT16 and FAT32 it is also possible to set file attributes, but they do not provide file permissions.

The version of NTFS used in Windows 2000 introduces a new type of access permission — inherited permissions. The Security tab contains the option Allow inheritable permissions from parent to propagate to this file object which is active by default. This option significantly reduces the time required to change access rights to files and subdirectories. For example, to change access rights to a tree containing hundreds of subdirectories and files, just enable this option - in Windows NT 4, you must change the attributes of each individual file and subdirectory.

In fig. 5 shows the Properties dialog box and the Security tab (Advanced section) - lists the extended file permissions.

Recall that for FAT volumes, access can be controlled only at the volume level, and such control is only possible with remote access.

Compressing files and directories

Windows 2000 supports compression of files and directories located on NTFS volumes. Compressed files are available for reading and writing by any Windows application. For this, there is no need to unpack them first. The compression algorithm used is similar to that used in DoubleSpace (MS-DOS 6.0) and DriveSpace (MS-DOS 6.22), but has one significant difference - under MS-DOS, an entire primary partition or logical device is compressed, while under NTFS you can pack individual files and directories.

The compression algorithm in NTFS is designed to support clusters up to 4KB in size. If the cluster size is larger than 4 KB, the NTFS compression functionality becomes unavailable.

Self-healing NTFS

The NTFS file system is self-healing and can maintain its integrity through the use of the protocol of actions performed and a number of other mechanisms.

NTFS considers every operation that modifies system files on NTFS volumes as a transaction and stores information about such a transaction in the protocol. The started transaction can be either fully completed (commit), or rolled back (rollback). In the latter case, the NTFS volume is returned to the state before the start of the transaction. In order to manage transactions, NTFS writes all the operations included in a transaction to a log file before writing to disk. After the transaction is completed, all operations are performed. Thus, there can be no outstanding operations under NTFS control. In the event of disk failures, pending operations are simply canceled.

NTFS also performs operations to identify defective clusters on the fly and allocate new clusters for file operations. This mechanism is called cluster remapping.

IN this review we examined the various file systems supported in Microsoft Windows 2000, discussed the structure of each of them, noted their advantages and disadvantages. The most promising file system is NTFS, which has a large set of functions that are not available in other file systems. The new version of NTFS, supported by Microsoft Windows 2000, has even more functionality and is therefore recommended for use when installing the Win 2000 operating system.

ComputerPress 7 "2000