File system. File system structure What is the difference between FAT32, NTFS and exFAT File system

Every time we format a flash drive, an SD card, an external or internal hard drive, we remember that before formatting any device, the Windows operating system must always supply power to any file system. do you want Format your device: FAT32, NTFS or exFAT?

Obviously, most buyers do not know the difference between them and therefore choose the option that follows the rules. And all that Windows, which supplies power, does not explain the difference between them. This article will try to explain to you intelligently the facts about how the FAT32 file system differs from NTFS and exFAT.

FAT32 It is the oldest for analyzing file systems and is most often used on portable flash drives - flash drives or SD cards.

NTFS Windows is used as the main file system for the disk on which the operating system is installed, and it is also suitable for other drives and hard disk partitions on a computer running Windows.

exFAT It is more of a modern analogue of the old FAT32 system and supports more devices, less than NTFS, but is still not as rich as the “classic” FAT32.

Now let's look at the report on these file systems.

File system FAT32

FAT32 It is the oldest file system among those considered in this statistic. She began to actively work against Windows 95 and came to replace an even older system – FAT16.

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

This is due to the fact that FAT32 has become a standard and is still used in all modern wearable devices. If you buy a flash drive or SD card today, it will have the FAT32 file system installed “from the factory.” This is especially important so that your replacement can be supported not only by modern computers and gadgets, but also by old devices and game consoles that have a USB port and only use the FAT3 file system 2.

However, due to the size of the system, there are some minor issues, mainly related to the size of the file and so on. Each file in this file system cannot be larger than 4 gigabytes in size, and the entire partition in the FAT32 file system cannot be larger than 8 terabytes.

And if you can still fully accept another minus (so far, few people have storage devices larger than 8TB), then depending on the file size there is a serious minus - more videos at a high This is no longer possible for the 4GB size, especially because of the current format 4K.

However, this file system is still entirely suitable for portable devices (such as flash drives and SD cards that can accommodate a number of small files), but is not suitable for a computer’s hard drive. First of all, it does not provide any security features that are available in the more common NTFS file system, and often through this you will no longer be able to install the current version of Windows on a disk with a FAT32 system, you will need to reformat it to NTFS.

Sustainability FAT32

Devices with the FAT32 file system are the most universal and compatible with all versions of the operating systems Windows, Mac OS, Linux, game consoles and almost anything that accepts a USB port.

FAT32 exchange

The main disadvantage of this file system is the limitation on file size - the maximum file size cannot exceed 4 GB, and the maximum size of a section cannot exceed 8 TB.

Zastosuvannya FAT32

The main area of ​​​​the value of the file system is external storage data, which does not transfer the storage of large files and which require maximum capacity due to the large amount of diversity these outbuildings.

File system NTFS

NTFS- this is a modern and technological file system, what to say is the decoding of the abbreviation and name - " new technology file system". What I love most is the Windows operating system, which is not surprising - even those that have been split up by Microsoft.

Starting with the version of the Microsoft operating system called XP, in which the NTFS system first became standard, when installing Windows, the dialog box will ask you to format the system partition itself into this file system. At this point, it is important to note that, theoretically, you won’t have to worry about sharing the NTFS file system for a long time.

In addition to the fact that there are serious restrictions on the size of a file and partition, NTFS has a number of additional benefits, such as: maintaining access rights to files (for increased data security), logging changes (for updating file structure in case of failure), encryption, disk quotas, hard downloads and other everyday functions such as making NTFS ideal for the system drive.

The very partition of your disk on which the Windows operating system is installed is necessarily responsible for formatting in NTFS. If you plan to install programs on other partitions of the same disk or other hard drives, they are also to blame for the underlying file system.

Unfortunately, NTFS is not compatible with most other operating systems, as it has been split up for Windows applications. All versions of the operating system from Microsoft work well with it, starting with XP and ending with the current Windows 10, and other operating systems may have different values ​​when working with it.

For example, Mac OS can only read data from disks with the NTFS file system, but cannot write to them. Some rare Linux distributions may be able to write to disks with NTFS, but most still share unreadable information. Both versions of the Playstation cannot work with NTFS, like the Xbox 360 from Microsoft, and the new Xbox One does not support this file system.

The madness of NTFS

This file system works seamlessly with the remaining versions of the operating system Windows systems Starting with XP, it is limited to recording on Mac OS and Linux, and does not work on most other devices, except for the Xbox One.

NTFS exchange

Measurements for the size of files or partitions in NTFS still need to fit against the frame, so we can say that at the moment there are none.

Zastosuvannya NTFS

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

exFAT file system

exFAT was first introduced in 2008 and is the largest current file system that can be seen in this statistic, and support was added to Windows starting with the XP version for additional OS updates.

The exFAT file system was created and optimized for use on external storage devices - flash drives, SD cards and external hard drives, and was intended to replace the outdated FAT32 system. It is the lightest and simplest file system, however, there are various special features that apply to NTFS, as well as the same restrictions on the size of the file and partition, which is FAT32.

Also, exFAT can be advantageous with various operating systems, other than NTFS, and devices with it can be read and rewritten wonderfully on both Windows and Mac OS, as well as on Linux (without installing any software).

Since exFAT shards are supported by the Mac OS operating system, it will likely be supported by most other current devices that use Apple devices, such as digital cameras.

Current versions of game consoles, such as Xbox One and Playstation 4, also support devices with the exFAT file system to be administrated under them previous versions(Xbox 360 and Playstation 3).

Crazy exFAT

exFAT works wonderfully with all current versions of Windows (starting with XP) and Mac OS. To work with Linux, you need to install additional software. This file system is supported much more various outbuildings, lower NTFS, however, some of them (most importantly older versions) can still be processed only by FAT32.

exFAT

Also, as with NTFS, there are still no realistic boundaries for the size of a file or partition in the exFAT system.

exFAT

This file system is perfectly suitable for storage on a variety of portable media, the size of files on which can exceed 4 GB (modern hard drives, large-capacity flash drives). Since all the devices you use, including current ones, you can use FAT32 on some exFAT drives.

Supposedly, you can develop the following solutions: NTFS is ideally suited for a system hard drive running Windows, exFAT is easier to use on important media, and FAT32 is easier to use because and want to achieve maximum efficiency with all the dimensions of your devices.

Enter

2.1 FAT16 system

2.2 FAT32 system

2.3 Change of FAT16 and FAT32

3.1 NTFS system

3.2 Change NTFS and FAT32

Visnovok

List of references

Enter

At any given time, tens of thousands of files are recorded on one disk. How can I contact everyone of different types to ensure that I can access the file accurately? The file system assignment is effectively the highest priority of the assigned task.

The file system, in the eyes of a professional, is a “space” in which files are located. And as a scientific term, it is a way of saving and organizing access to data on an information medium or other section. The presence of the file system allows you to determine the name of the file where it is located. In IBM PC fragments - in modern computers, information is stored primarily on disks, then the file systems that are installed by them indicate the organization of data on the disks themselves (more precisely, on logical disks). Let's look at the FAT file system.

fat ntfs file system

1. History of creation Zagalny characteristic FAT file system

The FAT (File Allocation Table) file system was developed by Bill Gates and Mark McDonald in 1977 and was initially used in the 86-DOS operating system. In order to achieve portability of programs from the CP/M operating system to 86-DOS, it retained the previously adopted file names. Then 86-DOS was acquired by Microsoft and became the basis of the MS-DOS 1.0 operating system, released in 1981. FAT is intended for working with disk drives smaller than 1 MB in size, and does not initially transfer support hard disks. Currently, FAT supports files and partitions up to 2 GB in size.

FAT has the following options regarding file names:

I can start with letters or numbers and I can place whatever ASCII character, in addition to the space and symbols "/\ :; |=,^*?

The name extension does not exceed 8 characters, followed by a period and is necessarily extended to 3 characters.

The case of characters in file names is not changed and is preserved.

The structure of the FAT section is shown in table. 1.1. The BIOS parameters block contains BIOS information about the physical characteristics of the hard drive. The FAT file system cannot directly control each sector, so it combines large sectors into clusters. In this way, the number of storage units that the file system can monitor changes. The size of the FAT cluster is in steps of two and is determined by the size of the volume when the disk is formatted (Table 1.2). A cluster has the minimum amount of space that a file can occupy. This leads to the fact that part of the space of the disk is wasted. The operating system includes various utilities (DoubleSpace, DriveSpace), which are used to enhance data on the disk.

Table 1.1 – Structure of the FAT section

Vanguard sector BIOS parameter block (BPB) FATFAT (copy) Root directory File area

FAT derives its name from a single-name file allocation table. The file allocation table stores information about the logical disk clusters. The FAT skin cluster is represented by a continuous record that shows whether the data is active in the file, or what is being killed (sealed). If a cluster is assigned to a file, then the associated file allocation table entry specifies the cluster addresses to be assigned to the corresponding part of the file. Through this FAT is called a file system with linked lists. The original version of FAT, developed for DOS 1.00, used a 12-bit file allocation table and supported partitions up to 16 MB (in DOS you can create no more than two FAT partitions). To support hard drives over 32 MB in size, the FAT capacity was increased to 16 bits, and the cluster size was increased to 64 sectors (32 KB). Since a skin cluster can be given a unique 16-bit number, FAT supports a maximum of 216 or 65536 clusters on a single volume.

Table 1.2 - Cluster dimensions

Partition sizeCluster sizeFAT type< 16 Мб4 КбFAT1216 Мб - 127 Мб2 КбFAT16128 Мб - 255 Мб4 КбFAT16256 Мб - 511 Мб8 КбFAT16512 Мб - 1023 Мб16 КбFAT161 Гб - 2 Гб32 КбFAT16

If the backup record is too low to save the algorithm to search for system files on the disk, then the system files are located in the right place so that the backup record can find them. The fixed placement of system files on the surface of the data area imposes a rigid constraint on the size of the root directory and file allocation table. As a result, the number of files and subdirectories in the root directory on the FAT disk is limited to 512.

Every file and subdirectory in FAT is assigned a 32-byte directory element that contains the file's name and its attributes (archive, archived, system, and read-only) ), date and time of creation (or made before any further changes), as well as other information (Table 1.3).

Table 1.3 - Catalog elements

The FAT file system fills up the available space on the disk from start to finish. When a new or larger file is created, the first large cluster in the file allocation table is searched. If during the process some files were deleted and others changed in size, the resulting empty clusters will be scattered across the disk. If the clusters that contain data to the file are not fully grown, the file appears fragmented. Heavily fragmented files significantly reduce the efficiency of the work, so that the read/write heads will move from one area of ​​the disk to another when searching for a write to the file. Operating systems that support FAT may include special disk defragmentation utilities to improve the productivity of file operations.

