How to set up smartphones and PCs. Informational portal
  • home
  • Windows 8
  • The file system performs the function. File system

The file system performs the function. File system

The file system of a computer, as a rule, has several disks. Each disk is assigned a name, which is given by a Latin letter with a colon, for example, A:, B:, C:, etc. It is standardly accepted that A: and B: are floppy disk drives, and drives C:, D : etc. - hard drives, optical disc drives or electronic discs.

Electronic disks are a part of RAM, which looks like an RAM to the user. The speed of information exchange with an electronic disk is much higher than with an electromechanical external storage device. During the operation of electronic disks, wear of electromechanical parts does not occur. However, the information on the ramdisk is not saved after the power is turned off.

Physically existing magnetic disks can be divided into several logical disks, which for the user will look on the screen in the same way as physically existing disks. In this case, logical disks are named according to the same rules as physically existing disks. Simply put, a logical drive is a part of a regular hard drive that has its own name.

The disk on which the operating system is written is called the system (or boot) disk. The C: hard drive is most often used as the boot drive. In the treatment of viruses, system failures, the operating system is often loaded from a floppy disk.

Optical discs are available that can also be bootable.

Formatting is the preparation of a disk for recording information.

During formatting, service information is written to the disk (marking is done), which is then used to write and read information, correct the disk rotation speed. Marking is done using an electromagnetic field created by the recording head of the drive. Recording of information is carried out by tracks, and each track is divided into sectors, for example, 1024 bytes.

During the formatting process, a system area is allocated on the disk, which consists of three parts: the boot sector, the file allocation table, and the root directory.

The boot sector (Boot Record) is located on each disk in logical sector number 0. It contains information about the format of the disk, as well as a short program used in the boot procedure of the operating system.

The boot sector is created during disk formatting. If the disk is prepared as a system (bootable) disk, then the boot sector contains the operating system boot program. Otherwise, it contains a program that, when trying to boot an operating system from this disk, displays a message stating that this disk is not a system disk.

A file is a set of interconnected data that is perceived by a computer as a single entity, having a common name, located on a magnetic or optical disk, magnetic tape, in RAM or on another storage medium.

A file is usually identified with a memory area (VZU, RAM, ROM) where logically related data with a common name is located. The file is stored on the storage medium in binary notation and is represented to the OS as a collection of linked bytes.

Files can store program texts, documents, data, etc.

If the file is large, then it can span multiple tracks.

When writing information to a new (blank) disc, the files are arranged sequentially one after another: from the first track to the last.

Note that files always occupy an integer number of clusters, so two even small files cannot be located in one cluster at the same time. Please note that if the document consists of only one letter, then the file still occupies one separate cluster on the disk.

File names are registered on magnetic and optical disks in folders, directories (or directories). The term "directory" is used in operating systems of the DOS family, the term "folder" is used in operating systems of the Windows family.

With repeated overwriting and deletion of files, fragmentation (crushing, division) of disk space occurs. As a result, the file may be broken and located in clusters located at a relatively large distance from each other. Reading such files slows down significantly, as the drive needs additional time to move the heads. The reason for the occurrence of fragmentation is that all files have, as a rule, different lengths. Therefore, after deleting a file, the new file cannot exactly fit into the freed disk space. It is almost certain that either a free section of the disk will remain, or sectors located elsewhere on the disk (for example, located through several sectors or on other tracks) are filled. As part of the operating system, there is a special program (utility) that performs disk defragmentation.

This utility places the body of the file in adjacent sectors, thereby speeding up the reading of information (no need to switch to other tracks, skip other sectors) and reduce wear on the drive.

The purpose and functioning of the file system

In operating systems, the file system refers to the basic concepts and is defined as a general system that establishes the rules for naming files, storing, organizing and processing files on storage media. Information carriers (memory) are implemented in the form of appropriate technical means for storing information.

Thus, the file system is a part of the operating system that provides writing and reading files on storage media (external storage), that is, it provides the user with a convenient interface when working with data stored on storage. Firm Microsoft has developed several file systems for personal computers, such as FAT, FAT16, FAT32, NTFS, etc. The functioning of the file system is implemented as a multi-level process, where each level represents a set of functions to the previous level and refers to the next one with the appropriate request.

