The concept of a file system and its functions. Why does a computer need a file system - main types. Connecting third-party files in Windows

The ability of the OS to “shield” the complexities of real hardware is very clearly manifested in one of the main subsystems of the OS - file system. The operating system virtualizes a separate set of data stored on external storage, in the form of a file - a simple unstructured sequence of bytes with a symbolic name. For ease of working with data, files are grouped into catalogs, which, in turn, form groups - directories of more high level. The user can use the OS to perform actions on files and directories such as searching by name, deleting, displaying content on an external device (for example, on a display), changing and saving content.

To introduce a large number of sets of data scattered randomly across cylinders and disk surfaces various types, in the form of a well-known and convenient hierarchical structure of files and directories, the operating system must solve many problems. File system The OS converts the symbolic names of files that the user or application programmer works with into physical addresses of data on the disk, organizes shared access to files, and protects them from unauthorized access.

When performing its functions, the file system closely interacts with the external device management subsystem, which, at the request of the file system, transfers data between disks and RAM.

The external device control subsystem, also called the input/output subsystem, acts as an interface to all devices connected to the computer. The range of these devices is very extensive. The range of manufactured hard drives, flexible drives and optical disks, printers, scanners, monitors, plotters, modems, network adapters and more special devices input-output devices, such as analog-to-digital converters, can have hundreds of models. These models may differ significantly in the set and sequence of commands used to exchange information with the computer’s processor and memory, operating speed, encoding of transmitted data, the ability to share and many other details.

Program that controls specific model external device and taking into account all its features, is usually called driver this device (from the English drive - to manage, to lead). The driver can control a single device model, such as the ZyXEL U-1496E modem, or a group of devices of a specific type, such as any Hayes-compatible modems. It is very important for the user that the operating system includes as many different drivers as possible, as this guarantees the ability to connect a large number of external devices from different manufacturers to the computer. Success largely depends on having the right drivers operating system on the market (for example, the lack of many necessary external device drivers was one of the reasons for the low popularity of OS/2).



The creation of device drivers is carried out both by developers of a specific OS and by specialists from companies that produce external devices. The operating system must support a well-defined interface between the drivers and the rest of the OS so that I/O device developers can provide drivers for the operating system with their devices.

Application programmers can use the driver interface when developing their programs, but this is not very convenient - such an interface usually represents low-level operations, burdened with a large number of details.

Maintaining a high-level unified application programming interface to heterogeneous I/O devices is one of the most important tasks of the OS. Since the advent of UNIX, this unified interface in most operating systems has been based on the concept of file access. This concept is that communication with any external device looks like an exchange with a file that has a name and is an unstructured sequence of bytes. The file can be either a real file on disk or an alphanumeric terminal, printing device, or network adapter. Here again we are dealing with the ability of an operating system to replace real hardware with user- and programmer-friendly abstractions.

OS tasks for managing files and devices

When exchanging data with external computer devices, the input-output subsystem (Input-Output Subsystem) of a multiprogram OS must solve a number of general tasks, of which the most important are the following:

Organization of parallel operation of input/output devices and processor;

Coordination of exchange rates and data caching;

Separation of devices and data between processes;

Providing a convenient logical interface between devices and the rest of the system;

Support for a wide range of drivers with the ability to easily add a new driver to the system;

Supports multiple file systems;

Supports synchronous and asynchronous I/O operations.

One of the main tasks of the operating system is to provide convenience to the user when working with data stored on disks. To do this, the OS replaces the physical structure of the stored data with some user-friendly logical model. Logical file system model materializes in the form directory tree, displayed on the screen by utilities such as Norton Commander or Windows Explorer, in symbolic compound file names, in commands for working with files. The basic element of this model is file, which, like the file system as a whole, can be characterized by both logical and physical structure.

File is a named area of ​​external memory that can be written to and read from. Files are stored in power dependent memory, usually magnetic disks. However, there are no rules without exceptions. One of these exceptions is the so-called electronic disk, when a structure that imitates a file system is created in RAM.

Main purposes of using the file:

Long-term and reliable storage of information. Durability is achieved through the use of power-independent storage devices, and high reliability is determined by file access protection and overall organization program code An OS in which hardware failures most often do not destroy the information stored in files.

Sharing information. The files provide natural and easy way separation of information between applications and users due to the presence of a human-readable symbolic name and the constancy of the stored information and file location. The user must have convenient tools for working with files, including directories that combine files into groups, tools for searching files by characteristics, a set of commands for creating, modifying and deleting files. A file can be created by one user and then used by a completely different user, and the file creator or administrator can determine the access rights of other users. These goals are implemented in the OS by the file system.

File system(FS) is a part of the operating system, including:

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;

Complex of system software, implementing various operations on files, such as creating, destroying, reading, writing, naming and searching files.

The file system allows programs to get by with just enough simple operations to perform actions on some abstract object representing a file. This way, programmers don't have to deal with the details of the actual location of data on disk, data buffering, and other low-level issues of transferring data from long-term storage. The file system takes on all these functions. The file system allocates disk memory, supports file naming, maps file names to corresponding addresses in external memory, provides access to data, and supports file partitioning, protection, and recovery.

Thus, the file system plays the role of an intermediate layer that screens out all the complexities of the physical organization of long-term data storage, and creates a simpler logical model for this storage for programs, as well as providing them with a set of easy-to-use commands for manipulating files.

The problems solved by the FS depend on the way the computing process is organized as a whole. The simplest type is a file system in single-user and single-program operating systems, which include, for example, MS-DOS. The main functions in such a FS are aimed at solving the following tasks:

File naming;

Software interface for applications;

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

File system resilience to power failures, hardware and software errors.

FS tasks become more complicated in single-user multiprogram operating systems, which, although designed for the work of one user, give him the ability to run several processes simultaneously. One of the first operating systems of this type was OS/2. A new task of sharing a file from multiple processes is added to the tasks listed above. The file in this case is a shared resource, which means that the file system must solve the whole range of problems associated with such resources. In particular, the FS must provide means for blocking a file and its parts, preventing races, eliminating deadlocks, reconciling copies, etc.