Another shortcoming of FAT lies in the fact that its productivity lies in the number of files that are stored in one directory. With a large number of files (close to thousands), the operation of reading the list of files from the catalog can take a lot of time. This is due to the fact that the FAT directory has a linear, unordered structure, and the names of files in the directories are in the order they were created. As a result, the more entries there are in the catalog, the more programs work, so when searching for a file, you need to look through all the entries in the catalog one by one. Since FAT was originally designed for a single-system DOS operating system, it does not transfer saving information such as information about the owner or renewing access to the file/directory. Due to its versatility, FAT can be used on volumes that run different operating systems.

Although it is not possible to avoid defective code when formatting floppy disks to another file system, most operating systems are able to defeat FAT. In part, it can be explained that the simple structure of FAT provides less space for saving service data on other systems. The advantages of other file systems become even more noticeable when they are installed on devices with a capacity of over 100 MB.

It is important to note that FAT is a simple file system that does not store files through abnormal computer shutdowns. Operating systems that support FAT include special utilities that check the structure and correct inconsistencies in the file system.

2. Characteristics of file systems FAT16 and FAT32 and their alignment

.1 FAT16 system

The file system is FAT 16, which is the basis for the operating systems DOS, Windows 95⁄98⁄Me, Windows NT⁄2000⁄XP, and also supports most other systems. FAT 16 is a simple file system designed for small drives and simple directory structures. The name is similar to the name of the file organization method – File Allocation Table. This table is located on the disk. The number 16 means that the file system is 16-bit - 16 bits are used to address clusters. The operating system creates a file allocation table for a given file and the number of clusters that the file occupies on the hard drive. In addition, the Table records information about active and defective clusters. To make it easier to understand the FAT16 file system, you will recognize the replacement of the book and how you work with this replacement, the same way the operating system itself works with FAT 16.

To read a file, the operating system must find the folder's record on the file name and read the number of the first cluster in the file. The first cluster is the beginning of the file. Then it is necessary to read the FAT element corresponding to the first cluster file. If the element to place the label remains at the lanyard, then there is no need to worry about anything: the entire file fits in one cluster. If the cluster is not permanent, the table element contains the number of the current cluster. Instead of the next cluster, there may be readings after the first one. If the remaining cluster in the lanyard is found, then if the file does not occupy the entire cluster, it is necessary to access the cluster bytes. Requests bytes are sent to the latest file that is saved in the folder entry.

To write a file, the operating system may follow this sequence of actions. A file description is created for each folder entry, then the entire FAT item is searched for, and the message for the new one is placed in the folder entry. The first cluster is occupied, which is described by the found FAT element. This FAT element will place the number of the offensive cluster or the sign of the remaining cluster in the lanyard.

The operating system operates in such a way as to collect lanyards from neighboring clusters based on incremental numbers. It is understood that the number of clusters that are gradually expanded will be much faster, down to clusters that are randomly scattered across the disk. In this case, the values ​​already occupied by FAT are ignored as defective clusters.

For the FAT16 file system, the cluster number has 16 digits. Therefore, the maximum number of clusters is 65,525, and the maximum cluster size is 128 sectors. In this case, the maximum size of partitions or disks for FAT16 is 4.2 gigabytes. With a logical format of the disk or partition, the operating system is forced to maintain the minimum cluster size, so that the number of clusters that emerge does not exceed 65525. Obviously, the larger the partition size, then The cluster size is more to blame. Many operating systems do not work correctly with a cluster of 128 sectors. As a result, the maximum size of a FAT16 partition changes to 2 gigabytes. Consider that the larger the cluster size, the greater the waste of disk space. This means that the remaining cluster is less likely to be filled with files or filled in frequently. For example, if a file with a size of 17 KB is written to a partition with a cluster size of 16 KB, this file will occupy two clusters, and the first cluster will be filled completely, and in the other cluster only 1 KB of data will be written, and the 15 KB of data will not be filled in the space of the other cluster i they will not be available for writing other files. If large disks record a large number of small files, then the waste of disk space will be significant. Table 2.1 provides information about the possible waste of disk space with different partition sizes.

Table 2.1.1 - Waste disk space

Partition sizeCluster sizeDisk space consumption127 MB2 KB2%128-255 MB4 KB4%256-511 MB8 KB10%512-1023 MB16 KB25%1024-2047 MB32 KB40%2048-40

There are two ways to change disk space consumption. The first is to distribute the disk space into smaller sections with a small cluster size. Another is the FAT32 file system wiki<#"center">2.2 FAT32 system

The FAT32 file system is a new file system based on the FAT format, and is supported by Windows 95 OSR2, Windows 98 and Windows Millennium Edition. FAT32 uses 32-bit cluster IDs, but reserves the most significant 4 bits, so the effective size of the cluster ID is 28 bits. While the maximum size of FAT32 clusters is still 32 KB, theoretically FAT32 can be used with 8 terabyte volumes. Windows 2000 limits the size of new FAT32 volumes to 32 GB, although it supports larger FAT32 volumes on other operating systems. The larger number of clusters that FAT32 supports allows disks to be stored more efficiently than FAT 16. FAT32 can accommodate 512-byte clusters for volumes up to 128 MB in size.

The FAT 32 file system for Windows 98 is considered to be the default one. This operating system comes with a special program for converting a disk from FAT 16 to FAT 32. Windows NT and Windows 2000 can also use the FAT file system, and you can convert the computer from a DOS disk and mother public access to all files. However, Windows NT and Windows 2000 will most likely support the NTFS (NT File System) file system. NTFS allows you to create partitions on a disk with a volume of up to 2 TB (like FAT 32), and, in addition, it has the functions of file compression, security and auditing, which are necessary for time-sensitive work. And in Windows 2000, support for the FAT 32 file system is implemented. The installation of the Windows NT operating system begins on a FAT disk, and if the user is advised, at the end of installation, the data on the disk can be converted to the NTFS format.

You can earn more money later by using the Convert utility. exe, which is downloaded immediately from the operating system. By converting to the NTFS system, the disk partition becomes inaccessible to other operating systems. To upgrade to DOS, Windows 3.1 or Windows 9x, you need to delete the NTFS partition and create the FAT partition instead. Windows 2000 can be installed on a disk with the FAT 32 and NTFS file system.

The capabilities of FAT32 file systems are much wider than those of FAT16. The most important feature is that it supports disks with a capacity of up to 2047 GB and works with smaller clusters, which essentially reduces the cost of unused disk space. For example, a 2 GB hard drive with FAT16 contains 32 KB clusters, and FAT32 contains 4 KB clusters. In order to save money on essential programs, software and device drivers, FAT32 is implemented with minimal changes in architecture, APIs, internal data structures and disk format. Well, the fragments of the size of the elements of the FAT32 table now include many bytes, a lot of internal and disk data structures, as well as the API interfaces had to be reviewed or expanded. The API on FAT32 drives is blocked to prevent corrupted disk utilities from damaging FAT32 drives. In most programs, these changes will not be indicated. Basic tools and drivers run on FAT32 drives. However, MS-DOS block device drivers (for example, Aspidisk.sys) and disk utilities will require modification to support FAT32. All disk utilities supplied by Microsoft (Format, Fdisk, Defrag, as well as ScanDisk for real and protected modes) have been redesigned and now support FAT32. In addition, Microsoft is helping existing users of disk utilities and device drivers modify their products to support FAT32. FAT32 is more effective than FAT16 when working with larger disks and does not require them to be divided into 2 GB sections. Windows 98 necessarily supports FAT16, since this file system itself is incompatible with other operating systems from third-party companies. MS-DOS has real mode and safe mode Windows modes 98, the FAT32 file system is much larger than FAT16. Therefore, when starting a program in MS DOS mode, you should include the Autoexec file. bat or PIF file command for downloading Smartdrv. exe to perform disk operations. Old programs that are designed according to the FAT16 specification may provide incorrect information about the amount of free or limited disk space that is larger than 2 GB. Windows 98 introduces new APIs for MS-DOS and Win32 that allow you to correctly display data.

.3 Change FAT16 and FAT32

Table 2.3.1 - Change of file systems FAT16 and FAT32

FAT16FAT32 Is implemented and supports most operating systems (MS-DOS, Windows 98, Windows NT, OS/2, UNIX). Currently only supported in Windows 95 OSR2 and Windows 98. It is also effective for logical drives smaller than 256 MB. Does not work with disks smaller than 512 MB. Supports disk compression, for example, the DriveSpace algorithm. Does not support disc compression. It collects a maximum of 65525 clusters, the size of which can be stored on a logical disk. While the maximum size of clusters remains 32 KB, FAT16 can be used with logical drives of up to 2 GB. Works well with logical disks with a capacity of up to 2047 GB with a maximum cluster size of 32 KB.

The maximum storage capacity for a FAT32 file is 4 GB with 2 bytes saved. Win32 programs can open files of this size without any special processing. Other programs are guilty of interrupting Int 21h, function 716C (FAT32) with the ensign, which is the same as EXTEND-SIZE (1000h).

The FAT32 file system has 4 bytes per skin cluster in the file allocation table, just as FAT16 has 2 bytes, and FAT12 has 1.5 bytes.

The most significant 4 bits of the 32-bit element of the FAT32 table are reserved and take part in the generated cluster number. Programs that directly read the FAT32 table must mask them and protect them from being changed when writing new values.

Also, FAT32 may have new features that are equal to the many implementations of the FAT file system:

supports disks with a capacity of up to 2 TB;

Organizes disk space more efficiently. FAT32 vikoryst clusters of a smaller size (4 KB for disks up to 8 GB), which allows you to save up to 10-15% of the space on large disks equal to FAT;

the root directory FAT 32, as well as the rest of the directories, no longer interconnected, consists of a cluster of clusters and can be expanded to any disk location;

It is more reliable: FAT32 is designed to move the root directory and work with a FAT backup, in addition, backup storage on FAT32 disks has been expanded to include a backup copy of critical data structures, which means FAT32 drives are less sensitive to the fault meatless plots, lower and lower FAT-volumes;

programs will be fascinated by 50% more.

Table 2.3.2 - Change of cluster sizes

Disk volume Cluster size for FAT16, KB Cluster size for FAT32, KB 256 MB-5 TB 3 Nebyte 3

3. An alternative file system is NTFS and is compared to FAT32

3.1 NTFS system

(New Technology File System) - the shortest file system when working with Windows NT OS, which was specially divided for this system. Windows NT comes with a convert utility that can convert FAT volumes and HPFS volumes from NTFS volumes. NTFS significantly expands its capabilities to control access to multiple files and directories, introduces a large number of attributes, implements data resistance, features dynamic file compression, and supports the POSIX standard. NTFS allows you to shorten file names up to 255 characters, which uses the same algorithm for creating a short name as VFAT. NTFS has the ability to self-update in the event of an OS failure or ownership, so that the disk volume is no longer accessible, and the directory structure is not destroyed.

