How to set up smartphones and PCs. Informational portal
  • home
  • Iron
  • What is ntfs file system. File systems from the inside: FAT vs NTFS

What is ntfs file system. File systems from the inside: FAT vs NTFS

This article is about file systems . When installing Windows, it 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 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 is a file system, what they are, how they differ, and which one should be used.

The article simplified some of the technical features of file systems for a more understandable perception 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 media and provides the operating system with access to those files.

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

From the point of view of the OS, a hard drive is a set of clusters.

cluster is an area of ​​a disk of a certain size for storing data. The minimum cluster size is 512 bytes. Since the binary number system is used, the sizes of clusters are a multiple of a power of two.

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

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

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

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

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

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

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

Later, with the development of technology and the advent of disks with a capacity of more than 4 GB, a 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 - New Technology File System) 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), which was created by Microsoft together with IBM for the OS / 2 operating system.

Main features of NTFS: built-in capabilities to restrict 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), the use of a journaling system to improve the reliability of the file system.

The file system specifications are closed. Usually the cluster size is 4Kb. 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 prompted 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 size of the cluster. “A long time ago, when disks were small and files were very small,” it was very noticeable.

Consider the example of one volume on a 120GB disk and a 10Kb file.

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

AT FAT32 such a file will occupy 1 cluster, leaving 32-10=22Kb of unallocated space.

AT NTFS such a file will take up 3 clusters, leaving 12-10=2Kb of unallocated space.

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

Thus, the transition from FAT32 to NTFS allows 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 drive divided into 40 and 80GB volumes. When I switched from Windows 98 to Windows XP and converted the drive from FAT32 in NTFS, I got about 1GB of free disk space. At that time it was a significant "increase".

To find out what 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.

Volume- 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, disks with a capacity of 320 GB or more are widely used. Therefore, I recommend using the system NTFS for optimal use of disk space.

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

In organizations, when working on a local network, system administrators use other features of NTFS.

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 the sites en.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 on this article!
Sign up for an affiliate program. Replace the course link in the article with your affiliate link. Add an article to your site. You can get a reprint version.

FAT file systems

FAT16