In multi-user systems, another task appears: protecting one user's files from unauthorized access by another user. The functions of the FS, which operates as part of a network OS, become even more complex.

File systems support several functionally different file types, which typically include regular files, directory files, special files, named pipes, memory-mapped files, and others.

Regular files, or simply files, contain arbitrary information that is entered into them by the user or that is generated as a result of the operation of system and user programs. Most modern operating systems (for example, UNIX, Windows, OS/2) do not restrict or control the contents and structure of a regular file in any way. The contents of a regular file are determined by the application that works with it. For example, text editor creates text files consisting of strings of characters represented in some code. These can be documents, source codes of programs, etc. Text files can be read on the screen and printed on a printer. Binary files do not use character codes and often have complex internal structures, such as executable program code or an archive file. All operating systems must be able to recognize at least one file type - their own executable files.

Catalogs- this is a special type of files that contain system reference information about a set of files grouped by users according to some informal criterion (for example, files containing documents of the same agreement, or files that make up one software package). On many operating systems, a directory can contain any type of file, including other directories, creating a tree structure that is easy to search. Directories establish a mapping between file names and file characteristics that are used by the file system to manage files. Such characteristics include, in particular, information (or a pointer to another structure containing this data) about the type of file and its location on the disk, access rights to the file, and the dates of its creation and modification. In all other respects, directories are treated by the file system as regular files.

Special files are dummy files associated with I/O devices that are used to unify the file access mechanism and external devices. Special files allow the user to perform I/O operations using normal commands for writing to a file or reading from a file. These commands are processed first by file system programs, and then at some stage of the request execution they are converted by the operating system into control commands for the corresponding device.

Modern file systems support other file types, such as symbolic links, named pipes, and memory-mapped files.

Users access files by symbolic names. However, human memory limits the number of object names that a user can refer to by name. The hierarchical organization of the namespace allows us to significantly expand these boundaries. This is why most file systems have a hierarchical structure, in which levels are created by allowing a lower-level directory to be contained within a higher-level directory (Figure 2.16).

Figure 2.16. Hierarchy of file systems (a – single-level structure, b – tree structure, c – network structure)

The graph describing the directory hierarchy can be a tree or a network. Directories form a tree if a file is allowed to be included in only one directory (Figure 2.16, b), and a network - if the file can be included in several directories at once (Figure 2.16, c). For example, in MS-DOS and Windows, directories form a tree structure, while in UNIX they form a network structure. In a tree structure, each file is a leaf. The top-level directory is called root directory, or root.

With this organization, the user is freed from remembering the names of all files; he only needs to have a rough idea of ​​which group a particular file can be assigned to in order to find it by sequentially browsing directories. The hierarchical structure is convenient for multi-user work: each user with their files is localized in their own directory or subtree of directories, and at the same time, all files in the system are logically connected.

A special case of a hierarchical structure is a single-level organization, when all files are included in one directory (Figure 2.16, a).

All file types have symbolic names. Hierarchically organized file systems typically use three types of file names: simple, compound, and relative.

Simple, or short, symbolic name identifies a file within the same directory. Simple names are assigned to files by users and programmers, and they must take into account OS restrictions on both the range of characters and the length of the name. Until relatively recently, these boundaries were very narrow. Thus, in the popular FAT file system, the length of names was limited to scheme 8.3 (8 characters - the name itself, 3 characters - the name extension), and in the s5 file system, supported by many versions of the UNIX OS, a simple symbolic name could not contain more than 14 characters. However, it is much more convenient for the user to work with long names because they allow you to give the files easy-to-remember names that clearly indicate what is contained in the file. Therefore, modern file systems, as well as improved versions of pre-existing file systems, tend to support long, simple symbolic file names. For example, in the NTFS and FAT32 file systems included in the operating system Windows systems NT, the file name can contain up to 255 characters.

In hierarchical file systems different files It is allowed to have the same simple symbolic names, provided that they belong to different directories. That is, the “many files - one simple name” scheme works here. To uniquely identify a file in such systems, a so-called full name is used.

Full name is a chain of simple symbolic names of all directories through which the path passes from root to of this file. Thus, the full name is a compound name, in which simple names are separated from each other by the separator adopted in the OS. Often a forward or backslash is used as a delimiter, and it is customary not to specify the name of the root directory. In Figure 2.16, b, two files have the simple name main.exe, but their compound names /depart/main.exe and /user/anna/main.exe are different.

In a tree file system, there is a one-to-one correspondence between a file and its full name: one file - one full name. In file systems that have a network structure, a file can be included in several directories, and therefore have several full names; here the correspondence “one file - many full names” is valid. In both cases, the file is uniquely identified by its full name.

The file can also be identified by a relative name . Relative name file is defined through the concept of “current directory”. For each user, at any given time, one of the file system directories is the current directory, and this directory is selected by the user himself upon an OS command. The file system captures the name of the current directory so that it can then use it as a complement to relative names to form the fully qualified file name. When using relative names, the user identifies a file by the chain of directory names through which the route from the current directory to the given file passes. For example, if the current directory is /user, then the relative file name /user/anna/main.exe is anna/main.exe.

Some operating systems allow you to assign multiple simple names to the same file, which can be interpreted as aliases. In this case, just as in a system with a network structure, the correspondence “one file - many full names” is established, since each simple file name corresponds to at least one full name.

And although the full name uniquely identifies the file, it is easier for the operating system to work with the file if there is a one-to-one correspondence between the files and their names. For this purpose, it assigns a unique name to the file, so that the relationship “one file - one unique name” is valid. The unique name exists along with one or more symbolic names assigned to the file by users or applications. The unique name is a numeric identifier and is intended only for the operating system. An example of such a unique file name is an inode number on a UNIX system.

The concept of “file” includes not only the data and name it stores, but also its attributes. Attributes- This is information describing the properties of the file. Examples of possible file attributes:

File type (regular file, directory, special file, etc.);