Rice.

The processes of the first level include processes associated with determining its unique name by the symbolic name of a file, the processes of the second level are associated with determining the characteristics of a file by its unique name, and the processes of the third level are associated with checking the admissibility of a given operation to the desired file, etc. The processes of the n-th level are associated with determining the number of the physical block containing the logical record.

FAT file system

format command code file

The FAT file system is used by the OS MS DOS and OS Windows to organize and manage files. This file system is based on the FAT allocation table. (File Allocation Table), which is a data structure created by the OS when formatting data in memory. The OS stores information about each file in a file allocation table so that the correct file can be retrieved when needed.

The specified file system fully met the requirements of its time, mainly because it itself is very compact and simple. Due to this, it has been successfully used and is being used in NGMD. One or more clusters can be used to store a file in FAT, the standard cluster size is 512 bytes.

There are several versions of the FAT file system, among which the FAT 16 and FAT 32 file systems are most widely used. The difference between these file systems lies in the number of bits used in the file allocation tables.

Your removable drive should use FAT32 for best compatibility, but if you plan on storing large files then format to NTFS. Mac formats drives to the HFS+ standard, which doesn't work with Windows. Linux also has its own file systems.

Why are there so many?

File system 101

Different file systems are simply different ways of organizing and storing files on a hard drive, flash drive, or any other storage device. Each storage device has one or more sections, and each section must be "formatted" to a specific file system mode. The formatting process creates an empty file system of this type on the device.

File system provides a way to divide data on disk into separate parts, which are files. It also provides a way to store data about these files, such as their names, permissions, and other attributes. File system also provides an index-list of files on the disk and where they are located on the disk, so that the operating system can see what's on the disk in one place, and it doesn't have to "comb" the entire disk to find the .

The operating system must understand the file system so that it can display its contents, open files, and save files to them. If your operating system does not understand the file system, you can install a file system driver that provides support for such a file system.

The file system of a computer disk can be compared to a document storage system - the bits of data on a computer are called "files" and they are organized in a "file system" just as paper files can be organized in file cabinets. There are different ways to organize these files and store data - these are "file systems".

Why are there so many file systems

Not all file systems are equal. Different file systems have different ways of organizing their data. Some file systems are faster than others, some have additional security features, and some support disks with more memory, while others only work on disks with less memory. Some file systems are more robust and resistant to file corruption, while others compromise reliability in favor of speed.

Does not exist the best file system, which would be suitable for all purposes. Each computer operating system tends to use its own file system, which is also the work of the operating system developers. Microsoft, Apple, and the Linux kernel developers are working on their own file systems. New file systems can be faster, more stable, scale better for larger storage devices, and have more features than older ones.

The file system is not like a partition, which is just a chunk of storage space. The file system determines how files are laid out, organized, indexed, and how metadata is associated with them. There is always room to tweak and improve how it's done.

Switching file systems

Each partition has a file system. Sometimes you can "convert" a partition's file system, but this is rarely possible. Instead, you will probably have to copy important data from the partition first.

Operating systems automatically format partitions to the appropriate file system during the installation process. If you have a Windows-formatted partition on which you want to install Linux, during the installation process, Linux will format the NTFS or FAT32 partition to the Linux file system preferred by your Linux distribution.

Thus, if you have a storage device and want to use a different file system, just copy the files from it to back them up. Then use the tool Disk Management on Windows gparted on Linux or disk utility in MacOS.

Overview of common file systems