The FAT16 file system predates MS-DOS and is supported by all Microsoft operating systems for compatibility. Its name File Allocation Table (file location 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 drives seemed like an impossible dream (20-40 MB drives were a luxury), so such a reserve 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. In table. Figure 2 shows how the cluster size depends on the volume size. Note that the cluster size may differ from the default value, but must have one of the values ​​specified in Table 1. 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 take 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), Windows introduced support for 32-bit FAT. For Windows NT-based systems, this file system was first supported in Microsoft Windows 2000. While FAT16 can support volumes up to 4 GB, FAT32 can support volumes up to 2 TB. The cluster size in FAT32 can vary from 1 (512 bytes) to 64 sectors (32 KB). FAT32 cluster values ​​require 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 disk logical partition has changed. FAT32 supports volumes up to 127 GB. At the same time, if when using FAT16 with 2 GB disks, a 32 KB cluster was required, then in FAT32 a 4 KB cluster is suitable for disks from 512 MB to 8 GB (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 when using FAT16 the maximum number of entries in the root directory was limited to 512, then FAT32 allows you to 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 cluster size cannot be such that the FAT occupies more than 16 MB - 64 KB / 4 or 4 million clusters.

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

NTFS file system

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

As with FAT, the basic unit of information in NTFS is the cluster. In table. Figure 5 shows the default cluster sizes for volumes of various capacities.

When you create an NTFS file system, 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 metadata files $Mft and $MftMirr is recorded in the boot sector of the disk. If the first entry in the MFT is corrupted, NTFS reads the second entry to find a copy of the first. A complete copy of the boot sector is located at the end of the volume. In table. 6 lists the main metadata stored in the MFT.

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

Typically, one file uses one entry in the MFT, but if the file has a large set of attributes or becomes too fragmented, additional entries may be required to store information about it. In this case, the first record about the file, called the base record, stores the location of the other records. Data about files and directories of small size (up to 1500 bytes) is completely contained in the first entry.

File attributes in NTFS

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

If the attributes of a file fit within 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 a single MFT record, some of the file's attributes become non-resident. Resident attributes are stored in one or more clusters and represent a stream of alternate data for the current volume (more on that below). To describe the location of resident and non-resident attributes, NTFS creates an Attribute List attribute.

In table. 7 shows the main file attributes defined in NTFS. This list may be expanded in the future.

CDFS file system

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

When creating a CD-ROM for use with 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;
  • the depth of directories should not exceed 8 levels from the root;
  • the use of filename extensions is optional.

Comparison of file systems

Under Microsoft Windows 2000, FAT16, FAT32, NTFS, or combinations of these file systems can be used. The choice of operating system depends on the following criteria:

  • how the computer is used;
  • hardware platform;
  • 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, FAT16 uses 16-bit addressing and, accordingly, it is possible to use up to 216 addresses. In Windows 2000, the first four bits of the FAT32 file location table are needed for internal use, so FAT32 reaches 228 addresses.

In table. 8 shows cluster sizes for FAT16 and FAT32 file systems.

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

Benefits of FAT16

Among the advantages of FAT16 are the following:

  • the file system is supported by MS-DOS, Windows 95, Windows 98, Windows NT, Windows 2000, and 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 the floppy disk;
  • this file system is quite efficient for volumes smaller than 256 MB.
Disadvantages of FAT16

The main disadvantages of FAT16 include:

  • the root directory cannot contain more than 512 entries. Using long filenames greatly 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 has a fixed size for a given LUN. When the maximum number of clusters is reached at their maximum size (32 KB), the maximum supported volume is limited to 4 GB (under Windows 2000). To maintain compatibility with MS-DOS, Windows 95, and Windows 98, the size of a FAT16 volume must not exceed 2 GB;
  • FAT16 does not support built-in file protection and compression;
  • on large disks, a lot of space is wasted due to the fact that the maximum cluster size is used. The space for the file is allocated based on the size of the cluster, not the file.
Benefits of FAT32

Among the advantages of FAT32 are the following:

  • disk space allocation is performed more efficiently, especially for large disks;
  • the root directory in FAT32 is a regular chain of clusters and can be located anywhere on the disk. Because of this, FAT32 does not impose any restrictions on the number of items 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 the more secure 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 critical data 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 available 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.

NTFS file system

When using Windows 2000, Microsoft recommends that you format all hard disk partitions to NTFS, except for configurations where 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 feature is "built into" the file system. NTFS guarantees the safety of data due to the fact that it uses a protocol and some information 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;
  • information compression. For NTFS volumes, Windows 2000 supports single file compression. Such compressed files can be used by Windows applications without prior decompression, which occurs automatically when reading from the file. When closing and saving the file is packed again;
  • In addition, the following advantages of NTFS can be distinguished:

Some operating system features require NTFS;

Access speed is much faster - 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 file and folder access attributes;

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

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

NTFS supports the Encrypted File System (EFS) encryption system, which provides protection against unauthorized access to the contents of files;

When using quotas, you can limit the amount of disk space used by users.

Disadvantages of NTFS

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

  • NTFS volumes are not available on MS-DOS, Windows 95, and Windows 98. In addition, a number of features that are available in NTFS under Windows 2000 are not available on 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;
  • directories are smaller;
  • FAT does not support protecting files from unauthorized access - 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 size is small enough to fit in a single MFT entry, the entire entry is read in one go.

One entry in the FAT contains the cluster number for the first cluster in the directory. Viewing a FAT file requires searching through the entire file structure.

When comparing the speed of operations performed for directories containing short and long file names, it should be taken into account that the speed of operations for FAT depends on the operation itself and the size of the directory. If FAT looks for a file that doesn't exist, it searches the entire directory, an operation that takes longer than searching the B-tree structure used by NTFS. The average time it takes to find a file in FAT is expressed as a function of N/2, in NTFS it is expressed as log N, 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 size of the volume and is always expressed as a power of 2. Addresses in FAT16 are 16-bit, in FAT32 they are 32-bit, in NTFS they are 64-bit;
  • the default cluster size in FAT is based on the fact that the file location table can have no more than 65,535 entries - the cluster size is a function of the volume size 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 a 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 an MFT record. The size of a file that fits into a single MFT record depends on the number of attributes in that file.

Maximum size of NTFS volumes

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

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

In table. Figure 11 shows the main limitations of NTFS.

Managing access to files and directories

When using NTFS volumes, you can set file and directory permissions. These access rights specify which users and groups have access to them and what level of access is allowed. Such access rights apply both to users working on 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 introduced a new type of access permission called 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 the permissions for files and subdirectories. For example, to change the permissions of a tree containing hundreds of subdirectories and files, it is enough to enable this option - in Windows NT 4, you must change the attributes of each individual file and subdirectory.

On fig. Figure 5 shows the Properties dialog box and the Security tab (Advanced section) listing extended file permissions.

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

Compressing files and directories

Windows 2000 supports compression of files and directories located on NTFS volumes. Compressed files are readable and writable by any Windows application. For this, there is no need for their preliminary unpacking. 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 4 KB in size. If the cluster size is larger than 4 KB, the NTFS compression features become unavailable.

Self-healing NTFS

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

NTFS treats every operation that modifies system files on NTFS volumes as a transaction and stores information about such a transaction in a log. A started transaction can either be completely completed (commit) or rolled back (rollback). In the latter case, the NTFS volume returns to the state prior to the start of the transaction. In order to manage transactions, NTFS writes all the operations involved in a transaction to a log file before it is written to disk. After the transaction is completed, all operations are performed. Thus, under NTFS management, there can be no pending operations. In the event of disk failures, pending operations are simply cancelled.

Under the control of NTFS, operations are also performed that allow you to identify bad 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 design of each of them, noted their advantages and disadvantages. The most promising is the NTFS file system, which has a large set of features 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

Windows supports several file systems for various external devices:
  • NTFS is the main file system of the Windows NT family;
  • FAT (File Allocation Table) is a simple file system used by Windows for flash storage devices, as well as for compatibility with other operating systems when installed on disks with multiple boot. The main element of this file system is the FAT file allocation table (after which the entire file system is named), which is necessary to determine the location of the file on the disk. There are three versions of FAT, which differ in the bitness of identifiers indicating the location of files: FAT12, FAT16 and FAT32;
  • exFAT (Extended FAT - extended FAT) is a development of the FAT file system using 64-bit identifiers. Mainly used for flash memory devices;
  • CDFS (CD ROM File System) is a file system for CD disks that combines ISO 9660 1 formats. ISO 9660 - ISO (International Organization for Standardization) standard for CD file systems and Joliet 2 Joliet is an extension of the ISO 9660 standard developed by Microsoft. Removes hard restrictions on file naming ;
  • UDF (Universal Disk Format) is a file system for CDs and DVDs designed to replace ISO 9660.

For further presentation, you need to know the following important concepts: disk, partition, simple and spanned volumes, sector, cluster.

Disk ( disk ) - external memory device, such as a hard drive or an optical disc (CD, DVD, Blu ray).

A partition is a contiguous part of a hard drive. A disk can contain multiple partitions.

Volume ( volume ) or logical disk ( logical disk ) - an area of ​​​​external memory with which operating system works as one. Volumes are simple and composite.

Simple volume (simple volume) - a volume consisting of one partition.

Composite volume (multipartition volume) - a volume consisting of several partitions (optionally on the same disk).

The concepts of a partition and a simple volume are different: firstly, partitions are formed mainly only on hard drives, and volumes are also created on other external memory devices (for example, on optical disks and flash memory devices), and secondly, the concept of "partition" is associated with physical device, and the concept of "volume" - with a logical representation of external memory.

Sector ( sector ) – fixed size data block on disk; the smallest unit of information for a disk. The typical sector size for hard drives is 512 bytes, for optical drives it is 2048 bytes. Sectorization of a disk occurs once when the disk is created during a low-level format and usually cannot be changed.

A cluster ( cluster ) is a logical block of data on a disk that includes one or more sectors. The number of sectors that make up a cluster is usually a multiple of powers of two. The cluster size is set by the operating system through a high-level formatting process that can be performed multiple times.

When written to disk, a file will always occupy an integer number of clusters. For example, a 100 byte file on a file system with a 4 KB cluster size will take up exactly 4 KB.

The choice of the cluster size is connected with the following considerations. Small clusters reduce the amount of wasted disk space created by placing a file across an integer number of clusters. But at the same time, the total number of clusters on the disk increases and the size of the file system service structures that store information about files increases.

Features of NTFS

File system NTFS (New Technology File System) was developed by Microsoft in the early 1990s. as the main file system for server versions of Windows operating systems. NTFS was introduced in 1993 with the Windows NT 3.1 operating system.

NTFS is currently regarded as the file system of choice for both server and client versions of Windows.

NTFS uses 64-bit cluster identifiers, so theoretically an NTFS volume can contain 264 clusters (16 EB 3 2 10 bytes = 1 kilobyte (KB), 2 20 bytes = 1 megabyte (MB), 2 30 bytes = 1 gigabyte (GB), 2 40 bytes = 1 terabyte (TB), 2 50 bytes = 1 petabyte (PB), 260 bytes = 1 exabyte (EB), 270 bytes = 1 zettabyte (ZB).). However, current implementations in Windows only support 32-bit cluster addressing, which, with a maximum cluster size of 64 KB (216 bytes), allows an NTFS volume to reach a size of up to 256 TB:

2 32 * 2 16 bytes = 2 48 bytes = 2 8 * 2 40 bytes = 256TB.

For volumes larger than 4 GB, Windows suggests a default cluster size of 4 KB when formatting.

Let's list some features of NTFS [ , page 761]:

  • recoverability - the ability of a file system to return to a healthy state after a failure occurs. This possibility is realized, firstly, due to the support of atomic transactions, and secondly, due to the redundancy of information storage. An atomic transaction is an operation with a file system that leads to its modification, which is either completely successful or not performed at all (i.e., in case of failure during an atomic transaction, all changes are rolled back). Redundancy is used when storing the most important file system data that is critical for its correct operation;
  • security (security) - protection of files from unauthorized access. Implemented using the Windows security model discussed in Lecture 9 "Security in Windows";
  • encryption (encryption) - converting a file into an encrypted code that cannot be read without a key. Conventional security mechanisms, such as assigning user access rights to files, do not provide complete protection of information, for example, if the disk is moved to another computer. The operating system administrator can always access other users' files, even on an NTFS volume. Therefore, NTFS includes support for the Encrypting File System (EFS), which makes it easy to encrypt and decrypt files;
  • support for RAID (Redundant Array of Inexpensive (Independent) Disks - an array of inexpensive (independent) disks with redundancy) - the ability to use multiple disks to store information; data from one disk is automatically copied to others, thereby providing increased reliability;
  • disk quotas for users (Per-User Volume Quotas) - the ability to allocate a certain disk space for each user (quotas); NTFS does not allow the user to write data to the disk beyond the allocated quota.

Structure of NTFS

The structure of an NTFS volume is shown in Figure 17.1.


Rice. 17.1.

At the beginning of the volume there is a volume boot record ( Volume Boot Record ), which contains the Windows boot code, information about the volume (in particular, the type of file system), addresses of system files ($ Mft and $ MftMirr - see below). The boot record usually takes 8 KB (16 first sectors).

In a certain area of ​​\u200b\u200bthe volume (the address of the beginning of this area is indicated in the boot record) is the main NTFS system structure - the main file table (Master File Table, MFT). The entries in this table contain all information about the location of files on the volume, and small files are stored directly in the MFT entries.

An important feature of NTFS is that all information, both user and system, is stored as files. System file names begin with the "$" sign. For example, a volume's boot entry is in the $ Boot file, and the master file table is in the $ Mft file. This organization of information allows you to work uniformly with both user and system data on the volume.

Since the MFT is the most important system structure, which is most often accessed during volume operations, it is beneficial to store the $ Mft file in a contiguous area of ​​​​a logical disk in order to avoid its fragmentation (placement in different areas of the disk), and, therefore, increase the speed of working with it . For this purpose, when formatting a volume, a contiguous area is allocated, called a zone.

File system NTFS (New Technologies File System- new technology file system) was released along with the OS Windows NT 3.5 in 1993. Prior to Windows 2000, development of the two OS lines was separate, and consumer OS Windows 95/98/Me were limited to use FAT16 or FAT32. In contrast, the line NT, including Windows XP, supports all systems (except Windows NT4, unfamiliar with FAT32).

System NTFS contains many improvements over systems FAT. The most important ones are:

optimized space usage on large volumes,

Fixing bugs after crashes

protection of data from unauthorized access,

indexing service

data compression and encryption,

Restoring the system after serious failures.

NTFS can manage partitions of several hundred TB in size. In terms of security, administrators now have the ability to use built-in security features: user access policies for files and folders, file encryption systems EFS (Encryption File System- encrypted file system).

System NTFS used in versions of Windows up to and including Windows 2000 did not meet modern requirements, in particular:

· limited the number of volumes to 26 (disks from A to Z);

changing a partition always required a reboot;

· Information about NTFS volumes was stored in the registry, which made it difficult to use the disk with another system.

These issues have been resolved in Windows 2000 by using LDM(Logical Disk Manager- logical disk manager) that no longer requires drive letters to be assigned. Improvements NTFS used in Windows XP have been associated with:

Improved data throughput

· the introduction of the ability to set cluster size values ​​other than the fixed 512 bytes;

· improvement of administrative functions: indexing of folders and limitation of unforeseen expenses of memory.

File system NTFS represents an outstanding achievement of structuring: each element of the system is a file - even service information. The most important file in NTFS called MFT (Master File Table- general table of files). Unlike FAT, which stores the tables separately, at the beginning of the volume, NTFS places MFT in hidden files.

Chapter NTFS can be almost any size. Its maximum size is limited only by the size of hard drives.

NTFS divides the entire useful space of the media into clusters - data blocks, and the cluster size varies from 512 bytes to 64 KB (a 4 KB cluster is considered the standard).

Disk NTFS conditionally divided into two parts. The first 12% of the disk is reserved for MFT zone- the space in which the metafile grows MFT. It is not possible to write any data to this area. The MFT zone is always kept empty - this is done so that the most important, service file ( MFT) was not fragmented during its growth. The remaining 88% of the drive is just plain file storage space (Figure 9).

Rice. 9. Physical structure of NTFS

The mechanism for using the MFT zone is as follows: when files can no longer be written to regular space, the MFT zone is simply reduced (exactly twice in current OS versions), thus freeing up space for writing files. When freeing up space in the normal area, the MFT area can expand again. At the same time, the situation when ordinary files remain in this zone is not ruled out.

MFT is located in the MFT zone and represents centralized directory of all other disk files(including himself). MFT manages all the files in the volume and the so-called metadata using a relational database. Information about files is placed in lines, and the attributes of files (hidden, encrypted, compressed, system, etc.) are written in columns.

MFT divided into fixed size records(usually 1 KB) and each entry corresponds to a file. The first 16 files are service in nature and inaccessible to the OS - they are called metafiles, and the very first metafile is itself MFT. Files up to 900 bytes can fit entirely in one record. For larger files MFT contains pointers to their location on disk. The same applies to folders: if they are small enough, they are completely included in MFT.

First 16 elements MFT- the only part of the disk that has a fixed position. The second copy of the first three records, for reliability (they are very important), is stored exactly in the middle of the disk. The rest of the MFT file can be located, like any other file, in arbitrary places on the disk - you can restore its position using itself, "hooking" on the very basis - on the first element MFT.

Each metafile is responsible for some aspect of the system. The advantage of this approach is flexibility. For example, in the file system FAT physical damage in the area itself FAT fatal to the functioning of the entire disk, and NTFS can shift, even fragment across the disk, all its service areas, bypassing any surface faults - except for the first 16 elements MFT.

Metafiles are in the root directory NTFS drive - they begin with the name character "$". The following metafiles are currently in use:

· $MFT- the MFT itself;

· $MFTmirr– a copy of the first 16 MFT records placed in the middle of the disk;

· $logfile– logging support file;

· $Volume– service information (volume label, file system version, etc.);

· $AttrDef– list of standard file attributes on the volume;

· $. - root directory;

· $Bitmap– map of volume free space;

· $boot– boot sector (if the partition is bootable);

· $Quota- a file that contains user rights to use disk space;

· $upcase– file-table of correspondence between uppercase and lowercase letters in file names on the current volume.

All files placed on disk are mentioned in MFT. This place stores all information about the file (with the exception of the actual data): file name, size, location on disk of individual fragments, etc. If one entry is missing for the information MFT, then several are used, and not necessarily in a row.

Small files (up to 900 bytes) are stored directly in MFT, in the place remaining from the main data within one record MFT. Files that occupy hundreds of bytes usually do not have their "physical" embodiment in the main file area - all the data of such a file is stored in one place - in MFT.

The file name can contain any characters, including the full set of national alphabets, since the data is presented in Unicode– 16-bit representation, which gives 65535 different characters. The maximum length of a file name is 255 characters.

Catalog on NTFS is a specific file that stores links to other files and directories, creating a hierarchical structure of data on disk. The catalog file is divided into blocks, each of which contains the file name, basic attributes and a reference to the element MFT, which already provides complete information about the catalog item. The internal directory structure is binary tree (B-tree). This means that in order to find a file with a given name in a linear directory, such as FAT, for example, the OS has to look through all the elements of the directory until it finds the right one. A binary tree, on the other hand, arranges file names in such a way that the search for a file is carried out in a faster way - by obtaining two-valued answers to questions about the location of the file. The question that a binary tree can answer is: in which group, relative to a given element, is the desired name located - above or below? Such a search begins with a question to the middle element, and each answer narrows the search area by an average of two times. The files are sorted alphabetically, and the question is answered in the obvious way - by comparing the initial letters. The search area, narrowed by two times, begins to be explored in a similar way, starting again from the middle element. An example of a B-tree search is shown in fig. ten.

Thus, to search for one file among, for example, 1000, FAT an average of 500 comparisons would have to be made (most likely the file would be found in the middle of the search) and a B-tree system only about 10 (2 10 = 1024).

The main directory of the disk - the root - is no different from ordinary directories, except for a special link to it from the beginning of the metafile MFT.

NTFS- a fault-tolerant system that can bring itself into the correct state in almost any real failure.

In table. 4 shows the restrictions imposed on file systems NTFS and FAT.

Table 4 File system limits

For new OS Vista Microsoft is developing a new file system Windows Future Storage (WinFS – « upcoming storage system"), designed to replace NTFS and FAT. At the core WinFS lies modified NTFS with improved functions of administration, organization of access to files, synchronization and protection of file resources.

The new file system is designed to store files based on their content criteria, i.e. author, content, name, source, and last accessed user. Folder structure displayed in Explorer, is just a virtual map.

essence WinFS is the so-called data model- a mechanism that constantly administers and structures digital elements or "things" ( items). Items use descriptive elements that go beyond the notion of a file. These descriptive elements are not present in the file, but are wholly owned and controlled by WinFS. With this scheme, not only files can be registered as objects, but also, for example, contacts, Internet links, letters, etc.

From the user's point of view, items remove the need to use the physical location of the files. Instead, the OS organizes data, depending on its content, into virtual folders. When searching for data, custom criteria like " All ICT course documents for the last two years' replace information about the file format, authors, and location.

Microsoft has implemented a changing item model in WinFS, i.e. users can define items themselves using metadata XML and show connections between things. In this case, it is possible, for example, to display all documents of a given author along with information about his address and related documents.

Task #4 1. Determine what file systems are used on the hard disk of your workstation: · execute the commands of the main Windows menu: Start Þ Settings Þ Control Panel Þ Administrative Tools Þ Computer Management; · in the left pane of the Computer Management console, expand the Storage devices section and double-click the Disk Management option; · in the right pane of the Computer Management console, information about the structure of disks and the file systems used will be displayed; Record this information in your workbook; · close the console window. 2. Determine the characteristics of the logical and physical disks of your workstation: · run the Windows main menu commands: Start Þ Programs Þ Accessories Þ System Tools Þ System Information; · in the left pane of the System Information console, expand the Components section, and in it, the Storage devices subsection; · Double-click to select the first Disks option. The right pane displays the characteristics of the logical drives. Write down the values ​​in your workbook; · Double-click to select the second Disks option. The right pane displays the characteristics of the physical disks. Write down the main meanings in your workbook; · close the console window.

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 the BIOS is loaded, the boot area of ​​the disk is read and executed to start the operating system.

FAT file system

The FAT file system appeared with the Microsoft DOS operating system, 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 the advent of Windows 95, a new version of the FAT32 file system was released with theoretical support for drives up to 2 TB. Persistent problems with supporting large disks appear due to the 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 on disk. 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 several clusters may be required to accommodate a file, which may not be physically located one after another, 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 worked with IBM on the OS/2 operating system with the HPFS (High Performance File System) 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) 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.

Top Related Articles