The file on the NTFS volume is stored as an entry in a special file – the main file table MFT (Master File Table). NTFS reserves the first 16 table entries of approximately 1 MB of special information. The first table entry means the main file table itself. This is followed by the MFT mirror recording. As the first MFT record is created, NTFS reads another record to find a mirror MFT file, the first record of which is identical to the first MFT record. The retouching of MFT data segments and the MFT mirror file is saved in the cob sector. A copy of the cob sector is located at the logical center of the disk. The third MFT entry contains the registration file that is used to update files. The seventeenth and current records of the head file table are mapped to the files and directories on the volume.

The transaction log (log file) records all operations that affect the volume structure, including file creation and any commands that change the directory structure. The transaction log is frozen when the NTFS volume is updated after a system failure. The entry for the root directory contains a list of files and directories that are stored in the root directory.

The scheme for dividing space on a volume is saved in a bitmap file. The attribute of this file contains a bitmap that represents one cluster of the volume and indicates which particular cluster is occupied by this file. It also supports a bad cluster file for registering bad parts on a volume and a volume file to contain the volume name, NTFS version and bits that are installed when the volume is damaged. Narestі, є file, pijeum of the Voznoenniki attribute table (Attribute Definition Table), yak is given to the attribute, pindright on Tomi, I pushing the їKO INEKSUVATI, Vidnovati distributes space into clusters and vikoryst for numbering 64, which gives the possibility of 264 clusters, each up to 64 KB in size. Like FAT, the size of the cluster can be changed, but necessarily grows proportionally to the size of the disk. The dimensions of the clusters that are installed when formatting the partition are shown in Table 3.1.

Section size Cluster size< 512 Мб512 байт513 Мб - 1024 Мб (1 Гб) 1 Кб1 Гб - 2 Гб2 Кб2 Гб - 4 Гб4 Кб4 Гб - 8 Гб8 Кб8 Гб - 16 Гб16 Кб16 Гб - 32 Гб32 Кб>32 GB64 KB Allows you to save files up to 16 exabytes (264 bytes) in size and may force file extensions in real time. The constraint is one of the attributes of a file or directory, and the like can be removed or installed at any time (the constraint is possible on partitions with a cluster size of no more than 4 KB). When a file is compressed, the file extension is installed in the format of the extension schemes that are used by FAT, so that the removal of a small portion of the disk does not lead to the loss of information in other files.

To change NTFS fragmentation, you must first save files in permanent blocks. This system has a B-tree-style directory structure similar to the HPFS high-performance file system, rather than a FAT linked list structure. Therefore, the search for files in the catalog is faster, since file names are kept sorted in lexicographical order. The file system has been fragmented, which means that the transaction processing model is different. An I/O operation that changes a file on an NTFS volume is treated as a transaction and can be written as a non-shared block. When a file is modified, the service registry file records all necessary information for repeating or canceling the transaction. Once the transaction is completed successfully, the modification to the file is completed. However, NTFS accepts transaction rollback.

Regardless of the presence of unauthorized access to data, NTFS does not provide essential confidentiality for the information that is stored. To deny access to files, it is enough to start the computer in DOS with a floppy disk and install some kind of NTFS driver for this system.

Starting with Windows NT 5.0 (the new name for Windows 2000), Microsoft supports the new NTFS 5.0 file system. IN new versions NTFS additional file attributes have been introduced; In addition to the right of access, the concept of access protection has been introduced, which allows, for example, when a person has inherited group rights to a file, to protect the ability to change it instead. New system also allows:

introduce limits (quotas) for the amount of disk space allocated to the employees;

Project any directory (both on the local and on a remote computer) to a subdirectory on the local disk.

What the new version of Windows NT offers is dynamic encryption of files and directories, which increases the reliability of saving information. Windows NT 5.0 comes with an Encrypting File System (EFS), which uses secret key encryption algorithms. If the encryption attribute is set for the file, then when the program is opened to the file for writing or reading, there is a gap for the program to encode and decode the file.

.2 Change NTFS and FAT32

Advantages:

Provides speedy access to small files;

The size of disk space today is practically unlimited;

File fragmentation does not affect the file system;

The reliability of saving data from the file structure itself is high;

High productivity when working with large files;

Nedoliky:

Everything you can do to get by RAM adjusted from FAT 32;

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

Low fluidity of the robot equalized with FAT 3232

Advantages:

High speed of work;

Low requirement for operative memory;

Effective work with files of medium and small sizes;

Less wear on disks means less read/write heads need to be re-swept.

Nedoliky:

low protection from system failures;

It is not effective to work with files of great size;

Oberzhenya for the maximum obligation to the section and file;

Reduced speed code during fragmentation;

Reducing the speed code when working with directories to accommodate a large number of files;

Also, file systems save data in clusters, the minimum size of which is 512 b. As a rule, the initial cluster size is 4 Kb. Where will it probably end? A word about fragmentation: the speed of NTFS work decreases sharply when the disk is 80 - 90% full. Due to the fragmentation of service and work files. The more you work on such a busy disk, the greater the fragmentation and the lower the productivity. With FAT 32, fragmentation of the working area of ​​the disk occurs at early stages. On the right here lie depending on how often you record/send data. Like NTFS, fragmentation greatly reduces productivity. Now about RAM. The volume of the FAT 32 electronic table itself can take up close to several megabytes of RAM. If I can help you, please come and help me. What to write to cache:

Most popular catalogues;

Data about all the files that are being reviewed at the moment;

Data about the free space of the disk;

What about NTFS? It is important to cache catalogs of great size, which can reach several tens of megabytes in size. Plus MFT plus information about the free space on the disk. I would like to note that NTFS still consumes RAM resources economically. Apparently the data saving system has revealed that in MFT the skin record is approximately 1 Kb. However, you can still use more RAM, but not for FAT 32. In short, if your memory is smaller or older than 64 Mb, then from the point of view of speed, FAT 32 will appear. she’s small, but she often burst into flames no way. Now about the hardest disk. For NTFS applications, Bus Mastering is required. What is it? This is a special mode of the robot driver and controller. When the BM is selected, the exchange is carried out without the participation of the processor. The availability of VMs affects the productivity of the system. In addition, as a result of the growth of a folding file system, the number of read/write heads is growing, which itself is draining the fluidity. The presence of the disk cache, however, is positively indicated, as in NTFS, and on FAT 32.

Visnovok

The advantages of FAT are low overhead costs for saving data and total savings due to the large number of operating systems and hardware platforms. This file system, as before, does not play a role in formatting floppy disks, so that the partition is supported by other file systems, and low overhead costs allow you to economically format a small diskette volume (NTFS There is more space for saving data, which is absolutely not good for floppy disks).

The FAT32 storage area is actually quite rich - this file system must be sealed if you want to deny access to partitions please help Windows 9x and for additional Windows 2000/XP. Since the relevance of Windows 9x today has practically ceased, the evolution of this file system is not of particular interest.

List of references

1. http://yura. Puslapiai. lt/archiv/per/fat.html

Material before survey lecture No. 33

for students of specialty

"Information technology security software"

Associate Professor of the Department of IVT, Ph.D. Livak O.M.

FILE MANAGEMENT SYSTEMS

Basic concepts, facts

Assigned. Features of file systemsFATVFATFAT 32,HPFSNTFS. File systems UNIX OS (s5, ufs), Linux OS Ext2FS. System areas of the disk (partition, volumes). Principles of file placement and saving information about file placement. Organization of catalogues. Limited access to files and directories.

Skills and memories

Basic knowledge about the structure of the file system for the protection and updating of computer information (files and directories). Organizing access to files.

File system. File system structure

The data on the disk is saved as files. The file is part of the disk.

For file management, file management systems are used.

The file system logically provides the ability to manage the data stored in files. The file system itself is a way of organizing data on any data carrier.

In such a manner file system - this set of specifications for a specific security program that covers the creation, reduction, organization, reading, writing, modification and movement of file information, as well as the core access to files and resources that are used to access files.

The file management system is the main subsystem of absolutely most modern operating systems.

For additional help with the Keruvan file system

· Contact all system software for data;

· There are problems with centralized disk space and data management;

· It is possible to carry out operations on files (this is also possible), exchange data between files and different devices, and protect files from unauthorized access.

Some operating systems may have multiple file management systems, which provides the ability to work with multiple file systems.

We will try to separate the file system and the file system with files.

The term "file system" refers to the principles of access to data organized in files.

Term "File management system" depends on the specific implementation of the file system, then. This is a set of software modules to provide the robot with files for a specific OS.

Also, to work with files organized according to a specific file system, a separate file management system can be developed for each OS. This UV system is less practical than this OS, which is why it was created.

For the Windows OS family, the most commonly used file systems are: VFAT, FAT 32, NTFS.

Let's take a look at the structure of these file systems.

On the file system FAT The disk space of any logical disk is divided into two areas:

System area

· Data area.

System area is created and initialized during formatting, and then updated when the file structure is manipulated.

The system area consists of the following components:

· Vandalized sector, to take revenge on the vandalized record (boot record);

· Reserved sectors (they may or may not exist);

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

· Root directory (ROOT).

These components are distributed on the disk one by one.

Data area Place files and directories in root order.

The data area is divided into so-called clusters. A cluster is a collection of multiple sectors of a data area. On the other hand, a cluster is a minimal unit of disk memory that is addressed and seen by a file. Tobto. a file or directory occupies a whole number of clusters. To create and write a new file to disk, the operating system must enter a number of different disk clusters. These clusters are not necessarily to blame for following one after another. For each file, a list of all cluster numbers assigned to this file is saved.

Dividing the data area into clusters and replacing different sectors allows you to:

· Change the size of the FAT table;

· Change file fragmentation;

· the end of the file is approaching Þ You will be granted access to the file.

However, the large size of the cluster leads to ineffective data storage, especially when there are a large number of small files (even a file is located in the middle of the cluster).

For current file systems (FAT 32, HPFS, NTFS), this problem occurs within the limits of the cluster size (maximum 4 KB)

Data area map T File placement table (File Allocation Table - FAT) Each element of the FAT table (12, 16 or 32 bits) represents one disk cluster and characterizes its status: strong, occupied by a bad cluster.

· If a cluster of divisions is assigned to any file (or activities), then the final FAT element will indicate the number of the corresponding cluster to the file;

· The remaining cluster of the file is indicated by a number in the range FF8h – FFFh (FFF8h – FFFFh);

· If the cluster is free, it must contain zero values ​​000h (0000h);

· A cluster that is not suitable for vikoristan (killed) is indicated by the number FF7h (FFF7h).

Thus, the FAT table has clusters that contain up to one file and are linked together.

The file allocation table is saved immediately after the storage of the logical disk, and more precisely, the transfer is described in a special field in the storage sector.

It is saved from two identical samples, which go one after another. Every time the first copy of the table is destroyed, a friend is victorious.

Due to the fact that FAT is corrupted even more intensively when accessing the disk, it becomes heavily involved in the OP (input/output buffer or cache) and remains there for as long as possible.

The main disadvantage of FAT is the limited processing of files. When a file is created, the rule is that the first strong cluster is visible. This will lead to disk fragmentation and collapsible files. The result is increased work with files.

To view and edit the FAT table, you can use Vikory utilityDiskEditor.

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