Here is a brief overview of some of the more common file systems you will come across. It is not exhaustive - there are many other file systems for special purposes:

  • FAT32: is one of the oldest Windows file systems, but it is still used on removable media - small in volume. Large external hard drives of 1TB or more will be formatted with NTFS anyway. FAT32 only makes sense for small storage devices or for compatibility with other devices such as digital cameras, game consoles, set-top boxes, and other devices that only support FAT32 but NTFS.
  • NTFS: modern version of the Windows file system - used since Windows XP. External drives can be formatted with FAT32 or NTFS.
  • HFS+ A: Mac uses HFS+ for its internal partitions, it also formats external drives - using an external hard drive with Time Machine requires file system attributes to be able to be backed up. Macs can also read and write files to FAT32 file systems, but you'll need third-party software to write to NTFS file systems from a Mac.
  • ext2 / Ext3/Ext4: You will often see ext2, ext3, and ext4 filesystems on Linux. Ext2 is an older file system and it lacks important features like journaling - if the power goes out or the computer crashes while writing to the ext2 drive, data can be lost. Ext3 adds these robust characteristics at the expense of some speed. Ext4 is a more modern and faster option - it is the default file system on most Linux distributions. Windows and Mac do not support these file systems - you will need a third party tool to access files in such file systems. However, Linux can read and write to both FAT32 and NTFS.
  • btrfs: This is a new Linux file system that is still in development. It's not standard on most Linux distributions at the moment, but will likely replace Ext4 one day. The goal is to provide additional features that allow Linux to scale to large amounts of storage.
  • Swap: On Linux, the "swap" file system is not really a file system. A partition formatted as "swap" can be used as an operating system's swap space - like a Windows swap file, but requires a dedicated partition.

There are other file systems, especially on Linux and other Unix-like systems.

The typical computer user shouldn't know much of this stuff - but knowing the basics will help you understand questions like "why doesn't this Mac-formatted disc work with my Windows PC?" and "should I format this USB hard drive as FAT32 or NTFS?".

The file system allows you to organize programs and data and organize the orderly management of these objects.

The operating systems of personal computers were deeply imprinted by the concept of the file system that underlies the Unix operating system. In Unix, the I/O subsystem unifies the way you access both files and peripherals. In this case, a file is understood as a set of data on a disk, terminal, or some other device.

File system is a functional part of the operating system that provides operations on files. The file system allows you to work with files and directories (directories) regardless of their content, size, type, etc.

File system is a data management system.

A data management system is a system whose users are relieved of most of the physical manipulation of files and can focus primarily on the logical properties of the data.

OS file systems create for users some virtual representation of external storage devices, allowing them to work with them not at the low level of physical device control commands, but at a high level of data sets and structures.

File system (destination):

  • hides the picture of the real location of information in external memory;
  • ensures the independence of programs from the features of a specific computer configuration (logical level of working with files);
  • provides standard responses to errors that occur during data exchange.

File structure

The whole set of files on the disk and the relationships between them is called the file structure. Developed operating systems have a hierarchical, multi-level file structure organized as a tree.

A tree structure of directories is used − directory tree. Borrowed from Unix. Hierarchical structure - the structure of the system, parts (components) of which are connected by relations of inclusion or subordination.

The hierarchical structure is represented by a oriented tree, in which the vertices correspond to the components, and the arcs correspond to the links.

G drive directory tree

A directed tree is a graph with a distinguished vertex (root) in which there is only one path between the root and any vertex. In this case, two orientation options are possible: either all paths are oriented from the root to the leaves, or all paths are oriented from the leaves to the root.

Trees are used in describing and designing hierarchical structures.

The root is the starting position, the leaves are the final position.

Sections

Any hard or magneto-optical disk during formatting can be divided into several parts and work with them as with separate (independent) disks. These parts are called sections or logical drives. Partitioning a disk into several logical disks may be necessary due to the fact that the OS cannot work with disks that are larger than a certain size. It is very convenient to store data and user programs separately from system programs (OS), because the OS can “fly off the computer”.

Chapter– area of ​​the disk. Under logical disk (partition) a computer is understood as any storage medium with which the operating system works as a single entity.

Drive name– designation of the logical drive; entry in the root directory.

Logical disks (partitions) are indicated by Latin letters A, B, C, D, E, ... (32 letters from A to Z).

The letters A, B are reserved for floppy disks.

C - hard drive, usually from which the OS is loaded.

The remaining letters are logical drives, CDs, etc. The maximum number of logical drives for Windows OS is infinite.

AT partition table indicates the location of the beginning and end of this section and the number of sectors in this section (location and size).