Owner of the file;

File Creator;

Password to access the file;

Information about permitted file access operations;

Times of creation, last access and last modification;

Current file size;

Maximum file size;

Read-only sign;

Sign " hidden file»;

Sign " system file»;

Sign “archive file”;

Sign "binary/character";

The sign is “temporary” (remove after the process is completed);

Blocking sign;

Length of the file record;

Pointer to the key field in the record;

Key length.

The set of file attributes is determined by the specifics of the file system: in file systems different types Different sets of attributes can be used to characterize files. For example, on file systems that support flat files, there is no need to use the last three attributes in the list that are related to file structuring. In a single-user OS, the set of attributes will lack characteristics relevant to users and security, such as the owner of the file, the creator of the file, the password for accessing the file, information about authorized access to the file.

The user can access attributes using the facilities provided for this purpose by the file system. Typically, you can read the values ​​of any attribute, but only change some. For example, a user can change the permissions of a file (provided they have the necessary permissions to do so), but they cannot change the creation date or current size of the file.

File attribute values ​​can be directly contained in directories, as is done in the MS-DOS file system (Figure 2.17a). The figure shows the structure of a directory entry containing a simple symbolic name and file attributes. Here the letters indicate the characteristics of the file: R - read-only, A - archived, H - hidden, S - system.

Figure 2.17. Directory structure: a - MS-DOS directory entry structure (32 bytes), b - UNIX OS directory entry structure

Another option is to place attributes in special tables, when the catalogs contain only links to these tables. This approach is implemented, for example, in the ufs file system of the UNIX OS. In this file system, the directory structure is very simple. The entry for each file contains a short symbolic file name and a pointer to inode file, this is the name in ufs for the table in which the values ​​of the file attributes are concentrated (Figure 2.17, b).

In both versions, directories provide a link between file names and the files themselves. However, the approach of separating the file name from its attributes makes the system more flexible. For example, a file can easily be included in several directories at once. Entries for this file in different directories may have different simple names, but the link field will have the same inode number.

The user's idea of ​​a file system as a hierarchically organized set of information objects has little to do with the order in which files are stored on disk. A file that has the image of a solid, uninterrupted set of bytes is in fact very often scattered in “pieces” throughout the disk, and this partitioning has nothing to do with the logical structure of the file, for example, its individual logical record may be located in non-contiguous sectors of the disk. Logically combined files from one directory do not have to be adjacent to each other on the disk. The principles of placing files, directories and system information on a real device are described by the physical organization of the file system. Obviously, different file systems have different physical organization.

The main type of device that is used in modern computing systems for storing files are disk drives. These devices are designed to read and write data to hard and floppy disks. A hard drive consists of one or more glass or metal plates, each of which is coated on one or both sides with magnetic material. Thus, the disk generally consists of a stack of plates (Figure 2.18).

Thin concentric rings are marked on each side of each plate - tracks(traks) on which data is stored. The number of tracks depends on the type of disc. Track numbering starts from 0 from the outer edge to the center of the disc. As the disk spins, an element called a head reads binary data from a magnetic track or writes it to a magnetic track.

Figure 2.18. Device diagram hard drive

The head can be positioned over a given track. The heads move over the disk surface in discrete steps, each step corresponding to a shift of one track. Recording on a disc is carried out thanks to the ability of the head to change the magnetic properties of the track. Some drives have one head moving along each surface, while others have one head for each track. In the first case, to search for information, the head must move along the radius of the disk. Typically, all heads are mounted on a single moving mechanism and move synchronously. Therefore, when a head stops on a given track on one surface, all other heads stop over tracks with the same numbers. In cases where each track has a separate head, no movement of the heads from one track to another is required, thereby saving time spent searching for data.

The set of tracks of the same radius on all surfaces of all plates of the package is called cylinder(cylinder). Each track is divided into fragments called sectors(sectors), or blocks (blocks), so that all tracks have an equal number of sectors into which the same number of bytes can be written at most. The sector has a fixed size for a specific system, expressed as a power of two. The most common sector size is 512 bytes. Considering that tracks of different radii have the same number of sectors, the recording density becomes higher the closer the track is to the center.

Sector- the smallest addressable unit of data exchange between a disk device and RAM. In order for the controller to find the desired sector on the disk, it is necessary to give it all the components of the sector address: cylinder number, surface number and sector number. Since the application program in general does not need a sector, but a certain number of bytes, not necessarily a multiple of the sector size, a typical request includes reading several sectors containing the required information, and one or two sectors containing, along with the required, redundant data (Figure 2.19) .

Figure 2.19. Reading redundant data when exchanged with disk

When working with a disk, the operating system usually uses its own unit of disk space, called cluster(cluster). When a file is created, disk space is allocated to it by clusters. For example, if a file has a size of 2560 bytes, and the cluster size in the file system is defined as 1024 bytes, then the file will be allocated 3 clusters on disk.

Tracks and sectors are created by performing physical, or low-level, disk formatting before the disk is used. To determine block boundaries, identification information is written to disk. The low-level disk format does not depend on the type of operating system that the disk will use.

Disk partitioning for a specific file system type is performed by high-level, or logical, formatting procedures.

With high-level formatting, the cluster size is determined and the information necessary for the operation of the file system is written to the disk, including information about available and unused space, the boundaries of areas allocated for files and directories, and information about damaged areas. In addition, the operating system boot loader is written to the disk - small program, which begins the process of initializing the operating system after turning on the power or restarting the computer.

Before formatting a disk for a specific file system, it can be partitioned. Chapter is a contiguous portion of a physical disk that the operating system presents to the user as a logical device (the names logical disk and logical partition are also used). The logic device functions as if it were a separate physical disk. It is with logical devices that the user works, referring to them by symbolic names, using, for example, the designations A, B, C, SYS, etc. Operating systems of different types use a common idea of ​​partitions for all of them, but create logical ones based on it devices specific to each OS type. Just as a file system that one OS operates on cannot generally be interpreted by another type of OS, logical devices cannot be used by operating systems of different types. Only one file system can be created on each logical device.