Root catalog describes files and other directories. An element of a directory is a file descriptor.

The descriptor for the skin file and directory includes this

· I'm

· Expansion

date of creation or remaining modification

· hour of creation or remaining modification

· attributes (archive, directory attribute, volume attribute, system, holing, reading only)

Dovzhinu file (for directory - 0)

· the field is reserved, so it won’t be victorious

· Number of the first cluster in the list of clusters entered into a file or directory; Having taken this number, the operating system, going up to the FAT table, recognizes other cluster numbers of the file.

So, koristuvach launches the wikiname file. The operating system searches for the file from the required names, looking at the file descriptions in the streaming catalog. If a necessary element is found in the streaming catalog, the operating system reads the number of the first cluster in the file, and then assigns other cluster numbers to the FAT table. Data from these clusters is read into RAM, combining into one continuous chunk. The operating system transfers the file to the server, and the program begins to run.

To review and edit the root directory ROOT, you can also use Vikorist utilityDiskEditor.

File system VFAT

The VFAT (virtual FAT) file system was first introduced in Windows for Workgroups 3.11 and was used for file I/O in secure mode.

This Windows 95 file system is being reviewed.

This is also supported for Windows NT 4.

VFAT is a native 32-bit file system of Windows 95. It is controlled by the VFAT driver. VXD.

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

ALE, the elements of the file allocation table are stripped of 12 or 16 bits, so the same data structure (FAT) is created on the disk. Tobto. f table formatVFAT is the same, as in FAT format.

VFAT order named "8.3" supports long file names. (It is often said that VFAT is not FAT with the help of long names).

The main disadvantage of VFAT is the high cost of clustering with large logical disk sizes and the reduction in logical disk size.

File system FAT 32

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

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

I first vikorized Windows OSR 2 (OEM Service Release 2).

Currently, FAT 32 is being reviewed in Windows 98 and Windows ME.

The numbers are more complete and more evenly matched with the latest implementations of FAT.

1. Much more efficient use of disk space for the cost of using smaller-sized clusters (4 KB) - improved, which saves up to 15%.

2. There are extensions to the valuable record, which allows you to create copies of critical data structures Þ improves the resistance of the disc to the destruction of disc structures

3. You can use a FAT backup copy instead of the standard one.

4. You can move the root directory, otherwise it may seem that the root directory may be out of place Þ Reduces the size of the root directory (512 elements, since ROOT can occupy one cluster).

5. Improved structure of the root directory

Additional fields appeared, for example, the hour of creation, the date of creation, the date of remaining access, the control amount

As before, for a long file name, a number of descriptors are used.

File system HPFS

HPFS (High Performance File System) is a highly productive file system.

HPFS first appeared in OS/2 1.2 and LAN Manager.

Pererahuemo Main features of HPFS.

· Headspace - the basic principles of placing files on a disk and the principles of saving information about file retouching. Introduction to the principles of HPFS high productivity and visibility, and reliability file system.

· Disk space in HPFS is not seen in clusters (as in FAT), but blocks. In the current implementation, the size of the block of acquisitions is equal to one sector, but in principle it could be of a different size. (In fact, a block is the same as a cluster, only a cluster is always related to one sector). Placing files in such small blocks allows Use disk space more efficiently, as a result of unproductive waste of a free place, the average sector has 256 bytes per file. It is clear that the larger the cluster size, the more disk space is wasted.

· The HPFS system will not expand the file in small blocks, or, since there is no such possibility, place it on the disk in such a way that extent(fragments) the file is physically closer to one to one. This approach is appropriate changes the hour of positioning of the write/read heads hard drive and cleanup time (time between inserting the read/write head to the required track). It seems that the FAT file simply shows the first strong cluster.

Extenti(extent) - Fragments of a file that grows in small sectors of the disk. The file contains one extent, as there are no fragmentations, but otherwise several extents.

· Vikorist method balanced two-trees for saving and searching information about the location of files (directories are saved in the center of the disk, in addition, automatic sorting of directories is transmitted), which is quite promotes productivity HPFS (modified from FAT).

· HPFS has special file attribute extensions that allow provide access to files and directories.

Extended attributes (Extended attributes, EAs ) allow you to save additional information about the file. For example, a file can be assigned a unique graphic image (icon), a description of the file, a comment, information about the owner of the file, etc.

HPFS partition structure


On the first partition with installed HPFS, three core blocks:

· Vantage block (boot block),

· Additional block (super block) і

· spare (backup) block.

The stinks occupy 18 sectors.

The amount of disk space in HPFS is divided into parts from several sectors - Smugi(band – smuga, strichka). Kozhna Smuha takes up 8 MB of disk space.

The skin is dark and has its moisture bitmap for sub-sectors The bitmap shows which sectors of the line are occupied and which are empty. The skin sector of the skin is indicated by one bit of your bit card. If bit = 1, then the sector is busy, if 0 is free.

The battle cards of the two smugs will be rotated on the disk, and so the smugs themselves will be rotated. Then the sequence of maps looks like in Fig.

Balanced withFAT. There is only one “bit map” (FAT table) for the entire disk. And to work with it, you have to move the read/write heads through half of the disk.

In order to speed up the positioning of the read/write heads of the hard disk, the HPFS disk is split into pieces.

Let's take a look core blocks.

Zavantazhuvalny block (bootblock)

Locate the volume name, serial number, BIOS parameter block and boot program.

Cob program to know the file OS 2 LDR , reads it into memory and transfers the OS/2 kernel to the OS/2 kernel - OS 2 KRNL. І already OS 2 KRIML for more information from the file CONFIG. SYS It will challenge you to understand all the other necessary program modules and data blocks.

Zavantazhuvalny block of roztashovaniye in sectors 0 to 15.

SuperBlock(super block)

Revenge

· Indicator for the list of bitmaps (bitmap block list). This list contains all the blocks on the disk, such as removable bit cards, which are used to identify bad sectors;

· Indicator of the list of defective blocks (bad block list). If the system detects an incorrect block, it will be added to this list and will no longer be checked to save information;

· indicator for a directory band,

· pointer to the file node (F-node) of the root directory,

· The date of the last check of the partition by the CHKDSK program;

· Information about the line size (in current HPFS implementation - 8 MB).

Super block is located at the 16th sector.

Reserveblock(spare block)

Revenge

· Show on the map of emergency replacement (hotfix map or hotfix-areas);

· Indicator of the list of free emergency blocks (directory emergency free block list);

· a number of system symbols and descriptors.

This block is located at the 17th sector of the disk.

The backup block ensures high flexibility of the HPFS file system and allows you to update corrupted data on the disk.

The principle of file placement

Extenti(extent) - Fragments of a file that grows in small sectors of the disk. The file contains one extent, as there are no fragmentations, but otherwise several extents.

To speed up the positioning of hard disk read/write heads, the HPFS system is used

1) unstash the file from the next blocks;

2) since there is no such possibility, then place the extent of the fragmented file closer to one to one,

For this purpose, HPFS collects statistics, as well as intelligently reserves 4 kilobytes of space at the end of files to grow.

Principles for saving information about file retouching

The file and disk directory are in your own file school F-Node. This is a structure that contains information about file expansion and its extension attributes.

Kozhen F-Node borrows one sector It will always be located next to its file or directory (namely, right before the file or directory). F-Node object

· Dovzhin,

· First 15 characters of the file name,

· Special service information,

· Statistics on file access,

· Extended file attributes,

· List of access rights (or only part of this list, as it is very large); If the expanded attributes are too large for the file node, then an indicator of them is recorded.

· Associative information about file retouching and ordering, etc.

Since the file is uninterrupted, its location on the disk is described by two 32-bit numbers. The first number is the indicator for the first block of the file, and the other is the last extent (the number of blocks one after another that lies on the file).

Since the fragmentation file, the placement of its extents is described in the file node by additional pairs of 32-bit numbers.

A file node can contain information about a maximum of the entire file extent. If a file contains more extents, then its file location is written to an allocation block, which can accommodate up to 40 items per extent or, similar to a directory tree block, to other allocation blocks.

Structure and placement of directories

To save catalogs, use vikory smuga, which is located in the center of the disk.

This is called Smuha directoryband.

Once it is completely full, HPFS begins to place file directories in other folders.

The expansion of the information structure in the middle of the disk significantly speeds up the average positioning time of the read/write heads.

Prote is a significantly larger (aligned with the placement of the Directory Band in the middle of the logical disk) contribution to HPFS productivity gives a benefit method balanced two-trees for saving and searching information about the location of files.

Guess what the file system has FAT The directory has a linear structure, not specifically ordered, so when searching for a file you need to look through it from top to bottom.

HPFS has a directory structure The tree is balanced with entries arranged in alphabetical order.

Kozhen record, what to enter to the tree warehouse, to take revenge

· file attributes,

· Application form for the secondary file university,

· information about the hour and date the file was created, the hour and date it was last updated and downloaded,

· Dovzhinі data, so that the expanded attributes,

· Medical director to the file,

· Up to date file name

· myself,

· and other information.

The HPFS file system, when searching for a file in the directory, looks at the required two-wood tree. This method is very effective, but it does not require consistent reading of all entries in the catalogue, which is also the case in the FAT system.

The size of the skin blocks, in terms of which directories are visible in the current implementation of HPFS, is no more than 2 KB. The size of the entry that describes the file is equal to the size of the file name. Since the file takes up 13 bytes (for format 8.3), a block of 2 KB can accommodate up to 40 descriptive files. The blocks are linked to each other in the list view.

Problems

When files are renamed, crashes may occur due to tree rebalancing. Creating a file, renaming or erasing it can be done up to cascading directory blocks. In fact, renaming can indicate failures due to waste of disk space, if the file size does not increase. To avoid this "damage", HPFS maintains a small pool of free blocks that can be used up in the event of an "accident". This operation may require you to see accessory blocks on a full disk. The owner of this pool of free blocks is saved in SpareBlock,

Principles of placing files and directories on diskHPFS:

· Information about the location of files is distributed throughout the entire disk, when recording each specific file is located (if possible) in adjacent sectors and near the information about its location;

· Directories are located in the middle of the disk space;

· directories are stored in the form of a binary balanced tree with entries arranged in alphabetical order.

Reliability of data storage with HPFS

Whether the file system is responsible for correcting problems that occur when writing information to disk. HPFS system for this vikorist emergency replacement mechanism ( hotfix).

If the HPFS file system has problems writing data to disk, it displays a notification about the file being deleted. Then HPFS stores the information that was written to the defective sector in one of the spare sectors reserved for this period. The list of available spare blocks is stored in the HPFS spare block. When a problem is detected during data recording, a normal HPFS block selects one of the available spare blocks and saves the data from the new one. Then the file system updates emergency replacement card at the reserve unit.

This card is simply a pair of subwords, each with a 32-bit sector number.

The first number indicates the defective sector, and the second number indicates the sector in the middle of the available spare sectors, which is a candidate for its replacement.