File structure of a logical drive

To access information on a disk in a file, you need to know the physical address of the first sector (surface number + track number + sector number), the total number of clusters occupied by this file, the address of the next cluster, if the file size is larger than the size of one cluster

File structure elements:

    starting sector (bootstrap, boot sector);

    table accommodationfiles (FAT - File Allocation Table);

    root directory (Root Directory);

    data area (remaining free disk space).

Boot-sector

Boot-sector - the first (initial) sector of the disk. Located on the 0-side, 0-track.

The boot sector contains service information:

    disk cluster size (a cluster is a block that combines several sectors into a group to reduce the size of the FAT table);

    location of the FAT table (in the boot sector there is a pointer to where the FAT table is located);

    FAT table size;

    the number of FAT tables (there are always at least 2 copies of the table to ensure reliability and security, since the destruction of the FAT leads to information loss and is difficult to recover);

    the address of the beginning of the root directory and its maximum size.

The boot sector contains the boot block (bootloader) - the Boot Record boot record.

A bootloader is a utility program that places an executable program into RAM and brings it into a state of readiness for execution.

FAT (File Allocation Table)

FAT (File Allocation Table) - file allocation table. It defines which parts of the disk belong to each file. The disk data area is represented in the OS as a sequence of numbered clusters.

FAT is an array of elements addressing clusters of the disk's data area. Each data area cluster corresponds to one FAT entry. The FAT elements serve as a chain of links to file clusters in the data region.

File Allocation Table Structure:

FAT consists of elements of length 16/32/64 bits. In total, the table can have up to 65520 such elements, each of them (except the first two) corresponds to a disk cluster. A cluster is the unit in which space is allocated in the data area of ​​a disk for files and directories. The first two elements of the table (with numbers 0 and 1) are reserved, and each of the remaining elements of the table describes the state of the disk cluster with the same number. The element may indicate that the cluster is free, that the cluster is defective, that the cluster belongs to the file, and that it is the last cluster in the file. If the cluster belongs to the file and is not its last cluster, then the table entry contains the number of the next cluster in this file.

FAT is an extremely important element of the file structure. FAT violations can lead to complete or partial loss of information on the entire logical drive. That is why, two copies of FAT are stored on the disk. There are special programs that monitor the state of FAT and correct violations.

Different OS requires different versions of FAT

Windows 95 FAT16, FAT32

Windows NT (XP) NTFS

Novell Netware TurboFAT

UNIX NFS,ReiserFS

The logical structure of the storage medium

CONTROL ROBOT

from disciplines

" Informatics and computer technology" on the topic:

"Operating Systems"

"File systems"

1. Operating systems

2. File systems

3. File systems and file names

References

1. Operating systems

Operating system, OS operatingsystem) - a basic set of computer programs that provides control of computer hardware, work with files, input and output of data, as well as the execution of application programs and utilities.

When you turn on the computer, the operating system is loaded into memory before other programs and then serves as a platform and environment for their work. In addition to the above functions, the OS may perform others, such as providing a user interface, networking, and so on. Since the 1990s, the most common operating systems for personal computers and servers have been the Microsoft Windows family and Windows NT, Mac OS and Mac OS X, UNIX-class systems, and Unix-like systems (especially GNU/Linux).

Operating systems can be classified by underlying technology ([Unix]-like or Windows-like), license type ([proprietary software|proprietary] or [open source software|open source]), whether currently being developed (obsolete DOS or NextStep or modern GNU/Linux and Windows), for workstations (DOS, Apple), or for servers (), [real-time operating system|real-time OS] and [embedded operating system|embedded OS] (, ), , or specialized ( production management, training, etc.). Purpose and main features of the MS EXCEL program. Program interface. The main elements of the interface. The concept of a spreadsheet, cells, rows, columns, addressing system. Movement on the table field. Data input. Data types. Editing the contents of a cell. Changing the width and height of a cell. Cell properties (“Format Cells” command).

2. File systems

All modern operating systems provide the creation of a file system that is designed to store data on disks and provide access to them.