Files and file system

All programs and data are stored in the long-term (external) memory of the computer in the form of files.

File- this is a certain amount of information (program or data) that has a name and is stored in long-term (external) memory.

File name. The file name consists of two parts, separated by a dot: the actual file name and the extension that determines its type (program, data, and so on). The actual name of the file is given by the user, and the file type is usually set automatically by the program when it is created (Table 4.2).

Different operating systems have different filename formats. In the MS-DOS operating system, the file name itself must contain no more than 8 letters of the Latin alphabet, numbers and some special characters, and the extension consists of three Latin letters, for example: proba.txt

In the operating system Windows name the file can be up to 255 characters long, and you can use the Russian alphabet, for example: Units of information.doc


File system. Each storage medium (floppy, hard or laser disk) can store a large number of files. The order in which files are stored on disk is determined by the file system used.

Each disk is divided into two areas: a file storage area and a directory. The directory contains the name of the file and an indication of where it begins on disk. If we draw an analogy between a disk and a book, the file storage area corresponds to its contents, and the directory corresponds to the table of contents. Moreover, a book consists of pages, and a disk consists of sectors.

For disks with a small number of files (up to several dozen) can be used single-level file system, when the directory (disk table of contents) is a linear sequence of file names (Table 4.3). Such a catalog can be compared to the table of contents of a children's book, which contains only the titles of individual stories.

If hundreds and thousands of files are stored on the disk, then for ease of searching, use multi-level hierarchical file system, which has a tree structure. Such a hierarchical system can be compared, for example, with the table of contents of a given textbook, which is a hierarchical system of sections, chapters, paragraphs and points.

The initial, root directory contains subdirectories of the 1st level, in turn, each of the latter can contain subdirectories of the 2nd level, and so on. It should be noted that files can be stored in directories of all levels.

For example, the root directory may contain two 1st level subdirectories (Directory_1, Directory_2) and one file (File_1). In turn, in the 1st level directory (Directory_1) there are two subdirectories of the second level (Directory_1.1 and Directory_1.2) and one file (File_1.1) - fig. 4.21.

File system is a system for storing files and organizing directories.

Consider a hierarchical file system on specific example. Each drive has a logical name (A:, B: - floppy disks, C:, D:, E: and so on - hard and laser disks).

Let the root directory of drive C: have two 1st level directories (GAMES, TEXT), and the GAMES directory have one 2nd level directory (CHESS). At the same time, in the TEXT directory there is a file proba.txt, and in the CHESS directory there is a file chess.exe (Fig. 4.22).

The path to the file. How to find existing files (chess.exe, proba.txt) in a given hierarchical file system? To do this, you need to specify the path to the file. The path to the file includes the logical name of the disk, written through the "\" separator, and a sequence of names of nested directories, the last of which contains the desired file. The paths to the above files can be written as follows:

The path to the file along with the file name is sometimes called full file name.

Example of a full file name:

With \GAMES\CHESS\chess.exe

Presentation of the file system using a graphical interface. The MS-DOS hierarchical file system containing directories and files is represented in the Windows operating system through a graphical interface in the form of a hierarchical system of folders and documents. A folder in Windows is analogous to an MS-DOS directory

However, the hierarchical structure of these systems is somewhat different. In the MS-DOS hierarchical file system, the top of the object hierarchy is the root directory of the disk, which can be compared to the trunk of a tree on which branches (subdirectories) grow, and on the branches are leaves (files).

In Windows, at the top of the folder hierarchy is the folder Desktop. The next level is represented by folders My computer, Trash And network(if the computer is connected to local network) - rice. 4.23.

2. By selecting one of the menu items View (Large Icons, Small Icons, List, Table), you can customize the presentation form of the folder contents.

Folder network contains the folders of all computers connected to this moment to the local network.

Folder Basket temporarily contains everything deleted folders and files. If necessary, removed and stored in Cart folders and documents can be restored.

3. To permanently delete files, you must enter the [File-Empty Trash] command.

Operations on files. While working on a computer, the following operations are most often performed on files:

  • copying (a copy of the file is placed in another directory);
  • moving (the file itself is moved to another directory);
  • deletion (the file entry is deleted from the directory);
  • renaming (file name changes).

Graphic Windows interface allows you to perform operations on files using the mouse using the Drag&Drop method (drag and drop). There are also specialized applications for working with files, the so-called file managers: Norton Commander, Windows Commander, Explorer, etc.

In some cases, it becomes necessary to work with the command line interface. Windows provides a mode for working with the MS-DOS command line interface.

Command Line Interface

1. Enter the command [Programs-MS-DOS Session]. The application window will appear MS-DOS session.

When prompted by the system, you can enter MS-DOS commands from the keyboard, including:

  • commands for working with files (copy, del, rename, etc.);
  • commands for working with directories (dir, mkdir, chdir, etc.);
  • commands for working with disks (format, defrag, etc.).

2. There are dozens of MS-DOS commands, and each command has its own format and parameters, which are quite difficult to remember. In order to get help information on a command, you must enter the /? key after the command name.

For example, to get help with the format command, at the system prompt you would type: C:\WINDOWS>format/?


Questions to Consider

1. Which element is the top of the hierarchy in the MS-DOS file system? IN graphical interface Windows?

Practical tasks

4.11. Copy files using the command line interface and file manager.

4.12. View the capacity of your computer's disks, as well as the amount of used and free space.

4.13. Familiarize yourself with the format of the dir command. View the root directory of drive C.

General information about file systems

The Windows 8 operating system supports several file systems: NTFS, FAT and FAT32. But it can only work for NTFS, that is, it can only be installed on hard section disk formatted in this file system. This is due to the features and security tools that are provided in NTFS, but are missing from file systems Windows previous generations: FAT16 And FAT32. Next, we will look at the entire line of file systems for Windows to understand what role they play in the operation of the system and how they developed during the development of Windows up to Windows 8.