After replacing the defective sector with a spare one, the emergency replacement card is written to the disk, and a pop-up window appears on the screen, informing the service provider that the write to the disk has been completed. Now, when the system writes or reads a disk sector, it looks at the emergency replacement map and replaces all the numbers of defective sectors with the numbers of spare sectors with related data.

It should be noted that this reversal of numbers does not affect system productivity, as it only involves physically accessing the disk rather than reading data from the disk cache.

File system NTFS

The NTFS (New Technology File System) file system allows for low-impact changes that are significantly different from other file systems.

Dear, for rare blame, s NTFS partitions can be processed directly fromWindowsNT, For low OS, we want standard implementations of file management systems to read files from NTFS volumes.

However, there are still no comprehensive implementations for working with NTFS on the Windows NT system.

NTFS is not supported in the wide-spread versions of Windows 98 and Windows Millennium Edition.

Main featuresNT FS

· work on disks is usually performed efficiently (much more effective than FAT);

· Features for limiting access to files and directories Þ NTFS partitions provide local security for both files and directories;

· A transaction mechanism has been introduced, when it occurs journaling file operations Þ there is increased reliability;

· it is known that the maximum number of disk sectors and/or clusters is limited;

In a file in NTFS, under the name of the FAT and HPFS file systems, you can place any characters, including a new set of national alphabets, as given in Unicode - a 16-bit expression, which gives 65535 different symbols. The maximum length of a file name in NTFS is 255 characters.

· The NTFS system also has compression features that can condense up to individual files, entire directories, and volumes (and concatenate or assign them at your own discretion).

Volume structure using the NTFS file system

An NTFS partition is called a volume. The maximum possible volume size (and file size) is 16 EB (exabyte 2**64).

Like other systems, NTFS divides disk space into clusters - blocks of data addressed as units of data. NTFS supports cluster sizes from 512 bytes to 64 KB; The standard requires a cluster of 2 or 4 KB in size.

The entire disk space of NTFS is divided into two unequal parts.


The first 12% of the disk is allocated to the so-called MFT zone - the space that can be occupied by the larger head services metafile MFT.

The recording of any given data in the Qiu region is impractical. The MFT zone is always left empty - this is done so that the MFT file can be as fragmented as it grows.

Another 88% of the volumes have the most space for saving files.

MFT(masterfiletable - The official file table is actually a directory of files on the disk, for example, and for itself. This is the purpose of file retouching.

MFT consists of records of a fixed size. The size of an MFT record (minimum 1 KB and maximum 4 KB) is calculated per hour of formatting the volume.

The skin record resembles any file.

The first 16 records are of a service nature and are inaccessible to the operating system - they are called metafiles, Moreover, the first metafile is the MFT itself.

The first 16 MFT elements are one part of the disk and have a strictly fixed position. A copy of these 16 records is saved in the middle of the volume for reliability.

Other parts of the MFT file can be expanded, like any other file, from other places on the disk.

Metafiles are of a service nature - some of them represent any aspect of the robotic system. Metafiles are located in the NTFS root directory. All names begin with the name symbol “$”, although it is difficult to remove any information about them using standard methods. In the table The main metafiles and their meanings have been outlined.

Metafile name

Metafile assignment

$MFT

Master File Table itself

$MFTmirr

A copy of the first 16 MFT records, placed in the middle of the volume

$LogFile

Logging operation support file

$Volume

Service information - label, file system version, etc.

$AttrDef

List of standard file attributes on volumes

Root catalog

$Bitmap

Map of the good day

$Boot

The vantage sector (as part of the vantage sector)

$Quota

The file that has the right to use the disk space (this file is no longer available for use) Windows 2000 with NTFS 5.0 system)

$Upcase

File - a table of the type of great and great letters in file names. With NTFS, file names are written to Unicode (to create 65 thousand different symbols) and searching for large and small equivalents in this category is a non-trivial task

The MFT account saves all information about the file:

· file name,

· Rozmir;

· File attribute;

· Position of the following fragments on the disc, etc.

If one MFT record is not available for information, then a number of records are searched, and it is not obligatory to go further.

Since the file is small in size, the data in the file is saved directly in the MFT, which is lost from the main data in the space between one MFT record.

A file on an NTFS volume is identified by this name file transfers(File Reference), which is represented as a 64-bit number.

· File number, which corresponds to the record number in MFT,

· І sequence numbers. This number will increase immediately if Danish number The MFT is re-examined, which allows the NTFS file system to complete internal integrity checks.

Skin file for NTFS representations for additional help streams(streams), then there are no such “just data” in anything, but streams.

One of the streams is the same as data for the file.

Most of the file attributes are also streams.

Thus, it turns out that the basic essence of the file is only one - the number in the MFT, and everything else, including its streams, is optional.

This approach can be effectively modified - for example, another thread can be “attached” to the file, recording any data.

Standard attributes for files and directories in an NTFS volume include fixed names and type codes.

Catalog in NTFS є special file, which saves messages on other files and directories.

The catalog file is divided into blocks, each of them

· file name,

· Basic attributes

The root directory of the disk is in no way different from the primary directories, except for sending the MFT metafile to the new one.

The internal structure of the directory is a binary tree, like HPFS.

The number of files in the root and non-root directories is not separated.

The NTFS file system supports the NT object-based security model: NTFS treats directories and files as different types of objects and maintains multiple (even overlapping) access rights lists for each type.

NTFS ensures the security of even files; This means that access rights to volumes, directories and files may lie under the cloud account of the user and group, depending on which ones. Of course, when a user accesses a file system object, its access rights are checked against the permissions list of that object. As long as the lawyer has a sufficient number of rights, he will be satisfied; Otherwise, it will take a while to breathe. This security model applies both to local registration of users on computers with NT, and to remote network requests.

The NTFS system also has a self-updating feature. NTFS supports a variety of mechanisms to verify the integrity of the system, including transaction logging, which allows file transactions to be written to a special system log.

At journaling During file operations, the file management system fixes changes to a special service file that are being downloaded. A similar icon will appear at the beginning of an operation related to changing the file structure. If an error occurs during an operation on files, the icon indicating the beginning of the operation will be unmarked as incomplete. When completing the procedure for checking the integrity of the file system after restarting the machine, the unfinished operation will be deleted and the files will be reduced to the cob. If the operation of changing data in files is completed normally, then the log operation of the service file itself is indicated as completed.

The main shortcoming of the file systemNTFS- service data takes up a lot of space (for example, a directory entry takes up 2 KB); - for small sections, service data can take up to 25% of the total cost.

Þ The NTFS system cannot be used to format floppy disks. It is not advisable to use it to format partitions with a volume of less than 100 MB.

OS file system UNIX

UNIX has a number of different types of file systems with their own structure external memory. The most common traditional file system is UNIX System V (s5) and the file system of the UNIX BSD family (ufs).

Let's take a look 5.

The file on the UNIX system has no characters with sufficient access.

The file has the same structure as it is imposed by the editor.

The Unix file system, while hierarchical, is a richly distributed file system.

The file system has a tree-like structure. The vertices (intermediate nodes) of the tree are directories with entries, other directories and files. The leaves of the tree represent files or empty directories.

Respect. In fact, the Unix file system is not tree-like. On the right is that in the system there is the possibility of disruption of the hierarchy in the form of a tree, therefore there is the possibility of association a number of names with this itself instead of the file.

Disk structure

The disk is divided into blocks. The size of the data block is determined when the file system is formatted using the mkfs command, or can be set to 512, 1024, 2048, 4096 or 8192 bytes.

512 bytes are important (sector size).

Disk space is divided into the following areas (small):

· Vanguard block;

· Non-corrosive superblock;

· Massive i-Vuzliv;

· Area for saving (data) files;

· The totality of free blocks (linked to the list);

Cob block

Superblock

i - vuzol

. . .

i - vuzol

Respect. For the UFS file system - everything for a group of cylinders is repeated (except for the Boot block) + there is a special area for describing the group of cylinders

Cob block

The block is located at block No. 0. (Guess where this block is placed in the zero block system extension is considered to be hardware, since the hardware device is first converted to the zero block of the system device. This is the remaining component of the file system that resides in the hardware.

The boot block contains a development program that serves for the initial launch of the UNIX OS. In s5 file systems, only the boot block of the root file system is actually vicorized. In additional file systems, this area is not included in this area, but is not subject to vikorism.

Superblock

You must include operational information about the file system setup and data about the file system setup parameters.

Zokrema superblock to take revenge on such information

· Number of i-nodes (index descriptors);

· Size of the section???;

· Relocation of free blocks;

· List of free i-universities;

· and otherwise.

I have a lot of respect! Free disk space creates linking list of free blocks. This list is stored in the superbloc.

The elements of the list are an array of 50 elements (if a block = 512 bytes, then an element = 16 bits):

· In array elements No. 1-48, the numbers of large blocks are recorded in the space of file blocks from 2 to 49.

· At No. 0 elements there is an indicator on the continuation list, and

· In the remaining element (No. 49), place the indicator on the third element in the array.

If any process to expand a file requires a free block, then the system selects an array element after the order (for the free element), and block No., which is stored in this element, is given to the file. If the file is to be shortened, the numbers that have been added are added to the array of free blocks and the indicator for the free element is adjusted.

If the size of the array is 50 elements, then two critical situations are possible:

1. When we create blocks of files, they cannot fit into the array. One valid block is selected from the file system and the entire array of valid blocks is copied into this block, after which the value of the inserter on the valid element is reset, and in the zero element of the array, which is located in the superblock, the number of the block is written, which the system has chosen to copy instead of the array. At this moment, a new element is created in the list of free blocks (each of 50 elements).

2. If, instead of elements, the array of free blocks is exhausted (if a zero element of the array is equal to zero), then this element is not equal to zero, which means that it is an extension of the array. This continuation is read into a copy of the superblock of RAM.

List of free onesi -Vuzliv. This is a buffer that consists of 100 elements. Anyone has information about 100 numbers of i-nodes that are currently available.

The superblock will always be located in the RAM

Þ all operations (extensive and busy blocks and i-nodes are stored in RAM Þ Minimizing exchanges from the disk.

Ale! If instead of the superblock it is not written to the disk and is kept alive, then problems will arise (inconsistency with the real state of the file system and instead of the superblock). This can also help ensure the reliability of the system’s equipment.

Respect. For UFS file systems, to increase stability, multiple copies of the superblock are supported (one copy per group of cylinders)

Index Descriptor Area

A whole range of descriptions of files, titles i -nodes (i -node).(64 bytes?)

Skin index list (i -vuzol) to the file:

· File type (file/directory/special file/fifo/socket)

· Attributes (access rights) – 10

· Vlasnik identifier for the file

· Identifier of the group owner of the file

· Time to create a file

· Hour of file modification

· One hour of remaining access to the file

· Dovzhina file

· How many times have you sent to this i-node from different catalogs?

· Addresses of blocks in a file

!Regain respect. There is no file name here

Let's look at the report on how it is organized block addressing, where the file is located. Also, the address field contains the numbers of the first 10 blocks in the file.

If the file contains ten blocks, the offensive mechanism begins to work: the 11th element of the field places the number of the block in which 128 (256) are sent to the blocks of this file. In this case, if the file is even larger, then the 12th element of the field is selected - you must place the number of the block, which contains 128 (256) block numbers, and each block contains 128 (256) file system block numbers. And if the file is even larger, then the 13th element is added to the list - where the depth of the list is increased by one.

In this way, we can select a file with the size (10+128+128 2 +128 3)*512.

This can be seen from this view:

Addresses of the 1st block of the file

Addresses of the 2nd block of the file

Addresses of the 10th block of the file

Addresses of the indirect addressing block (block with 256 block addresses)

Addresses of the block of 2 indirect addressing (block with 256 addresses of blocks with addresses)

Addresses to the block 3rd indirect addressing (blocks with addresses of blocks with addresses of blocks with addresses)

File protector

Now we have the greatest respect for the identifier of the ruler and the group and the enemy.

Vikorist on Unix OS three-tier hierarchy of koristuvachs:

The first rhubarb is all koristuvach.

Another reason is the group of koristuvachs. (All the members are divided into groups.

The third river is a specific koristuvach (Groups are made up of real koristuvachs). In connection with this three-tier organization of the skin structure, the file has three attributes:

1) Vlasnik file. This attribute is associated with one specific koristuvach, which is automatically assigned to the file. You can change the owner of the file by creating a file, as well as a command that allows you to change the owner of the file.

2) Protect access to the file. Access to the skin file is divided into three categories:

· Vlasnik's rights (you can work with Vlasnik from this file, in the case of the hidden option – everything is not obligatory);

· Group rights assigned to the file. The owner is not included here (for example, the file may be closed for reading by the owner, and all other members of the group can freely read from this file;

· Reshta koristuvachiv system;

These three categories are regulated by three actions: reading from a file, writing to a file, and writing to a file (in the mnemonics of the R, W, X system, this is consistent). Each file has three categories assigned to it - which one can read, which one can write, and which one can run which process.

Organization of catalogs

The directory, as seen by the OS, is the primary file that contains the data for all files that belong to the directory.

A catalog item consists of two fields:

1) i-node number (ordinal number in the array of i-nodes) i

2) file name:

The skin directory contains two special names: '.' - the catalog itself; '..' - Father's catalogue.

(For the root directory, Dad tries to do his best.)

In a literal way, in catalosis, records can be overwritten more than once, which can be done on the same i-vuzol, but in catalosis, records with the same names cannot be overwritten. So, instead of a file, quite a number of names can be associated. It's called call. A directory element that is associated with one file is called clinking.

Files appear independently of directory elements, and directory links effectively point to physical files. The file is “known” if the remaining links are visible, which indicate a new one.

Then, to deny access to the file on your name, operating system

1. find out the names in the directory to delete the file,

2. select the i-node number for the file,

3. know the i-university number in the i-university area,

4. From the i-node, it retrieves the addresses of the blocks in which the data is added to the file,

5. Following the block addresses, the blocks from the data area are read.

Disk partition structure in EXT2 FS

The entire space of the section is divided into blocks. The block can be of sizes 1, 2 or 4 kilobytes. The block is addressed by one disk space.

Blocks in their area are united in groups of blocks. Groups of blocks in the file system and blocks in the middle of the group are numbered sequentially, starting with 1. The first block on the disk is number 1 and belongs to the group numbered 1. The total number of blocks on the disk (disk partition) is part of the disk, divided into sectors . And the number of groups of blocks may divide the number of blocks, fragments ostannya group blocks may not be replaced again. The beginning of the skin group of blocks is at the address that can be removed as ((group number - 1) * (number of blocks in the group)).

The skin group of blocks may cause problems, however. This structure is presented in the table.

The first element of this structure (superblock) is the same for the whole group, while the other elements are for individual skin groups. The superblock is saved in the first block of the skin group of blocks (except for group 1, in which the first block has a secured record). Superblockє cob point of the file system. The file size is 1024 bytes and is rescheduled at the offset of 1024 bytes from the file system root. The presence of multiple copies of the superblock is explained by the extreme importance of the file system element. Duplicates of the superblock are recovered when the file system is updated after failures.

The information that is stored in the superblock is used to organize access to other data on the disk. A superblock determines the size of the file system, the maximum number of files in a section, the amount of space required to accommodate information about those in unoccupied sections. When the OS starts, the superblock is read into memory and all changes to the file system are immediately found as copies of the superblock that is in the OP and written to the disk only periodically. This allows you to increase the productivity of the system, including a large number of computers and processes that continuously update files. On the other hand, when the system is turned off, the superblock obligesly writes to the disk, which prevents the computer from being damaged by simple functions of life. Otherwise, in the event of access to data, the information recorded in the superblock does not correspond to the real state of the file system.

After the superblock, the Group Descriptors were expanded. This is the description:

Addresses of the block to be placed in the block bitmap of this group;

Addresses to the block to place the inode bitmap of this group;

Addresses to the block to contain the inode table of this group;

The number of free blocks in this group;

The number of valid index descriptors in this group;

Number of index descriptors for this group, including directories

and other data.

The information stored in the group description is searched to find the block and index descriptor bitmaps, as well as the index descriptor table.

File system Ext 2 is characterized by:

  • hierarchical structure,
  • a well-groomed sample of massive data,
  • dynamic file extensions,
  • protection of information in files,
  • treating peripheral devices (such as terminals and line devices) as files.

Internal file representation

The skin file in the Ext 2 system has a unique index. The index contains information that is necessary for any process to access the file. Processes are converted to files that are clearly defined by the system call numbers and identify the file by a series of symbols, which are the storage names of the file. The skin of the name uniquely identifies the file, so the system kernel translates this name into the index of the file. The index includes a table for the address of retrieving information to a file on disk. The disk block fragments on the disk are addressed by number, and this table stores the totality of the disk block numbers. By increasing flexibility, the kernel appends a file one block at a time, allowing the file's information to be distributed throughout the entire file system. But such a placement scheme complicates the search for data. The address table contains a list of block numbers that contains information that belongs to the file.

File index descriptors

Each file on the disk is assigned an index file descriptor, which is identified by its serial number - the file index. This means that the number of files that can be created in the file system is limited by the number of index descriptors, either explicitly specified when the file system is created, or calculated based on the physical volume of the disk partition . Index handles exist on disk in static form and the kernel reads them first and then begins to work with them.

The file index descriptor contains the following information:

- Type and access rights to the file.

Owner Uid of the file.

File size in bytes.

The hour for the file to be downloaded (Access time).

It's time to create the file.

Time to continue modifying the file.

Time to see the file.

Group ID (GID).

Links count.

The number of blocks the file occupies.

File flags

Reserved for OS

Indicators for blocks in which data is recorded in the file (example of direct and indirect addressing in Fig. 1)

File version (for NFS)

ACL file

ACL directory

Fragment address

Fragment number

Fragment size

Catalogs

Directories are files.

The kernel stores data in catalogue, as it does for a file of a primary type, a vicoristic index structure and blocks with direct and indirect addressing levels. Processes can read data from directories in the same way as they can read primary files, however, the right to write to the directory is reserved by the kernel, which ensures the correct structure of the directory.)

Whenever a process accesses a file, the kernel looks in the directories for the index number of the inode. After the file name has been converted into an index descriptor number, this descriptor is placed in memory and then used in subsequent queries.

Additional capabilities EXT2 FS

In addition to standard Unix capabilities, EXT2fs provides several additional capabilities that are not supported by Unix file systems.

File attributes allow you to change the kernel's reaction when working with sets of files. You can set attributes on a file or directory. In another case, the files are created in this catalogue, and these attributes are reduced.

During installation of the system, special actions related to file attributes may be installed. The mount option allows the administrator to select the features of the created files. In a file system with BSD features, files are created under the same group identifier as in the Fatherland directory. The features of System V are very complex. If a directory has a setgid bit, the created files are assigned the group identifier of the directory, and subdirectories are assigned the group identifier and the setgid bit. Otherwise, files and directories are created under the primary group identifier of the selected process.

The EXT2fs system can support synchronous data modification, similar to the BSD system. The mount option allows the administrator to specify that all data (inodes, bit blocks, indirect blocks, and directory blocks) be written to disk synchronously when they are modified. This can be used to achieve high-density information recording and also lead to improved productivity. In fact, this function is not intended to be used, since in addition to the loss of productivity, it may lead to the loss of user data that is not used when revising the file system.

EXT2fs allows you to select the size of a logical block when the file system is open. They can be 1024, 2048 or 4096 bytes in size. The replacement of large-volume blocks should lead to faster input/output operations (as the number of requests to the disk changes), and therefore to less movement of the heads. On the other hand, the use of large-volume blocks leads to a waste of disk space. If the remaining block of the vikoryst file is not used to save information, the larger block will be used to reclaim wasted disk space.

EXT2fs allows you to speed up symbolic messages. When deleting such messages, data blocks of the file system are not vicorized. The file name is stored not in the data block, but in the index descriptor itself. This structure allows you to save disk space and speed up the processing of symbolic messages. Initially, the expanse, reservations under the descriptor, are bounded, so that not every request can be presented as hastened. The maximum length of a file name in a speedily sent message is 60 characters. In the near future we have plans to expand this scheme for small-scale files.

EXT2fs monitors the state of the file system. The vikory kernel creates a local field in the superblock to indicate the state of the file system. If the file system is mounted in read/write mode, it is installed as “Not Clean”. If it is dismantled or remounted in read-only mode, it will be installed in “Clean”. When the system is being restored and the file system is being checked, this information is checked to determine the need to check the file system. The kernel also places the milking table in this field. If the kernel detects a problem, the file system is designated as "Erroneous". The file system check program tests this information to check the system, and then it will actually be “Clean”.

Failure to test the file system of an inode can lead to many problems, so EXT2fs includes two methods for regularly checking the system. The superblock is where the doctor installs the system. This error will increase every time if the system is installed in read/write mode. When this value reaches the maximum (it is also stored in the superblock), then the file system testing program starts a scan, which turns it into “Clean”. The remaining verification hour and the maximum interval between verifications are also stored in the superblock. If the maximum interval between scans is reached, the file system state is ignored and the scan is started.

Productivity optimization

The EXT2fs system has a wealth of features that optimize its productivity, leading to increased speed of information exchange when reading and writing files.

EXT2fs actively uses the disk buffer. If the block is at fault, the kernel is responsible for the insertion/output operation of the transferred blocks. In this way, the kernel is about to roll over, so that the attacking block, which is guilty of damage, is already loaded into the disk buffer. Such operations should be carried out when files are read sequentially.

The EXT2fs system also offers a great deal of optimization of information placement. Block groups are used to combine different index handles and data blocks. The kernel always tries to place the data blocks of one file in one group, as well as its descriptor. This is intended to change the movement of the drive heads when reading a descriptor and related data blocks.