The main functions of the file system can be divided into two groups:

Functions for working with files (create, delete, rename files, etc.)

Functions for working with data stored in files (writing, reading, searching for data, etc.)

Files are known to be used to organize and store data on machine media. A file is a sequence of arbitrary number of bytes that has a unique name of its own or a named area on machine media.

Structuring a set of files on machine media is carried out using directories in which attributes (parameters and details) of files are stored. A directory can include many subdirectories, resulting in branched file structures on disks. The organization of files in a tree structure is called a file system.

The principle of organizing the file system is tabular. Where a file is stored on a disk is stored in the File Allocation Table (FAT).

This table is placed at the beginning of the volume. To protect the volume, two copies of the FAT are stored on it. If the first FAT copy is corrupted, disk utilities can use the second copy to repair the volume.

FAT is similar to the table of contents of a book in terms of how the operating system uses it to find a file and determine the clusters that this file occupies on the hard disk.

The smallest physical unit of data storage is a sector. The sector size is 512 bytes. Since the size of the FAT table is limited, it is not possible to provide addressing to each individual sector for disks larger than 32 MB.

In this regard, groups of sectors are conditionally combined into clusters. A cluster is the smallest unit of data addressing. The cluster size, unlike the sector size, is not fixed and depends on the capacity of the disk.

At first, floppy disks and small hard drives (less than 16 MB) used the 12-bit version of FAT (called FAT12). MS-DOS then introduced the 16-bit version of FAT for larger drives.

Operating systems MS DOS, Win 95, Win NT implement 16-bit fields in file allocation tables. The FAT32 file system was introduced in Windows 95 OSR2 and is supported in Windows 98 and Windows 2000.

FAT32 is an advanced version of FAT designed for use on volumes larger than 2 GB.

FAT32 provides support for drives up to 2TB and more efficient use of disk space. FAT32 uses smaller clusters to improve disk space efficiency.

Windows XP uses FAT32 and NTFS. A more promising direction in the development of file systems was the transition to NTFS (New Technology File System - file system of new technology) with long file names and a reliable security system.

The size of an NTFS partition is not limited. NTFS minimizes the amount of disk space wasted by writing small files to large clusters. In addition, NTFS allows you to save disk space by compressing the disk itself, individual folders and files.

According to the ways of naming files, there are “short” and “long” names.

According to the convention adopted in MS-DOS, the way to name files on IBM PC computers was the convention 8.3., i.e. The file name consists of two parts: the name itself and the name extension. The file name has 8 characters, and its extension has 3 characters.

The name is separated from the extension by a dot. Both the name and the extension can only include Latin alphanumeric characters. Filenames written according to the 8.3 convention are considered "short".

With the advent of the Windows 95 operating system, the concept of a “long” name was introduced. Such a name can contain up to 256 characters. This is quite enough to create meaningful file names. A “long” name can contain any characters except nine special ones: /: *? “< > |.

Spaces and multiple periods are allowed in the name. The file name ends with a three-character extension. The extension is used to classify files by type.

The uniqueness of the file name is ensured by the fact that the full file name is considered to be the file's own name along with the path to it. File path starts with the device name and includes all directory (folder) names it passes through. The character “” (backslash - backslash) is used as a separator. For example: D: Documents and SettingsTVAMy Documentslessons-tva robots. txt Despite the fact that file location data is stored in a tabular structure, it is presented to the user in the form of a hierarchical structure - it is more convenient for people, and the operating system takes care of all the necessary transformations.

A regular file is an array of bytes, and can be read and written starting at an arbitrary byte in the file. The kernel does not recognize record boundaries in regular files, although many programs treat newlines as end-of-line characters, but other programs may assume other structures. The file itself does not store any system information about the file, but the file system does store some information about the owner, permissions, and usage of each file.

Component called File name is a string up to 255 characters long. These names are stored in a special type of file called catalog. Information about a file in a directory is called directory entry and includes, in addition to the file name, a pointer to the file itself. Directory entries can refer to other directories as well as regular files. Thus, a hierarchy of directories and files is formed, which is called the file system. filesystem;