Advantages NTFS relate to almost everything: performance, reliability and efficiency of working with data (files) on disk. Thus, one of the main goals of creating NTFS was ensuring high-speed execution of operations on files (copying, reading, deleting, writing), as well as providing additional capabilities: data compression, recovery damaged files systems on large disks, etc.

Another main purpose of creation NTFS there was an implementation of increased security requirements, since file systems FAT, FAT32 in this respect they were no good at all. Exactly at NTFS you can allow or deny access to any file or folder (limit access rights).


First, let's look at the comparative characteristics of file systems, and then we'll look at each of them in more detail. Comparisons, for greater clarity, are presented in tabular form.

File system FAT it is simply not suitable for modern hard drives (due to its disabilities). Concerning FAT32, then it can still be used, but with some reserve. If you buy HDD 1000 GB, then you will have to split it into at least several partitions. And if you are going to do video editing, then it will be very difficult for you 4 GB limit as the maximum possible file size.

The file system does not have all of these disadvantages. NTFS. So, without even going into details and special features of the file system NTFS, you can make a choice in its favor.

File
system
Options
Volume Dimensions Maximum file size
FAT From 1.44 MB to 4 GB 2GB
FAT32 Theoretically, volume sizes from 512 MB to 2 TB are possible. Compression is not supported at the file system level 4GB
NTFS The minimum recommended size is 1.44 MB and the maximum is 2 TB. File system-level compression support for files, directories, and volumes. The maximum size is limited only by the volume size (Theoretically - 264 bytes minus 1 kilobyte. Practically - 244 bytes minus 64 kilobytes)

General use FAT32 can be justified only in cases where you have several operating systems installed on your computer, and any of them does not support NTFS. But today there are practically no such people. Unless you want to install an antique Windows type 98.

File system FAT

File system FAT(usually this means FAT 16) was developed quite a long time ago and was intended to work with small disk and file volumes and a simple directory structure. Abbreviation FAT stands for File Allocation Table(from English file placement table). This table is placed at the beginning of the volume, and two copies of it are kept (to ensure greater stability).
This table is used by the operating system to locate a file and determine its physical location on the hard drive. If the table (and its copy) is damaged, the operating system cannot read the files. It simply cannot determine which file is which, where it begins and where it ends. In such cases, the file system is said to have “crashed.”
File system FAT originally developed by Microsoft for floppy disks. Only later did they begin to use it for hard drives. At first it was FAT12(for floppy disks and hard drives up to 16 MB), and then it grew into FAT16, which was put into operation with the MS-DOS 3.0 operating system.

File system FAT32

Starting with Windows 95 OSR2, Microsoft begins to actively use FAT32- thirty-two-bit version FAT. What to do, technological progress does not stand still and opportunities FAT 16 was clearly not enough.
Compared to her FAT32 began to provide more optimal access to disks, more high speed performing I/O operations, as well as support for large file volumes (disk capacity up to 2 TB).
IN FAT32 Implemented more efficient use of disk space (through the use of smaller clusters). Benefit compared to FAT16 is about 10...15%. That is, when using FAT32 10...15% more information can be written to the same disk than when using FAT16.
In addition, it should be noted that FAT32 provides higher operational reliability and faster program launch speed.
This is due to two significant innovations:
ability to move the root directory and backup copy FAT(if the main copy is damaged)

The ability to store a backup copy of system data.

NTFS file system

General information
Neither version of FAT provides any acceptable level of security. This, as well as the need for additional file mechanisms (compression, encryption), led to the need to create a fundamentally new file system. And it became the file system NT (NTFS)
NTFS- from English New Technology File System - new technology file system
As already mentioned, its main advantage is security: for files and folders NTFS Access rights can be assigned (read, write, etc.). Thanks to this, data security and system stability have significantly increased. Assigning access rights allows you to prohibit/allow any users and programs to perform any operations on files. For example, without sufficient rights, an unauthorized user will not be able to change any file. Or, again, without sufficient rights, the virus will not be able to corrupt the file.
Besides, NTFS, as mentioned above, provides better performance and the ability to work with large amounts of data.

Since Windows 2000, the version used is NTFS 5.0, which, in addition to the standard ones, allows you to implement the following features:

Data encryption- this feature is implemented by a special NTFS add-on called Encrypting File System(EFS)- encrypting file system. Thanks to this mechanism, encrypted data can only be read on the computer on which the encryption occurred.
Disk quotas- it is now possible to assign users a specific (limited) disk size that they can use.
Efficient storage of sparse files. There are files that contain a large number of consecutive empty bytes. The NTFS file system allows you to optimize their storage.

Using the change log- allows you to record all access operations to files and volumes.

And one more innovation of NTFS - mount points. With mount points, you can define various unrelated folders and even drives on a system as a single drive or folder. This is of great importance for collecting heterogeneous information located in the system in one place.

■ Finally, keep in mind that if you have set certain permissions for a file under NTFS, and then you copy it to a FAT partition, then all its access rights and other unique attributes inherent in NTFS will be lost. So be careful.

NTFS device. Main table of MFT files.
Like any other file system, NTFS divides all usable space into clusters- the minimum data blocks into which files are divided. NTFS supports almost any cluster size - from 512 bytes to 64 KB. However, the generally accepted standard is a 4 KB cluster. It is the one that is used by default. The principle of the existence of clusters can be illustrated by the following example.
If your cluster size is 4 KB (which is most likely), and you need to save a file of 5 KB in size, then 8 KB will actually be allocated for it, since it does not fit in one cluster, and disk space is allocated for a file only by clusters .
For each NTFS disk there is a special file - MFT (Master Allocation Table - main file table). This file contains a centralized directory of all files on the disk. When a file is created, NTFS creates and fills in MFT a corresponding record that contains information about file attributes, file contents, file name, etc.

Besides MFT, there are 15 more special files (together with MFT - 16) that are inaccessible to the operating system and are called metafiles. Everyone's names metafiles start with a symbol $ , But standard means It is not possible for the operating system to view them and see them at all. The following are examples of the main metafiles:

SMFT- MFT itself.
$MFTmirr- a copy of the first 16 MFT records, placed in the middle of the disk (mirror).
$LogFile- logging support file.
$Volume- service information: volume label, file system version, etc.
$AttrDef- a list of standard attributes of files on the volume.
$. - root directory.
$Bitmap- map free space volumes
$Boot - boot sector(if the partition is bootable).
$Quota- a file that records user rights to use disk space.
$Upcase- file-table of correspondence between upper and lower case letters in file names on the current volume.
It is needed mainly because in NTFS file names are written in encoding Unicode, which consists of 65 thousand different symbols, searching for large and small equivalents of which is very non-trivial.
As for the principle of organizing data on an NTFS disk, it is conventionally divided into two parts. The first 12% of the disk is allocated for the so-called MFT zone- the space into which the MFT metafile grows.
It is not possible to write any user data to this area. The MFT zone is always kept empty. This is done so that the most important service file (MFT) does not become fragmented as it grows. The remaining 88% of the disk is normal file storage space.
However, if there is a lack of disk space, the MFT zone may itself shrink (if possible), so you will not notice any discomfort. In this case, new data will already be written to the former MFT zone.
If disk space is subsequently released, the MFT zone will increase again, but in a defragmented form (that is, not as a single block, but in several parts on the disk). There is nothing wrong with this, it is simply considered that the system is more reliable when MFT file not defragmented. Additionally, when the MFT file is not defragmented, the entire file system runs faster. Accordingly, the more defragmented the MFT file is, the slower the file system works.

As for the size of the MFT file, it is approximately calculated based on 1 MB per 1000 files.

Convert FAT32 partitions to NTFS without data loss. convert utility

You can easily convert an existing FAT32 partition to NTFS. For this purpose, Windows 8, Windows 8.1 provides a command line utility convert

Its operating parameters are shown in the screenshot

Thus, to convert drive D: to NTFS, in command line you should enter the following command:

After this, you will be asked to enter the volume label, if any (the volume label is indicated next to the drive name in the window My computer. It serves to identify disks in more detail and may or may not be used. For example it could be Files Storage (D:).
To convert a flash drive, the command looks like this:

convert e : /fs:ntfs /nosecurity /x



















Back forward

Attention! Slide previews are for informational purposes only and may not represent all the features of the presentation. If you are interested this work, please download the full version.

Lesson objectives:

  • help students gain an understanding of files and file systems, file names, file paths, and give the basic concepts necessary to work on a computer.
  • nurturing students’ information culture, attentiveness, accuracy, discipline, perseverance.
  • development of cognitive interests, skills in working with a mouse and keyboard, self-control, and note-taking skills.

Equipment: board, computer, computer presentation.

Lesson plan:

  1. Org. moment. (1 min.)
  2. Testing and updating knowledge. (2 minutes.)
  3. Theoretical part. (13 min.)
  4. Practical part. (15 minutes.)
  5. D/z (2 min.)
  6. Questions from students. (5 minutes.)
  7. Lesson summary. (2 minutes.)

During the classes

I. Org. moment.

II. Greeting, checking those present.

Explanation of the lesson.

Updating knowledge.

Let's return again to the issue of files. You already know that everything is stored in files on external memory devices. software computer and all data. Any user who works on a computer has to deal with files.

Working with files on a computer is done using the file system, which is part of the operating system.

In this lesson we will look at what files and file systems are.

III. Theoretical part.

All programs and data are stored in the long-term (external) memory of the computer in the form of files.

File- this is a certain amount of information (program or data) that has a name and is stored in long-term (external) memory.

The file name consists of two parts, separated by a dot: the actual file name and the extension that determines its type (program, data, etc.). The actual name of the file is given by the user, and the file type is usually set automatically by the program when it is created.

Different operating systems have different filename formats. In the MS-DOS operating system, the file name itself must contain no more than eight letters of the Latin alphabet and numbers, and the extension consists of three Latin letters, for example: proba.txt

In the Windows operating system, the file name can have up to 255 characters, and the Russian alphabet can be used, for example:

Units of information.doc

Before the advent of Windows 95, most IBM PCs ran MS-DOS, which had very strict file naming rules. These rules are called convention 8.3

By convention 8.3, a file name can consist of two parts separated by a dot. The first part can be up to 8 characters long, and the second part (after the period) can be up to 3 characters long. The second part after the dot is called the name extension.

When writing a file name, you are allowed to use only English letters and numbers. The name must begin with a letter. Spaces and punctuation are not allowed, with the exception of the exclamation mark (!), tilde (~), and underscore (_).

After the introduction of the Windows 95 operating system, file naming requirements became significantly more relaxed. They are also valid in all subsequent versions of Windows operating systems.

  1. Up to 255 characters are allowed.
  2. It is allowed to use symbols of national alphabets, in particular Russian.
  3. Spaces and other previously prohibited characters are permitted, with the exception of the following nine: /\:*?"<>|.
  4. You can use multiple periods in the file name. The name extension is all characters after the last dot.

The role of the filename extension is purely informational, not command-oriented. If you assign the file extension TXT to a file with a picture, then the contents of the file will not turn into text. It can be viewed in a program designed for working with texts, but such viewing will not give anything intelligible.

File system. Each storage medium (floppy, hard or laser disk) can store a large number of files. The order in which files are stored on the disk is determined by the installed file system.

File system is a system for storing files and organizing directories.

For disks with a small number of files (up to several dozen), it is convenient to use a single-level file system, when the directory (disk table of contents) is a linear sequence of file names. To find a file on disk, you just need to specify the file name.

If hundreds and thousands of files are stored on a disk, then for ease of searching, the files are organized into a multi-level hierarchical file system, which has a “tree” structure (looks like an inverted tree).

The initial, root, directory contains subdirectories of the 1st level, in turn, in each of them there are subdirectories of the 2nd level, etc. It should be noted that files can be stored in directories of all levels.

To facilitate understanding of this issue, we will use an analogy with the traditional “paper” method of storing information. In this analogy, a file is represented as some titled document (text, drawing, etc.) on paper sheets. The next largest element of the file structure is called a directory. Continuing the “paper” analogy, we will think of the catalog as a folder into which you can put a lot of documents, i.e. files. The directory also gets its own name (think of it on the cover of a folder).

The directory itself can be part of another directory external to it. This is similar to nesting a folder inside another folder bigger size. Thus, each directory can contain many files and subdirectories (called subdirectories). The top-level directory that is not nested within any others is called the root directory.

Now imagine the complete picture of the file structure like this: the whole external memory computer is a cabinet with many drawers. Each box is an analogue of a disk; in the box there is a large folder (root directory); this folder contains many folders and documents (subdirectories and files), etc. The deepest nested folders contain only documents (files) or may be empty.

The path to the file. In order to find a file in a hierarchical file structure, you must specify the path to the file. The path to the file includes the logical name of the disk, written through the separator “\”, and a sequence of names of nested directories, the last of which contains the desired file.

For example, the path to the files in the figure can be written like this:

C:\Abstracts\

C:\Abstracts\Physics\

C:\Abstracts\Informatics\

C:\Drawings\

Full file name.

The path to the file along with the file name is called the fully qualified file name.

Example of full file names:

C:\Abstracts\Physics\Optical phenomena.doc

C:\Abstracts\Informatics\Internet.doc

C:\Abstracts\Informatics\Computer viruses.doc

C:\Drawings\Sunset.jpg

C:\Drawings\ Winter.jpg

In the Windows operating system, the concept of “folder” is used instead of directories. Folder- This Windows object, designed to combine files and other folders into groups. The concept of a folder is broader than the concept of a “directory”.

In Windows, at the top of the folder hierarchy is the Desktop folder. (The next level is represented by the My Computer, Recycle Bin and Network Places folders (if the computer is connected to a local network).

If we want to get acquainted with the computer's resources, we need to open the folder My computer.

You can perform a number of standard actions with files and folders.

Actions with files such as “create”, “save”, “close” can only be performed in application programs(“Notepad”, “Paint”, ...).

The actions “open”, “rename”, “move”, “copy”, “delete” can be performed in the system environment.

  • Copying (a copy of the file is placed in another directory);
  • Move (the file itself is moved to another directory);
  • Delete (the file entry is deleted from the directory);
  • Renaming (file name changes).

The Windows graphical interface allows you to perform operations on files using the mouse using the Drag&Drop method. There are also specialized applications for working with files, so-called file managers.

Questions and tasks:

1. Write down the full names of all files

C:\My Documents\Ivanov\QBasic.doc

C:\My documents\Petrov\Letter.txt

C:\My documents\Petrov\Drawings\Sea.bmp

C:\Movies\Interesting film.avi

2. Build a directory tree

C:\Drawings\Nature\Sky.bmp

C:\Drawings\Nature\Snow.bmp

C:\Pictures\Computer\Monitor.bmp

C:\My Documents\Report.doc

IV. Practical part.

Today in the practical part we will work with files. Let's learn how to open, copy, move, rename and delete them. For work we will use the My Computer window.

The My Computer window is used to view the contents of your computer, devices connected to it, storage devices with removable media, and to perform various operations with folders and files stored on its disks. Task links in the left pane of this folder window allow you to view information about your computer, change system settings in Control Panel, and perform other system management procedures.

To open the My Computer window, click the Start button and select My Computer in the right menu column. You can also use the icon on your desktop.

In the My Computer window, you can display the following toolbars: Regular buttons, Address bar, Links, by selecting the commands of the same name in the View menu, Toolbars.

Toolbar Regular buttons

Toolbar Buttons Regular buttons allow you to perform frequently used commands without opening a menu, which reduces the time it takes to complete an operation.

Toolbar Buttons Regular buttons have the following purposes:

  • Back, Forward - Move to a previously viewed folder, document, web page, or next item in the order in which the user viewed them in the current session. From the keyboard, the Back button is duplicated by the +[left arrow] keys, the Forward button is duplicated by the +[right arrow] keys. To the right of the Back and Forward buttons there are arrows, clicking on which will open a list of previously viewed folders;
  • Up - provides a transition to the parent (enclosing) folder containing this object. This button is sometimes called the back button. It is duplicated by the Backspace key;
  • Search - displays the Search browser panel on the left side of the window, using which you can find the material of interest on your computer, on the network or on the Internet;
  • Folders - displays the Folders browser panel on the left side of the window, making it easier to navigate through folders and files;
  • View - provides quick access to commands that duplicate the View menu commands. They allow you to display the contents of folders in different modes:

Filmstrip - used to view folders with images. The images are arranged in a row in the form of miniature frames. You can scroll through them using the left and right arrow buttons. When you click on an image, a larger view of it appears on top of the other images. If you want to change the image, print it, or save it in a different folder, double-click it.

Page thumbnails - displays miniature images (thumbnails) of the contents of graphic and video files, web pages (HTML files) in the window. In this mode, the icon for the My Pictures folder and its subfolders displays thumbnail images of the four most recently modified files in that folder. After clicking the picture right click mouse and selecting the View command, the Image and Fax Viewer program is launched, allowing you to enlarge, reduce, rotate and print the image. The information is cached in the Thumbs.db file, which eliminates the need to wait for the content to be rendered when viewing the folder again.

Tile - Displays files and folders as icons next to each other, like tiles forming a path. Under the file or folder name, data corresponding to the selected sorting method is provided;

Icons - icons of objects are visible in the folder window; under them are the names of folders and files;

List - objects in the folder window are sorted by their names in alphabetical order. The folder names are displayed first, then the file names. Object icons are arranged in one or more columns next to their names;

Table - displays a list of objects stored in the folder in table form. The table columns provide basic information about folders and files: Name, Size, Type, Modified. To sort table data alphabetically, click on the column header. To sort in reverse order, repeat the operation;

In the My Computer window, open the folder C:\Our Lesson\Photos\. This folder contains several subfolders with photos. View their contents... Try changing the way folders and files are displayed. Select one of the files and by calling the context menu (right mouse button) view its properties (type, size, creation date, attributes...). Review the properties of the C: drive yourself.

Now find the file named C:\WINDOWS\NOTEPAD.EXE and open it. That's right, this is the Notepad program, the shortcut to which is on the desktop.

Now let's try to copy files from one folder to another.

To perform any operation with a file, folder or group of files, they must be selected. Selecting a single file or folder is done with a single mouse click. In this case, the selected object is highlighted in a dark color. Now you can do whatever you want with the selected file - “drag” it to another folder using the mouse pointer or call up its context menu (by right-clicking).

However, there are times when we need to work not with one file or folder, but with several at once! This means that we will have to select several icons at once. To select a group of files, you must first select one of them, and then, pressing and holding the key down, continue selecting the remaining files. Clicking the selected file again deselects it. When the group is highlighted, the key can be released. To select several files one after another, you need to click on the first file in the group, and then, while holding down the key, on the last one. All files between them will become selected. You can also select files by drawing a rectangular frame around them using the mouse. This is especially useful if you don't use icon ordering.

Finally, you can select all the files in a folder by simultaneously pressing the and A (Latin) keys, or using the Edit/Select menu.

Open the folder with photos and move the window to the side (also reduce its size) so that it does not bother us. Open another My Computer window. In this window, open your folder and create a new Photos folder in it.

Copy

There are several ways to copy files from folder to folders (or, for example, from a hard drive to a floppy disk):

  • Call Context menu file and select Copy. Now go to the folder or drive where you want to place a copy of your file, call the Context Menu again and select Paste;
  • The same operation can be done using the Copy and Paste buttons on the Toolbar of the My Computer window.
  • Finally, you can simply drag the file with the mouse into a new folder while holding down a key on the keyboard (or drag with the right mouse button and select the copy command from the menu that appears).

Copy a few photos you like.

In a similar way, you can move files from one folder to another. You just need to cut the files rather than copy them; just drag with the left mouse button (if both folders are on the same disk); drag with the right mouse button and select the move command from the menu that appears.

To rename a file or folder, you can select the Rename item from the Context Menu or simply press the F2 key on your keyboard. Please note - if your Explorer (My Computer) can show not only the file name, but also its extension, be especially careful when renaming. If the file name can be changed, then its extension must remain intact.

Rename the files you copied.

To delete not necessary files you can use one of several methods:

  • Call the Context Menu of the file and select Delete;
  • Give the command File→Delete;
  • Press the button on the keyboard;
  • Drag a file or folder to the Trash.

And finally, complete the same task, only the source folder will be located on another computer, for example on a server. To do this, open the Network Neighborhood window, select the “Show computers” command on the left working group", find Server and go to open for public access photo folder on the server.

V. D/z.

Know what a file is, a file system, be able to find and open files, be able to copy and rename files. Students who have computers at home should continue to master the “ten-finger touch typing method.”

Additional task: find out how you can create additional panel with shortcuts to programs you frequently use.

VI. Questions from students.

Answers to student questions.

VII. Lesson summary.

Summing up the lesson. Grading.

During the lesson, we became acquainted with the concepts of file and file system, and learned how to perform basic operations with files and folders.

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

Why are there so many of them?

File systems 101

Different file systems made easy various ways organize and store 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" into 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 a 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 the 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 without having to comb through the entire disk to find a .

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 might be organized in file cabinets. Exist different ways organizing these files and storing data is called “file systems”.

Why are there so many file systems?

Not all file systems are created 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 drives with larger amounts of memory, while others only work on drives with less memory. Some file systems are more reliable and resistant to file corruption, while others compromise reliability in favor of speed.

Does not exist better file system, which would be suitable for all purposes. Each computer operating system tends to use its own file system, which the operating system developers also work on. Microsoft, Apple and developers Linux kernels working on their file systems. New file systems may be faster, more stable, scale better to 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. A file system defines how files are laid out, organized, indexed, and how metadata is associated with them. There's 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 the important data from the partition first.

Operating systems automatically format partitions into the appropriate file system during the installation process. If you have a section in Windows format on which you want to install Linux is in progress Linux installations will format the NTFS or FAT32 partition to the Linux file system preferred by your Linux distribution.

So, if you have a storage device and want to use a different file system, simply copy the files from it to back them up. Then use the tool Disk management on Windows gparted on Linux or disk utility on Mac OS.

Overview of Common File Systems

Here short review some of the most common file systems you'll encounter. It is not exhaustive - there are many other file systems for special purposes:

  • FAT32: is one of the older Windows file systems, but it is still used on removable media - small in size. Large external hard disks 1 TB or more will, in any case, be formatted using NTFS. FAT32 only makes sense to be used with 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+: Mac uses HFS+ for its internal partitions, and formats them with it external drives- for use external hard disk with Time Machine is required so that file system attributes can be added to backup copy. Macs can also read and write files to FAT32 file systems, but you will need third-party software to write to file systems. NTFS systems from Mac.
  • Ext2 / Ext3/Ext4: You will often see ext2, ext3 and ext4 file systems in Linux. Ext2 is an older file system, and it does not have important features such as logging - if the power goes out or the computer crashes while writing to an ext2 drive, data may be lost. Ext3 adds these robustness characteristics at the cost of some speed. Ext4 is more modern and quick option– This 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 on such file systems. However, Linux can read and write to both FAT32 and NTFS.
  • Btrfs: this is a new file Linux system, which is still in development. It is not currently standard on most Linux distributions, but will probably one day replace Ext4. The goal is to provide additional features that allow Linux to scale to larger storage volumes.
  • Swap: V Linux file The "swap" system is not actually a file system. A partition formatted as "swap" can be used as operating system swap space - like the Windows page file, but requires a special partition.

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

The typical computer user won't know much of this material - but knowing the basics will help you understand questions such as: "why won't this Mac format drive work with my Windows PC?" and "should I format this hard USB disk like FAT32 or NTFS?