When writing data to a file, EXT2fs will then accommodate up to 8 contiguous blocks when placing a new block. This method makes it possible to achieve high productivity with a highly demanding system. This also allows you to place contiguous blocks for files, making them easier to read.

Before the operating system was released Microsoft Windows NT personal computer users rarely have the problem of choosing a file system. All owners of operating systems (OS) MS-DOS and Microsoft Windows have installed one of the types of file systems called FAT (FAT-12, FAT-16 or FAT-32).

Now the situation has changed. When installing Microsoft Windows NT/2000/XP, before formatting the disk, you need to select between three file systems – FAT-16, FAT-32 or NTFS.

This article lets us know about internal structure of overhauled file systems, the authorities look at them with shortcomings and advantages. Once you have this knowledge, you can learn about the use of the same file system for Microsoft Windows.

Briefly about the FAT file system

The FAT file system appeared at the beginning of the development of personal computers and was initially used for storing files on floppy disks.

Information is saved on disks and floppy disks in portions, in sectors with a size of 512 bytes. The entire space of the floppy disk was divided into areas of fixed life, called clusters. A cluster can consist of one or more sectors.

Each file occupies one or a number of clusters, possibly innumerable. File names and other information about the files, such as size and creation date, are located in the outer area of ​​the floppy disk, located in the root directory.

In addition to the root directory, other directories can be created in the FAT file system. Together with the root directory, they create a directory tree to store information about files and directories. Before the clusters are transferred to a file on the disk, this information is stored in an outer area of ​​the floppy disk called the File Allocation Table (FAT).

For a skin cluster, the FAT table has its own individual section, which stores information about those in which this cluster is being analyzed. Thus, the file allocation table is a mass that contains information about the clusters. The size of this array is determined by the number of clusters on the disk.

The catalog stores the number of the first cluster distributed to the file or subdirectory. The numbers of other clusters can be found in the additional FAT file allocation table.

When creating the FAT table format, there was a goal of saving space, because... The floppy disk has a very small volume (from 180 KB to 2.44 MB). Therefore, to save cluster numbers, only 12 double digits were allocated. As a result, the FAT table was packed so tightly that it occupied more than one sector of the floppy disk.

The FAT table contains critically important information about the storage of directories and files. If, as a result of hardware failure, software failure, or an unfortunate influx of viruses, the FAT table becomes corrupted, and access to files and directories will be lost. Therefore, as a precaution, two copies of the FAT table are created on the disk.

Different versions of FAT

After the advent of hard disks of great popularity (at that time disks with a size of 10-20 MB were the most important), the number of clusters increased, and 12 digits began to save their numbers. A new 16-bit file allocation table format was developed, where two bytes were required to store the number of one cluster. The old file system, split up for floppy disks, became known as FAT-12, and the new one - FAT-16.

The FAT-16 table has increased in size and no longer fits in one sector, but due to high disk usage, it does not play a significant role for a long time. As before, two copies of the FAT table were saved on the disk for insurance.

However, if the disk volume becomes hundreds of MB or gigabytes, the FAT-16 file system becomes ineffective. In order for the cluster numbers to be located at 16 bits, when formatting disks, it is necessary to increase the cluster size to 16 KB or more. This caused problems when it was necessary to save a large number of small files on the disk. Remnants of the file storage space appear in clusters, so even a small file requires a lot of disk memory.

As a result, another, perhaps, final test of the FAT file system was created - the size of the file allocation table increased to 32. This allowed formatting disks of hundreds of MB and one GB with a but a relatively small size cluster. The new file system was called FAT-32.

Standard 8.3

Before the advent of the Microsoft Windows 95 operating system, personal computer users began to use the even incomprehensible “8.3 standard” for naming files; in any file name it was not enough to have 8 characters plus 3 extension characters. This delineation was imposed both by the program interface of the MS-DOS operating system and by the structure of the directory entry of the FAT file system.

After modifying the structure of directory entries, the number of characters in the file name was practically removed. Now the file name can take 255 characters, which obviously requires more. However, such a modified FAT file system became incompatible with the MS-DOS operating system, as well as with the Microsoft Windows shell version 3.1 and 3.11, which runs in its middle.

You can read a report on the formats of internal FAT structures in our article “Data updates in FAT sections”, published on this website.

Exchange of the FAT file system

Accepting decisions about the use of the FAT file system for disk formatting, following the power of interchange. These limits are subject to the maximum size of a FAT disk, as well as the maximum size of a file stored on that disk.

The maximum size of a FAT-16 logical drive is 4 GB, which is very little in modern terms. Microsoft, however, does not recommend creating FAT-16 disks larger than 200 MB, because In this case, the disk space of the vikorist is even more ineffective.

Theoretically, the maximum size of a FAT-32 disk can be 8 TB, which can be expanded to accommodate any daily extras. This means multiplying the maximum number of clusters (268435445) by the maximum cluster size allowed in FAT-32 (32 KB).

However, in practice the situation looks much different.

Through internal exchanges, the ScanDisk utility in Microsoft OS 95/98 cannot work with disks that have a capacity of 127.53 GB. Moreover, such an exchange would not cause problems, but today inexpensive disks with a capacity of 160 GB have already appeared on the market, and soon there will be even more of them.

With the new operating systems Microsoft Windows 2000/XP, it is impossible to create FAT-32 partitions with a volume exceeding 32 GB. If you need this or more, Microsoft recommends that you use the NTFS file system.

Otherwise, the FAT-32 format is imposed on the file size - you cannot exceed 4 GB. This exchange is important, for example, during the recording of video fragments to disk or the creation of large database files.

With FAT-32 catalog you can save a little more than 65534 files.

Shortcuts FAT

In addition to the above-mentioned boundaries, the FAT file system has other shortcomings. The most significant, perhaps, is the continued availability of access control options, as well as the possibility of losing information about the placement of files after the collapse of the compact FAT table and its copies.

Having stolen the computer from the system floppy disk, the attacker easily denies access to any files that are saved on disks with the FAT file system. It is not important for you to then copy the files to a ZIP device or any other external data carrier.

If you use FAT on server disks, it is impossible to ensure reliable and consistent separation of users' access to directories. For this reason, and also due to its low resistance to failures, FAT is definitely not used on servers.

The presence of a compact FAT file allocation table can undermine the entire file system in a destructive way computer viruses- Make sure to save the entire fragment of the FAT disk, and then all data will be lost.

File system NTFS

The current NTFS file system has been split up by Microsoft for its Microsoft Windows NT operating system, and some parts of FAT have been removed. Since its inception, the NTFS file system has become much more sophisticated, the rest of which (at the time of the creation of this article) were developed in the Microsoft Windows XP operating system.

In the NTFS file system, all file attributes (name, size, extension of file extents on the disk, etc.) are saved to the user system file$MFT. Saving information about each file (and directory) in $MFT is limited to one to several kilobytes. With a large number of files saved on disk, the $MFT file can occupy tens or hundreds of MB.

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

Please note, however, that the overhead of using NTFS to save system information, if you want to replace the overhead of using FAT, is still not as great as compared to the cost of modern disks. By ensuring that the $MFT file grows closer to the middle of the disk, the destruction of the first tracks of an NTFS disk will not lead to such fatal consequences as the destruction of the outer areas of a FAT disk.

The NTFS file system has the same capabilities as FAT. They allow you to achieve much greater flexibility, reliability and protection compared to FAT.

We are reviewing the current capabilities of NTFS current versions.

Establish access boundaries

Methods for demarcating NTFS access include accessing and allowing access to a number of adjacent files and directories, allowing (or blocking) access to them to specific users or groups of users.

Although at first glance you might think that access segregation methods are needed only for file servers, they will be needed in a situation where there are only a few computer users away from a computer.

File encryption

The most important means of access demarcation are to be revealed if the physical NTFS disk is in the hands of a criminal. With the help of modern utilities instead of such a disk, you can easily read it in the middle of any operating system - DOS, Microsoft Windows or Linux.

To protect the files of clients from unauthorized access, Microsoft Windows 2000/XP operating systems have additional encryption of files that are saved in NTFS partitions. And although the strength of such encryption may not be very high, it is quite sufficient for most types of attacks.

Software disk array RAID

Using NTFS you can create such program names RAID array 1 (Mirrored set). This array, which consists of two physical or logical disks of the same volume, allows you to duplicate (or, so to speak, “mirror”) files.

Such an array can save your files in the event of a physical failure of one of the disks that form the array, which is often frozen to increase the reliability of the disk system.

Volume Set

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

Sets created from multiple partitions and physical disks are called Volume Set (in the terminology of Microsoft Windows NT OS) or Spanned Volume (in the terminology of Windows 2000/XP OS).

Packing files

To save disk space, you can use the NTFS service to pack (compress) files. In addition, NTFS allows you to create so-called sparse files that replace areas of zero data. Such files can be very useful, but at the same time they take up little space on the disk, and the fragments are actually saved per byte to the file.

Dear, that packing files will lead to a great improvement in work. This arrangement, however, is far from being significant. For example, office documents can be packaged without any significant reduction in speed, but the same cannot be said about database files, which are constantly being mined by a large number of clients. With the arrival of inexpensive discs of great value on the market, the packaging needs to be used only if they are really necessary. This, however, comes at the cost of other NTFS capabilities.

Lots of stream files

If necessary, multiple streams of information can be saved in one file recorded on an NTFS disk. This allows, at the same time, to download document files with additional information, save several versions of documents in one file (for example, different languages), save program code in separate streams of one file, etc.

Hard links

Hard links allow you to assign a number of different names to one physical file, including names (that are sent to the file) in different directories. When a link is deleted, the file itself is not deleted. Only if all links to the file are deleted, the file itself will be deleted.

Please note that similar capabilities are typical for file systems, which are found in Unix-like operating systems, for example, Linux, FreeBSD, etc.

Reassignment points

Such NTFS system objects, such as reparse points, allow you to reassign any file or directory. In this case, for example, reassigned files or directories that are rarely accessed can actually be saved on a magnetic page, only being transferred to the disk if necessary.

Move on

Due to NTFS transitions, you can mount another hard disk or CD into the disk directory. This capability was initially evident in file systems of Unix-like operating systems.

Disk space quota

The NTFS file system, used in Microsoft Windows 2000/XP, allows you to set quotas or demarcate disk space that is available to users. This possibility is especially important during the development of file servers.

Keeping a journal of changes

During the robotic process, the operating system performs various actions on files (creating, changing, deleting). All such changes are saved in a special journal created on NTFS volumes, and can be accessed by backup programs, indexing systems, etc. Logging changes increases the reliability of the file system, allowing the work to continue for hours after non-critical changes to the operating system and installation. If you want to cause more serious failures, you will need to update data from a backup copy or use special data update utilities.

NTFS exchange

Regardless of the great number of possibilities, the NTFS file system also has common interchange operations. However, in most cases, stench does not play a central role.