Figure 2-2. small file system

One small file system is shown in Figure 2-2. Directories can contain subdirectories, and there is no limit to how deep one directory can be nested within another. To maintain the integrity of the file system, the kernel does not allow a process to write directly to directories. The file system can store not only ordinary files and directories, but also references to other objects such as devices and sockets.

The file system forms a tree, the beginning of which is in root directory sometimes referred to by name slash, which matches the single slash character (/). The root directory contains files; in our example in Figure 2.2, it contains vmunix, a copy of the kernel's executable object file. It also contains directories; in this example it contains the usr directory. Inside the usr directory is the bin directory, which basically contains the executable object code of programs such as ls and vi.

The process accesses the file by specifying path before it, which is a string of no or more filenames separated by slashes (/). With each process, the kernel associates two directories that can be used to interpret file paths. Root directory process is the highest point on the file system that the process can reach; it usually corresponds to the root directory of the entire file system. A route that starts with a slash is called absolute route, and is interpreted by the kernel starting at the root directory of the process.

A path name that does not start with a slash is called relative route, and is interpreted relative to current working directory process. (This directory is also called briefly current directory or working directory) The current directory itself can be denoted directly by its name dot, which corresponds to a single dot (). File name dot dot(.) denotes the parent directory of the current directory. The root directory is an ancestor of itself.

File(from English. file- folder) is a named collection of any data placed on an external storage device and stored, sent and processed as a whole.

A file system is a part of the operating system whose purpose is to provide a user-friendly interface for working with data stored on disk and to allow files to be shared between multiple users and processes.

The file system defines the format of the content and how the information is physically stored, which is usually grouped as files. A particular file system determines the size of file and (directory) names, the maximum possible file and partition size, and a set of file attributes. Some file systems provide services, such as access control or file encryption.

In a broad sense, the term "file system" includes:

the collection of all files on the disk,

sets of data structures used to manage files, such as file directories, file descriptors, free and used disk space allocation tables,

a set of system software tools that implement file management, in particular: creation, destruction, reading, writing, naming, searching and other operations on files.

It is the file system that determines where and how the file will be written on physical media (for example, a hard disk).

From the point of view of the operating system (OS), the entire disk is a set of clusters (usually 512 bytes or larger). File system drivers organize clusters into files and directories (which are actually files containing a list of files in that directory). The same drivers keep track of which clusters are currently in use, which are free, and which are marked as failed.

The main functions of any file system are aimed at solving the following tasks:

file naming;

the program interface of work with files for applications;

mapping the logical model of the file system to the physical organization of the data warehouse;

organizing the stability of the file system to power failures, hardware and software errors;

In multi-user systems, another task appears: protecting the files of one user from unauthorized access by another user, as well as ensuring joint work with files, for example, when a file is opened by one of the users, for others the same file will be temporarily available in read-only mode .

21.2.1 File system overview FAT

The file system is built around a file allocation table ( File Allocation Table - FAT).

Data about the location of a file on a disk is stored in the system area of ​​the disk in special file allocation tables ( FAT-tables). The surface of a hard disk is considered as a three-dimensional matrix, the dimensions of which are the numbers of the surface, cylinder and sector.

A cylinder is a collection of all tracks belonging to different surfaces and located at an equal distance from the axis of rotation.

A sector is the smallest physical unit of data storage. Sector size for DOS was equal to 512 bytes. Other operating systems set their own sector sizes.

Because the size FAT– table is limited, then for disks larger than 32 MB, it is not possible to provide addressing to each individual sector. In this regard, groups of sectors are conditionally combined into clusters (blocks).

A cluster is the smallest unit of data addressing. The cluster size, unlike the sector size, is not fixed and depends on the capacity of the disk.

Sectors that do not contain user data (files) are not reflected in FAT. These sectors include boot sectors, file allocation tables, and root directory sectors.

Because the violation FAT- table makes it impossible to use the data, it exists in two copies, the identity of which is regularly monitored by means of the operating system.

When a file is written to disk, information about it is written to the root directory. This section contains information about the type of files, their names, sizes, creation date. In addition, for each file in the root directory there is a cluster number from which the file begins. By this number, the system refers to the cell of the table, the address of the next cluster is written in it. And so on, until the location of the entire file on disk is described. The recording will end with the "stop" command, that is, the file ends on this cluster.

Reading is the same. First, information about the file is read, then, following the pointer, the system goes to the table and there it reads the remaining numbers of clusters that the file occupies.

The cluster size, unlike the sector size, is not fixed and depends on the capacity of the disk. The OS file system that implements 16-bit fields in file allocation tables is called FAT 16. It allows you to place in FAT–tables with no more than 216 entries about the location of data storage units and, accordingly, for disks with a capacity of 1 to 2 GB, the cluster length is 32 KB (64 sectors). This is not a very rational waste of working space, since any file (even a very small one) completely occupies the entire cluster, which corresponds to only one address entry in the file allocation table. With disks larger than 2 GB, the file system FAT 16 won't work at all.



The OS file system that implements 32-bit fields in file allocation tables is called FAT 32

Catalog FAT has no defined structure, and files are written to the first free disk space found. In addition, the file system FAT only supports four file attributes: System, Hidden, Read-Only, and Archive.

For today's hard drives, the losses associated with file system inefficiency are quite significant, ranging from 25% to 40% of the total capacity of the drive, depending on the average size of the stored files.

21.2.2 File system overview NTFS

File system NTFS (New Technology File System)) was released along with Windows NT 3.5 in 1993. Compared with FAT, NTFS has the advantages of efficiency, reliability and compatibility. The NTFS file system is used in the operating system Windows NT/2000/XP/6/7.

Like any other system, NTFS divides all usable space into clusters. NTFS supports almost any cluster size - from 512 bytes to 64 KB, while a 4 KB cluster is considered a certain standard.

When installing NTFS, the disk is divided into three unequal parts: the first is given under MFT (Master File Table- general file table), is called MFT–zone and occupies about 12% of the total disk size. MFT lies at the beginning of the disk and occupies about 1 KB, each entry in MFT matches any file. At its core, this is a directory of all files on the disk. Any data item in NTFS treated as a file, even MFT.

MFT–the zone is always kept empty – this is done so that the most important, service file ( MFT) was not fragmented during its growth.

The second part of the disk is the usual space for storing files.

Free disk space, however, includes all physically free space - unfilled chunks MFT Zones are also included. Mechanism of use MFT– zone is: when files can no longer be written to regular space, MFT– the zone is simply reduced (in current versions of the OS by half), thus freeing up space for writing files. When freeing up space in a regular area MFT the zone will expand again.

The first 16 files (metafiles) in MFT– zone are a special caste. They contain service information, they have a fixed position and they are inaccessible even to the operating system. By the way, the first of these 16 is himself MFT- file.

Figure 21.1

The third zone, in turn, divides the disk in half. There is a copy of the first three entries in the third zone. This is done for reliability, in case of loss of information in MFT- file, you can always recover information. All other files in MFT- the zone can be located arbitrarily.

Disk main directory NTFS– root – no different from ordinary directories, except for a special link to it from the beginning of the metafile MFT. It is a specific file that stores links to other files and directories, creating a hierarchical structure of data on disk. The catalog file is divided into blocks, each of which contains the file name, basic attributes and a reference to the element MFT, which already provides complete information about the catalog item.

The directory is a binary tree, i.e. in the directory, information about the data on the disk is located in such a way that when searching for a file, the directory was divided into two parts and the answer was in which part the search was located. Then the same operation is repeated in the selected half. And so on until the desired file is found.

AT NTFS data encryption is used. Thus, if for some reason it was necessary to reinstall the system again, then encrypted files cannot be read without appropriate authorization.

NTFS- a fault-tolerant system that can well bring itself into the correct state in almost any real failure. Any modern file system is based on such a concept as a transaction - an action that is performed entirely and correctly or not performed at all. At NTFS there are simply no intermediate (erroneous or incorrect) states - the action is either committed or canceled.

Recovery system NTFS guarantees the correctness of the file system, not the data.

Top Related Articles