The maximum size of an NTFS logical disk is approximately 18446744 TB, which is obviously sufficient for all current add-ons, as well as add-ons that will appear in the next one. The maximum file size is even larger, so the sharing is also not possible.

The number of files that are saved in one NTFS directory is not surrounded by anything, which is an advantage over FAT.

Upgrading NTFS and FAT for easier access to files

In terms of prospects, functional capabilities, security and reliability, NTFS is far superior to FAT. However, the equalization of the productivity of these file systems does not give an unambiguous result; the remaining productivity depends on many different factors.

Since the operating principles and internal structures of FAT are much simpler, even NTFS, when working with small FAT directories, will be faster than ever. However, instead of a desktop directory, it is not enough that it can easily fit into one or several entries in the $MFT file, or, as a matter of fact, if the directory is very large, it will “outperform” NTFS.

The palm of the hand, which is better than everything, will be removed by NTFS when searching for irrelevant files or directories (there is no need to look through the directory), when downloading files of small size (about hundreds of bytes), as well as in cases of severe fragmentation ii disk.

To increase the productivity of NTFS, you can increase the size of the cluster, but this can result in an unnecessary waste of disk space when saving a large number of files, the size of which exceeds 1-2 KB and becomes tens of KB. If you increase the cluster size to 64 KB, you can deduct the maximum productivity gains, but you will have to worry about packing files and running defragmentation utilities.

When packing files located on small disks (about 4 GB), productivity may increase, and when compressed on large disks, productivity may decrease. In any case, the packaging will bring additional information to the central processor.

So why choose FAT or NTFS?

As you can see, NTFS has a numerical advantage over FAT, and it has significant network advantages. If you are faced with choosing a file system, look first at the possibility of choosing NTFS, and then FAT.

What problems might be encountered that would make it difficult to replace FAT with NTFS?

The most serious problem is the need to use Microsoft Windows NT/2000/XP. For normal work This OS requires at least 64 MB of RAM and a processor with a clock frequency of no lower than 200-300 MHz. However, we are not happy with even old computers that do not run under the current versions of Microsoft Windows.

Since your computer can run on Microsoft Windows 2000/XP, and you have many application programs, including Microsoft Windows 95/98/ME, we recommend that you upgrade to a new operating system as soon as possible, started at not FAT on NTFS.

In this case, you will notice an increase in the reliability of the robot, because After installing all the necessary Service Packs, as well as the correct versions of drivers for peripheral devices, Microsoft Windows 2000/XP operates reliably.

In some situations, a number of file systems may appear between one physical disk. For example, if three operating systems Microsoft Windows ME, Microsoft Windows XP and Linux are installed on your computer, you can create three file systems - FAT, NTFS and Ext2FS. The first of them will be “visible” when working in Microsoft Windows ME and Linux, the other - only in Microsoft Windows XP, and the third - only in Linux (obviously, in the LINUX OS it is possible to access NTFS partitions).

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

It is also a widely accepted (in our opinion, Milkov’s) idea that home computer users do not need either the Microsoft Window NT/2000/XP OS or the NTFS file system.

Of course, if the computer is installed exclusively for gambling, it is best to install Microsoft Windows 98/ME and format the disks in FAT. However, since you work not only in the office, but at home, it is better to use daily, professional and reliable solutions. This will allow you to protect against intrusion on your computer via the Internet, limit access to directories and files with critical data, and also increase the chances of successfully updating information in the event of mischief malfunctions

I’m sorry, if I’m cringing or FatFs, I think that it’s bad to get involved with this, since everything is in the middle. Having laid out the food for a long time, you will need to fix the armchairs. Also, there is a global meta-process of retrieving memory cards, as you can see in detail, a continuous meta-process of the file system.

I’ll tell you straight away that I didn’t want to write my own driver or go into details in detail, I was just bored. The task is simple to understand, so there will be no “codes” here.

Well, first of all, we must understand that when combined with a memory card, we can either read or write 512 bytes, there are no other options. Since files are constantly copied and deleted, and the file sizes are always different, empty sections will be created on the card, mixed with the records. To ensure that you don’t worry about the placement of data, there is a search engine that takes over the turbo and the file system.

As it was said above, you can write and read only in multiples of 512 bytes, then. 1 sector. It is also understood that a cluster is simply a number of sectors, for example, since the size of a cluster is 16 kB, this means that there are 16000/512 = 31.25, or more precisely 32 sectors, and the real size of the cluster is 16384 bytes. All files occupy a size that is a multiple of the cluster size. If the file size is 1kB, and the cluster is 16kB, the file will take up the entire 16kB.

It would be logical to operate clusters of small size, then on the right, the maximum number of files and their size comes into play. FAT16 operates on 16-bit data, so it is not possible to cram more than 2^16 clusters. Because they are smaller in size, space for smaller files is more efficient, and less information can be stored on disk. And as a matter of fact, the larger the size, the more information can be crammed in, and the less efficient the space for other files is. The maximum cluster size is 64kB, or the maximum for FAT16 is 64kb*2^16 = 4GB.

Output data: 1GB micro SD memory card. Labeled MYDISK, fully formatted, cluster size 16kB.

You need a Hex editor, or else you won't be able to do it, you need one that can look at the entire disk, and not just the files on the disk. From what I was able to know: WinHex is the most advanced, but not free; HxD is simple, cost-free, but I didn’t bother saving my changes on disk; DMDE is slightly user friendly, cost-free and allows you to save changes. Zagalom, I missed HxD.

To get a quick look at the FAT16 structure, the picture shows the order in which the various parts of the file system are arranged.

The vanguard sector saves all service information. In the middle of the FAT area, information is stored about the files that have been transferred to the disk. The root directory contains information about the files located at the root of the disk. The data area contains information that is located in the middle of the files. All areas will go ahead one by one, then. After the final sector, the FAT area immediately begins. We will look at the details below.

Note: Understand the principle behind the rotating of file names and their names. Therefore, it is important to search the root directory to understand what kind of files we have. Where can we get help from data from the vanguard area?

The available data is shown in the table

First, what we need is to determine the size of the affected area. We can see at address 0x0E that there are 4 sectors under the protected area. The FAT area begins at address 4*512=0x800.

The number of FAT tables can be set at address 0x10 of the private area. Our application has two, why two, because each table is duplicated with a backup one, so that the data can be updated in case of a failure. The table size is specified at address 0x16. Thus, the size of the file is 512*2*0xEE = 0x3B800, and the root directory starts at the address: 0x800 + 0x3B800 = 0x3C000

In the middle of the root directory, all elements are divided into 32 bytes. The first element, the mark of that, and the axis of the next element are files and folders. If the file name starts with 0xE5, this means that the file has been deleted. The name starts with 0x00, which means that the first file is the remaining one.

Dosit tsikava the structure of the root directory came out to me. The map was completely formatted, then 2 text files were created, which were renamed MyFile.txt and BigFile.txt.

How can you tell that, in addition to my two files, there has been a bunch of lefties, about whose behavior you can only guess.

The most important thing that can be added here is the address of the first cluster from which the data in our file is assigned. Addresses are always located at the displaced 0x1A. For example, the names of our MyFile.txt file are located at the address 0x3C100, and we add 0x1A to the next one, which is also the number of the first cluster. = 0x0002, then. another cluster. For the BigFile.txt file, the data starts from the third cluster.

Also, in root catalosis, you can find out the date and hour of the rest of the file editing, but the nutrition was not even good, so I will bypass it. It remains beautiful, which can be said about the root catalogue, its size, so that those who start with data can know it.

The size of instructions in the assigned sector at the address 0x11 (2 bytes) = 0x0200*32 = 0x4000 or 16384 bytes.

Add to the address of the root of this size: 3С000 + 4000 = 40000 to the address of the first data cluster, but we need a friend to know MyFile.txt. The number of sectors in the cluster is 32, cluster size = 32*512 = 16384 and 0x4000, so we add the address of the first cluster, its size. From 0x44000, another cluster may spawn.

Let’s go to the address 0x44000 and it’s important that BigFile.txt is located (you just have it)

There appears to be a slight subtlety, the numbering of the clusters starts from the other, it is not clear that this is how the fact is formed. Actually, we moved to the third cluster. Let's go back one cluster at address 0x40000 and get the most out of it.

Now he's eating. Do we really need a FAT table? The point is that they may be fragmented, then. The beginning of a file can be in one cluster, and the end in a completely different one. Moreover, there may be different clusters. There may be a number of scattered data in different areas of the data. The FAT table is a kind of map that tells us how to move between clusters.

Let's look at the file BigFile.txt and there is a bunch of random stuff stuffed into it, so that it takes up not just one cluster, but a bunch. Let's go there, where the FAT table begins and its surprising changes.

The first major byte is 0xF8FFFFFF and is the identifier of the fat table. Then there are 2 bytes that go to MyFile.txt, which contain 0xFFFF, which means that the file occupies only one cluster. And the axis of the next file BigFile.txt starts at the third cluster, which is remembered from the root directory, continues at the fourth, then goes to 5,6,7... and ends at 12, then. occupies 10 clusters.

Let's verify that it's true. The file size is 163kB, that's it. borrows 163,000/(32*512) = 9.9 clusters, which is very similar to Ochikuvan. We repeat once again that one element of the FAT table takes up 2 bytes. 16 bits, this is called FAT16. Apparently the maximum address is 0xFFFF, then. maximum volume for FAT16 0xFFFF* cluster size.

Let's move on to FAT32. The original part has been changed.

Discover the principles of change. The file system name has moved to address 0x52, the root size is now ignored. The data area is located just behind the FAT tables, the root directory is located in the middle of the data area. In addition, the root directory does not have a fixed size.

Data area addresses are calculated:
size of the vantage sector + FAT table, my result was:
746496 + (3821056*2) = 0x800000

The addresses of the root directory are calculated as follows:
(the number of the first cluster in the root directory is 2) * cluster size + addresses of the first data area,
tobto. Whose application is to avoid the beginning of the data area.

Since the data in the root file used to take up 32 bytes, as well as the “deleted” magic files, I leave in the notepad files at the same time.

And the axis of the first cluster in MYFILE.txt is now indicated by two bytes, the older one is offset 0x14, the younger one is still 1A. Therefore, the number of the first data cluster for the file will be:
8000A0 + 0x14 = 0x8000B4 - high byte
8000A0 + 0x1A = 0x8000BA - low byte
In my case, the card had only one file, that is, the third cluster.

The FAT table appears as before, only now the elements occupy 4 bytes, the names and names are FAT32. The ideology of the transformation of elements is exactly like that of the front.

Useful things for the table
F8 FF FF F0 - first cluster
FF FF FF 0F - remaining cluster
FF FF FF F7 - bad cluster

Where is the money?
data area cob + cluster size * (root cluster number - 1)
= 0x800000 + (2 * 4096) = 0x801000

I am convinced that it has become clear that there is nothing supernatural. Anyone who reads and repeats can eat a cookie 🙂