Basic functions of the file system. File system. What is it? OS file system

The file system allows you to organize programs and data and organize them in order to manage objects.

p align="justify"> The concept of the file system, which underlies the Unix operating system, has placed a deep mark on the operating system of personal computers. The Unix operating system has a subsystem for introducing and releasing a unified method of access both to files and to peripheral attachments. Under the file when you decide to type data on the disk, terminal or other attachment.

File system - This is a functional part of the operating system, which ensures that the operations on files are safe. The file system allows you to work with files and directories (catalogues) independently in their place, size, type just.

File system - Tse system of data management.

The data management system is a system that accounts for more operations from the physical manipulation of files and can cause respect for the head rank of the logical authorities of data.

File systems of the OS are created for the creation of a virtual device for the virtual manifestation of external devices, which allows you to work with them not on a low level of commands for managing physical devices, but on a high level of sets and structures of data.

File system (assigned):

  • bring a picture of the real distribution of information in the memory of the old;
  • ensuring the independence of the programs depending on the specifics of the specific configuration of the computer (the logical line of work with files);
  • ensure standard reactions to pardons, which are blamed for the exchange of danim.

File structure

The entire collection of files on the disk and the interplay between them is called a file structure. Separate operating systems may have a hierarchical bagatari file structure organized around a tree.

Tree-like tree-like structure of catalogs directory tree. Posted on Unix. Hierarchical structure - The structure of the system, the parts (components) that are connected by the inclusions or subordering.

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

directory tree of drive G

An orientated tree is a graph from a seen peak (root), for which the root is that be-such a peak and a single path. If so, two options for orientation are possible: either all paths are oriented from the root to the leaf, or all paths are oriented from the leaf to the root.

The trees are victorious in the description and design of hierarchical structures.

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

Distributed

Whether it's a hard magneto-optical disk in the process of formatting, you can separate a few pieces and work with them as if from other (independent) disks. Qi parts are called divisions or logical disks. Splitting a disk into a shard of logical disks may be necessary through those that the OS cannot work with disks, the size of which exceeds the same value. It is also necessary to manually save data and programs of the coristuvacha okremo in the system programs (OS), even the OS can “get out of the computer”.

Rozdil- Disk area. Pid logical disk (divided) in the computer you understand whether there is any kind of information, with some kind of operating system that works like a single whole object.

Disk name- Significance of the logical disk; entry in the root catalog.

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

The letters A, B are reserved for denoting floppy disks.

C - hard drive, sound out of which the OS is vibrating.

Other letters - logical disks, compact disks. The maximum number of logical disks for Windows is unlimited.

At distribution tables it is indicated to spread the cob of that kіntsya tsy divided that number of sectors in tsymu razdіl (mіstse ta rozmіr).

File structure of a logical drive

To get to the information on the disk that the file has, you need to know the physical address of the first sector (surface number + track number + sector number), the total number of clusters, how to borrow the file, the addresses of the next cluster, so the file size is larger, the size of one cluster

File structure elements:

    starting sector (Cob zavantazhennya, Boot-sector);

    table accommodationfiles (FAT - File Allocation Table);

    root directory (Root Directory);

    danich area (which has lost its disk space).

Boot-sector

Boot-sector - The first (cob) sector of the disk. Be on 0 sides, 0 roads.

Boot sector to remove service information:

    disk cluster expansion (cluster is a block, which unites a group of sectors into a short expansion of the FAT-table);

    FAT-table decommissioning place (the boot sector has an indicator for those decommissioned FAT-tables);

    expansion of the FAT-table;

    the number of FAT-tables (be sure to have at least 2 copies of the tables for safety and security, so that the FAT is destroyed before the information is used and it is important to check);

    addresses on the cob root directory and її maximum size.

Boot-sector has a cob capture block (zavantazhuvach) - a boot record of Boot Record.

Zavantazhuvach - a service program, like helping the program, which is being fixed, into operational memory and bringing it to the camp of readiness until the end.

FAT (file allocation table)

FAT (File Allocation Table) – file allocation table. It has been determined that the plates of the disk can be seen to the skin file. The data area of ​​the disk is represented in the OS as a sequence of clusters.

FAT- The array of elements that address the cluster data areas of the disk. The skin cluster of the given area is given one FAT element. The FAT elements serve as a language for sending to the data area cluster file.

The structure of the table of file allocation:

FAT is folded with elements of 16/32/64 bits. In the table, there can be up to 65520 such elements, skin of them (the first two) correspond to the disk cluster. The cluster is the only one that has a space for data areas on the disk for files and directories. The first two elements of the table (with numbers 0 and 1) are reserved, the skin of the other elements in the table is assigned to the disk cluster with the same number. The element can indicate whether the cluster is valid, whether it is a defective cluster, whether the cluster belongs to the file or the remaining cluster in the file. If a cluster belongs to a file and not another cluster, the table element should place the number of the next cluster in this file.

FAT- A very important element of the file structure. Damaged FAT can lead to complete or partial loss of information on the entire logical drive. To that end, two copies of FAT are saved on the disk. Use special programs to control the FAT mill and repair damage.

For different operating systems, you need different versions of FAT

Windows 95 FAT16, FAT32

Windows NT (XP) NTFS

Novell Netware TurboFAT

UNIX NFS, ReiserFS

Logical structure of carrying information

The file system determines how data is stored on the disk, and how access to the information that is stored can be used when reading.

We received the information on our PC by looking at specific files neatly arranged in folders. And this time, your computer is working on the basis of a different principle. There are not many files on the hard disk for the new one. Vіn "batch" is no longer clearly addressed by the sector with the bytecode. Moreover, the code of one file is always taken from the next sectors (the so-called fragmentation of data).

How is the computer "intelligence", de you, for example, shukati our text document, which should lie, say, on the Work Table? For tse, appear, show file system hard disk. Today we know with you that there are file systems and that they are special.

What is a file system

To understand what a file system is, it's best to speed it up by analogy. It is obvious that a hard disk is like a box, from which cubes of different colors are saved. Qi cubes - parts of different files, which are saved in the surroundings for the size of the commissaries, as they are called clusters. The stench can be just piled up with a bunch, or the mother’s singing order of placement. So from, as far as smart cubes are saved not as a chaotic cluster, but as far as logic goes, we can talk about the presence of a file system analogue.

The file system determines the order in which data is stored on the disk and the principle of access to them, depending on what type of file system to store and type of storage. For example, it is obvious that for a magnetic stripe, as if recording only the last blocks of data, there is no more than a single file system with subsequent access to the cluster with information, and for a daily SSD-disk, be-yak rich with sufficient access:

Following the principle of succession of saving blocks of data, file systems, as we have already worked out, can be divided into those, as they save clusters with fragments to a file. successively or quite. If it costs rivniv, then the FS can be subdivided on them equalі wood-like(bagatorivnevi).

In the first view, all files appear in the view of a single flat list, and in the other view, in the view of a hierarchical list. As a rule, it is not necessary to separate the contribution, and the expansion is either in one ("root" in UNIX), or in a number of root directories (logical disks in Windows):

Before the peculiarities of file systems, one can see the presence of various mechanisms that protect the structure of data from crashes. One of the most important mechanisms for ensuring the water resistance of FS is journaling. It allows you to record in special service files (they are called "logs" or "logs") everything that is written to the files.

Journaling can be remember, if skin surgery is going on, I will become a cluster, and I will save data. This kind of logging is often stopped for different databases, but it just seems to encourage the system to work more and more logs (in fact, the logs save a new backup of the file system with the usual її data).

Journaling more often less logical operations that (optionally) cluster file system. So only those that, say, a file with the name "file.txt" with a size of 52 KB of records in such a cluster are recorded in the journal. The file itself does not appear in the log. Such a pidhid allows you to hide the duplication of data, speed up the process of working with files and change the size of the journal itself. The only shortfall with this method of logging - in case of failure, data can be wasted, which is recorded (there are no copies of the copies), but the file system itself becomes deprived of practical data.

formatting

If we are talking about file systems in the context of today's computers with their hard or SSD disks, then we give more respect to a rich FS with sufficient access to clusters. The most popular in the computer world today: FAT32, NTFS, exFAT, ext3/ext4, ReiserFS and HFS+.

Changing the file system on the disk is within reach formatting. Vono transfers the creation only on the level of the hard disk at the cob yogo sector of special service marks, the primary principles of access to data. Whenever a cluster with actual data is formatted, the sounds are cleared or are indicated as empty and available for overwriting. Vinyatkom є okremi vipadki file system conversion(for example, from FAT32 to NTFS), if the entire data structure is saved.

For formatting, you can use standard operating system tools (for example, Linux console commands or the disk context menu in Windows), functions available at the OS preparation stage, or special programs. The only thing to worry about with a software solution is that your operating system may not support the file system you have chosen without installing additional drivers (for example, ext3 / 4 for Windows):

I understand also understand low-level format. It's not enough to clean up the disk from the record in the yogo cluster and special service information for viewing the heads that are read. For today's hard disks, such a function has not been transferred to the software level (you can only do it for the help of special powers), the understanding of the low-level format has been saved, but the truth is, the troch has been transformed.

You can check at once for additional special software (HDD Low Level Format Tool for Windows) or commands (DD for Linux). When it is stopped, all clusters of the hard disk are overwritten with zeros, and again there is a gap. Whenever the file system actually knows and Windows appears to be RAW. To gain access to the disk after such formatting, it is necessary to format it in one of the available traditional file systems of the highest level.

Features of file systems

Well, now let's take a look at the features of the largest file systems.

FAT32

One of the oldest file systems for disks, which is still widely used today. FAT32(short English "File Allocation Table" - "file allocation table"). By virtue of its breadth, it is supported by the maximum amount of various kinds of possession, starting from the car radio, ending with the hard modern computers. Most of the flash drives sold today are also formatted in FAT32.

This FS first appeared in Windows 95 OSR2 in 1996, becoming a logical development of the much earlier FAT16 (1983). One of the main reasons for the transition to a new file system was the appearance of many (at that time) hard disks with a volume greater than 2 GB (gibibyte - the exact variant of a gigabyte (109) - 230 bytes) (the maximum possible size of a partition in FAT16). FAT32 allowed up to 268435445 clusters of maximum 32 KB each, which is equivalent to 8 TiB per volume. However, if the cluster size is standard (512 B), then the maximum volume size is less than three times more than 127 GB.

The basis of FAT32, as it is called, is the file table. She takes notes about current files, as well as about the hour of their creation and the rest of access to them. Logging is allowed, so the process of reading/writing in this file system is better, lower, for example, NTFS, as there are more new logs. However, due to the good FAT32 code, it is still widely used these days.

The head of the FAT32 at the moment is an exchange for the maximum file size - 4 GB. Files that cross this threshold are guilty of being broken into pieces, which makes it easier for your hand to access them. In addition, FAT32 can also be used as a medium for Windows. For example, you will not be able to create a distribution over 32 GB with your staff. Therefore, 64 GB flash drives and more can be formatted for additional special software, or on Linux.

However, in any case, if you want access to your nose and save yourself, there will be difficulties with "galms" both when reading, and when writing data. Therefore, if you have more than 32 GB of storage, it is better to format them in other file systems, such as exFAT or NTFS.

NTFS

While the Windows 95/98 line continued the tradition even though the outdated DOS operating system, the new NT line was straight forward innovation. Therefore, with the advent of Windows NT 3.1 in 1993, a new file system was created specifically for it. NTFS(short English "New Technology File System" - "new technology file system").

This file system is the main file system for all modern versions of Windows, the shards ensure the security of the unfortunate security of the robots, support the storage capacity of up to 16 EIB (exbibytes - 260) (with a maximum cluster size of 64 KB) without limiting the size of the files Satisfied with the indignities of the functional. For example, NTFS is a journal file system, and it also supports the roles of koristuvachiv for accessing up to 10 data, which was not in the same FAT32.

Like in FAT32, the basis of NTFS is a table, but there is more of a thorough data base and is called MFT(short English "Master File Table" - "head file table"). Rows near this table specify the files that are saved on a specific distribution, and the columns change the attributes of these files (date of creation, expansion, access rights then).

In addition, in order to increase the stability to the vіdmovi in ​​NTFS, USN magazine(Short English "Update Sequence Number" - Literally "Update Sequence Number"). This journal, similar to the FAT32 table, records data about changing that other file. However, although the FAT32 table recorded only an hour of the remaining access to data, which did not give any particular practical benefits, USN can save the front end of the file system, which allows it to be used in case of failures.

One more feature of NTFS is support alternative data streams(Eng. "Alternate Data Streams" - ADS). A bunch of stench was conceived for the demarcation of the vicinities of the various processes. Then (for Windows 2000) they were hacked to save certain attributes of files (name of the author, icon then), similarly to how it worked in HFS on MacOS. On modern Windows, alternative threads can save practically any information. Tsim navіt koristuyutsya deakі vіrusi for attaching their presence in the system.

On the right, in that alternative streams are not found by Windows Explorer and, in fact, are invisible to other programs. However, you can look at them and learn to look after them, for example, to get some money for the help of special software. Browse data in alternative streams manually with the help of the NTFS Stream Explorer program, and twist them to attach files with the help of Xp-lore:

Three additional features, which contribute to the riddle for NTFS, є ciphering, squeezing data, "soft" and "zhorst" messages on files (for folders of such capacity, unfortunately, no), disk quotas for other short-lived systems, and also, of course, razmezhuvannya access rights to files.

NTFS was created exclusively for Windows, it is supported by most media players (flash drives can be formatted in the same way), Linux and MacOS operating systems (although, with such exchanges for recording). Warto signifies weak support for NTFS on popular game consoles. Of these, support її є less than Xbox One.

exFAT

In the wake of the other half of the 2000s, it became clear that the FAT32 file system, as it is ubiquitous, will soon exhaust its potential. It was not possible to overcome the NTFS journal for flash drives with a large number of cycles of overwriting and a larger robot. Therefore, in 2006, the same corporation Microsoft released a new file system from the world exFAT(short English "Extended FAT" - "extended FAT") for the kit with the operating system Windows Embedded CE 6.0:

Vaughn has become a logical continuation of the FAT32 development, which is also called FAT64. The main trump card of the new file system was the increase in the size of the exchange for file expansion and the increase in the theoretical limit for disk sharing up to 16 EIB (like NTFS). With this, through the daily logging, exFAT saved high security access to data and compactness.

Another advantage of exFAT was the ability to increase the size of the cluster up to 32 MB, which significantly allowed optimizing the storage of large files (for example, video). In addition, saving data in exFAT is organized in such a way as to minimize the fragmentation process and overwriting the clusters themselves as much as possible. Everything is broken, again, for optimizing the robots and flash drives, for those and the file system was broken up.

Due to the fact that exFAT is a visibly new FS, it is possible to change the way exFAT works. Windows now has a new update for Vista SP1 (although there is an update for Windows XP SP2 - ). MacOS supports exFAT since version 10.6.5, and for Linux, you need to install an okremium driver (some distributions will only work, and some will only support reading).

ext2, ext3 and ext4

Even though the Windows environment is no more than a decade old to "rule the ball" NTFS, then the Linux camp traditionally panuє already great versatility, zokrema and zastosovuvanih file systems. Well, it's true, there's only one line, as it wins out to more distribution kits for umovchannyam. All file systems of the family ext(Eng. fast. "Extended File System" - "expanded file system"), as of 1992, the fate of Linux itself was created.

Largest widest nabula other version ext2, Yaka, Yak i NTFS, appeared in 1993 roci. True, on NTFS, ext2 is not a file system that can be logged. Tse vodnochas i її plus, i minus. Plus, there is one of the best FS for recording data. It is also important to keep journaling on flash drives and SSD drives. Well, the payment for a swedcode is a low stiykist to vіdmov.

ext2 stability improved in 2001 ext3. It appeared to be journaling, which can be done in three modes: "writeback" (only file system metadata is written), "ordered" (the journal is written on a regular basis BEFORE changing the FS) and "journal" (recent backup of metadata and changed files) .

Otherwise, there were no special innovations. The same speed of work, similar to the previous version, was actually reduced, and in 2006, a prototype of the upcoming stage of file system development appeared ext4, residual release as of 2008. The fourth expanded file system saved journaling, but it also increased the speed of reading data, so it became more like, lower in ext2!

Other innovations include increasing the maximum disk space to 1 EUB (from 32 TiB in ext2 and ext3), increasing the maximum file size to 16 TiB (from 2 TiB in early versions) and introducing the mechanism of extends (in English "extent" "-" expanse"). The rest allows you to go not to single blocks, as it is implemented in other file systems (and in ext3 zokrema), but to the shared space of the disk from clusters, which sequentially go, with a large amount of up to 128 MB, which actually increases the productivity of them and changes the fragment.

Today, support for file systems of the ext tiєї chi іnshої ї ї ії іnshої ї ї ї ї ії ії аlѕе mаyzhе іn аnd linux. /or drivers.

ReiserFS

Another young and promising file system "born" in the world of Linux ReiserFS. Through the efforts of the team of the American retailer Hans Reiser, won became the first journal FS, as it was added to the Linux kernel version 2.4.1 in 2001, just before the addition of the ext3 support.

In fact, like ext3, which came next to it, ReiserFS made it possible to hack on Linux outside or privately logging. Prote, on ext3, a smaller allowable size for a file (up to 8 TiB or 2) and a maximum length for a file name equal to 255 characters, not bytes (4032 bytes).

Also, one of the features of ReiserFS, for which the koristuvachs fell in love with it, it became possible to change the size of the distribution without yogo reassembly. ext2 didn't have a similar feature, but later ext3 showed up, although ReiserFS could be the first in this plan.

Regardless of the low advantage over alternative file systems in its time, ReiserFS has not been spared the shortcomings either. To the most important of them, it is possible to bring a weak stability to the standard with a poor metadata structure and an inefficient defragmentation algorithm. Since 2004, a robot was born to reduce the file system, as it became known under the name Reiser4.

The truth is, despite the low innovation, improved and corrected, the new file system has lost its share of poor enthusiasts. On the right, in the fact that in 2006 Hans Reiser's rozі vvbivstvo vlasnoy squads and bv uzyat under the vartu, and pіznіshe i yazneniya. Obviously, the Namesys company, which was engaged in the development of Reiser4, was formed. From that hour, a group of retailers under the supervision of the Russian retailer Eduard Shishkin was supported by that extension of the file system.

Sorry, the support of Reiser4 in the Linux kernel has not been added yet, but ReiserFS is. That's why it's a lot of people who sell victories in various collections as a file system for default.

HFS

Speaking about file systems typical for various operating systems, one cannot but guess about MacOS s її HFS(short English "Hierarchical File System" - "ієєєрхічна file system"). The first versions of this system appeared in 1985 along with the Macintosh System 1.0 operating system:

For today's worlds, the given file system was even less efficient, so in 1998, with MacOS 8.1, a shortened version appeared under the name HFS+ or Mac OS Extended, which is supported until today.

Like the front, HFS+ divide the disk into blocks of 512 KB (for locking), like a combined cluster, in return for saving a few other files. However, the new FS can be 32-bit addressing (replacement 16-bit). This allows you to set a limit on the size of the file that is being written, and ensure that the maximum size of the volume is reduced to 8 EUB (and in the rest of the revisions up to 16 EUB).

Among the other advantages of HFS+, there is a significant logging (for a new one, there are a lot of attachments under the name HFSJ), as well as a rich streaming. Moreover, although in NTFS alternative streams do not have particularly precise regulation on the type of information that is saved, then in HFS+ two streams are specifically seen: flow of data (collecting the main data of files) and flow of resources (taking metadata of files).

HFS+ is practically ideal for traditional HDDs, prote, as seen above by ReiserFS, may be the most effective algorithms for combating data fragmentation. Because of the expansion of SSD-accumulators and the promotion of them in Apple technology, the file system more and more often comes to change, it is split in 2016. APFS(short English "Apple File System" - "Apple File System"), which appeared in desktop macOS High Sierra (10.13) and mobile iOS 10.3.

Why APFS is similar to exFAT in terms of optimizing read / write processes, prote, on administering it, can log, increase access rights to data, can improve encryption algorithms and compress data, and can also work with volumes9 YiB (Don't laugh - "yobibyte") for 64-bit addressing!

The only disadvantage of APFS is that it is supported only by Apple's current technology and is not yet available on other platforms.

File System Pairing

Today we looked at a lot of different popular file systems, it didn’t bother us to put all the data about them into a single table:

Characteristics / FS FAT32 NTFS exFAT ext2 ext4 ReiserFS HFS+ APFS
R_k provadzhennya 1996 1993 2008 1993 2006 2001 1998 2016
victoria sphere Windows, memory storage, Linux save storage, Windows Vista+, Linux Linux, known accumulators linux linux macOS macOS
Maximum file size 4 GiB 16 EiB 16 EiB 2 TiB 16 TiB 8 TiB 16 EiB 9 YiB
Maximum volume size 8 TiB 16 EiB 64 ZiB (zebibyte) 32 TiB 1 EUB 16 TiB 16 EiB 9 YiB
journaling - + - - + + + +
Access rights management - + - - + + + +

Visnovki

As a matter of fact, for the skin operating system, there is its own optimal file system, which allows the most efficient handling of data. For example, for Windows - not NTFS, for MacOS - HFS + or APFS. As a culprit from the rule, you can only include numerical distributions of Linux. There are more than a dozen file systems, skin with their own advantages and shortcomings.

Largest Windows storage devices should remember at least three widest file systems: FAT32 - for small flash drives and old storage, NTFS - for large computers and exFAT - for larger flash drives and older SSDs (about the actual format of the system disk in ex dosі sperchayutsya through the day of journaling and greater schilnіst to zboїv).

P.S. It is allowed to freely copy and quote this article for the understanding of the inscription of an active message sent to the savings by Ruslan Tertishny.

File system

All programs and data are saved from the old string (old) computer memory from viewing files.

File- important amount of information (program or data) that can be stored in old-line (external) memory.

Name the file. The file is made up of two parts, separated by a dot: in the file it is the extension that indicates the type (program, given only). Once the name is given to the file, the file type is set, and the type of the file is set by the program automatically at the hour of its creation (Table 4.2).

Different operating systems have different filename formats. In the MS-DOS operating system, the file can 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 Windows operating system, the file can be up to 255 characters long, and you can use the Russian alphabet, for example:


File system. A lot of files can be stored on the skin data carrier (soft, hard or laser disc). The order in which files are stored on disk is determined by the file system.

The skin disk is divided into two areas: the file saving area and the directory. The catalog should be replaced by the file and the insertion on the cob of its distribution on the disk. To draw an analogy between a disk and a book, the area for saving files should be changed, and the catalog should be changed. Moreover, the book is folded from 3 sides, and the disk is folded from sectors.

For discs with a small number of files (up to a few dozen), you can win peer-to-peer file system, If the directory (disk change) is a linear sequence of file names (Table 4.3). Such a catalog can be compared with the zmist of a child's book, so you can only take revenge on the name of an admonition.

As hundreds and thousands of files are stored on the disk, then for the sake of clarity, I will ask for bagator_vneva ієrarchіchna file system how can I have a tree-like structure. Such a hierarchy system can be divided, for example, from the example of a given assistant, like a hierarchy system of divisions, divisions, paragraphs and points.

Pochatkovy, root catalog to replace the deposits of the catalogs of the 1st equal, with your own black leather from the rest you can remove the deposits of the catalogs of the 2nd equal, too. Specify the following, which files can be stored in the directories of all rivers.

For example, the root directory can have two subdirectories of the 1st level (Catalog_1, Directory_2) and one file (File_1). In my own room, in the catalog of the 1st level (Catalog_1) there are two folders of another level (Catalog_1.1 and Catalog_1.2) and one file (File_1.1) - fig. 4.21.

File system- tse system of saving files and organizing catalogs.

Let's take a look at the hierarchical file system for a specific application. A leather disc may be logically named (A:, B: - soft discs, C:, D:, E: and so on - hard and laser discs).

Bring to the root directory of disk C: - two directories of the 1st level (GAMES, TEXT), and one directory of the 2nd level (CHESS) in the GAMES directory. Which TEXT catalog has a proba.txt file, and the CHESS catalog has a chess.exe file (Fig. 4.22).

Way to the file. How do I know the current files (chess.exe, proba.txt) in my archiving file system? For which it is necessary to specify a path to the file. The paths to the file are written through the "\" logical disk name and the sequence of names of nesting directories into each other, the rest of which will need the file. Ways to re-arrange more files can be recorded in the following order:

Ways to the file at once name the file.

An example of a full file name:

W\GAMES\CHESS\chess.exe

Submission of the file system behind the help of a graphical interface.Ієєєєєєрхічнаї file system MS-DOS, scho mіstit directories and files, is presented in the operating system Windows for the help of a graphical interface in the form of Ієєєєрхіхінїї system of folders and documents. The Windows folder is analogous to the MS-DOS directory

The proteo-hierarchical structure of these systems varies widely. In the MS-DOS hierarchy file system, the top of the object hierarchy is the root directory of the disk, which can be leveled with a stovbur of a tree, on which the hilts (subdirectories) grow, and leaflets (files) are placed on the nibs.

On Windows, at the top of the folder hierarchy is the folder Working style. Coming time of submissions by folders My computer, Koshikі merezhe otochennya(as a computer is connected to a local network) - small. 4.23.

2. Selecting one of the menu items Pereglyad (Great icons, Small icons, List, Table), you can customize the form of submission in place of the folder.

Theca merezhe otochennya sweep the folders of all computers connected at once to the local area.

Theca kaushik Timchasovo mіstit usі vidalіlі folders and files. If necessary, they are taken away in Koshiku folders and documents can be retrieved.

3. To delete the rest of the files, enter [File-Clean Cat].

Operations on files. In the process of work on the computer, the following operations are usually performed on files:

  • copying (copying the file to a different directory);
  • relocation (the file itself is relocated to another directory);
  • visible (the record about the file is visible from the directory);
  • rename (change the name of the file).

The Windows graphical interface allows you to perform operations on files for the help of the mouse for the help of the Drag & Drop method (drag and drop). There are also special programs for working with files, so called file managers: Norton Commander, Windows Commander, Windows Explorer and more.

In some cases, it is necessary to practice with the command line interface. Windows has moved the robot mode with an MS-DOS command line interface.

command line interface

1. Enter [MS-DOS Program Session]. Show up at the program MS-DOS session.

In response to the requested system, you can enter MS-DOS commands from the keyboard, zocrema:

  • commands to work with files (copy, del, rename and in.);
  • commands to work with directories (dir, mkdir, chdir and in.);
  • commands to work with disks (format, defrag and int.).

2. Learn dozens of MS-DOS commands, with which the skin command can have its own format and parameters, it is important to remember how to do it. To retrieve additional information on the command, it is necessary to enter the /? key after the command name.

For example, in order to complete the adjustment after the format command, you need to enter: C:\WINDOWS>format/?


Food for thought

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

Practical tasks

4.11. Make a copy of the files for the help of the command line interface and the file manager.

4.12. Find out about the volume of your computer's disks, as well as the amount of space occupied by it.

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

File(Vid English. file- folder) - the collection of any data is named, placed on the outer annex and saved, which is re-powered and processed as a single unit.

The file system is an integral part of the operating system, which is recognized as being responsible for ensuring the security of the hard-to-reach interface for the time of work with the data that is saved on the disk, that secure the storage of files and the number of files and processes.

The file system chooses the format instead of the method of physical storage of information, as it is accepted to group the files. A specific file system determines the size of file (directory) names, the maximum possible size for a file and its partition, and the set of attributes for a file. Deyakі file systems provide services, for example, demarcation of access or encryption of files.

The broad meaning of "file system" includes:

collection of all files on the disk,

a set of data structures that are selected for file traversal, such as, for example, file directories, file descriptors, tables allocated to free and occupied disk space,

a complex of system software tools that implement file management, functions: creation, reduction, reading, writing, naming, searching and other operations with files.

The file system itself is installed, where the file will be written to a physical device (for example, a hard drive).

From the point of view of the operating system (OS), the entire disk is a set of clusters (as a rule, 512 bytes and more). File system drivers organize clusters of files and directories (actually, they are files to clean up the list of files in that directory). These drivers are victorious, like the clusters of the ninth vikoristovuyutsya, like the right, like the recognized as wrong.

The main functions of any file system aimed at the accomplishment of upcoming tasks:

naming files;

software interface of robots with files for programs;

introspection of the logical model of the file system on the physical organization of the data collection;

organization of the stability of the file system before the failure of life, pardons of hardware and software;

There is one more task for those who are protected on a richly corrupted system: the protection of files in one corrupted recorder in the case of unauthorized access to another corrupted recorder, as well as the security of a safe operation with files, for example, when a file is opened by one of the corrupted records, for the same hours "only reading".

21.2.1 Inspecting the file system FAT

The file system is based on the table of file allocation ( File Allocation Table - FAT).

Data about the location of the file on the disk is saved from the system area of ​​the disk in special file allocation tables ( FAT-tables). On top of the hard disk, a matrix is ​​seen as a trivi- mal matrix, which mimics the number of surfaces, cylinders, and sectors.

The cylinder is the sum total of all paths, which lie on different surfaces and stand on a straight line in the direction of the wrapping axis.

The sector is the smallest physical unit for collecting data. Sector expansion for DOS adding 512 bytes. Other operating systems install sector commands.

Oskіlki rosemіr FAT- Tables of environments, then for disks, the expansion of which is moving 32 MB, it is impossible to ensure addressing to the skin-protected sector. At the link with the cim, the groups of sectors are mentally united into clusters (blocks).

Cluster - the smallest unit of data addressing. Cluster expansion, per sector expansion, not fixed and deposited in disk capacity.

Sectors that do not avenge data (files), not displayed in FAT. Prior to such sectors lie the investigative sectors, the tables of file allocation, that sector, and the root directory.

Shards of destruction FAT-Tables are made to be impossibly fastened by data, there are two examples, the identity of which is regularly controlled by the operating system.

When a file is written to disk, information about the new file is written to the root directory. Tsey distributed information about the type of files, their names, expansion, date of creation. Crimson, for a skin file in the root directory, this is the number of the cluster from which the file is being repaired. After this number, the system is transferred to a table, in which the addresses of the attacking cluster are recorded. And so far, the docks will not describe the expansion of the entire file on the disk. The record will end with the "stop" command, so that the file will end on which cluster.

Reading seems to be the same. The information about the file is read at a glance, then the system will go to the table and there, it will read the numbers of the clusters, so that the file is borrowed.

Cluster expansion, per sector expansion, not fixed and deposited in disk capacity. The OS file system that implements 16-bit fields in file allocation tables is called FAT 16. Won allows you to spread out FAT-Tables no more than 216 entries about the data saving unit and, obviously, for disks with a volume of 1 to 2 GB, the cluster's length becomes 32 KB (64 sectors). It’s not entirely rational to work in the open space, but if it’s a small file (even a small one), it pays off the entire cluster, which requires only one address record of the file allocation table. 3 disks larger than 2 GB file system FAT 16 vzagalі pratsyuvati can not.



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

Catalog FAT there is no single structure, and the files are recorded in the first identified free space on the disk. Besides, the file system FAT add only a few file attributes: “System”, “Attached”, “Only reading” and “Archive”.

For today's hard disks, the costs associated with the inefficiency of the file system, however, can become from 25% to 40% of the total disk capacity, depending on the average size of the files that are saved.

21.2.2 Inspecting the file system NTFS

File system NTFS (New Technology File System)) bula released at once Windows NT 3.5 in 1993 roci. Por_vnyano s FAT, NTFS values: efficiency, superiority and summation. The NTFS file system freezes in the operating system Windows NT/2000/XP/6/7.

Like and be-like another system, NTFS podіlyaє all korisne mіsce on the cluster. NTFS supports a variety of clusters - from 512 bytes to 64 KB, the current standard is a 4 KB cluster.

When installed NTFS, the disk is subdivided into three uneven parts: the first one is introduced into the MFT (Master File Table– global table of files), called MFT-Zone and borrows close to 12% of the total volume of the disc. MFT lie on the cob of the disk and borrow close to 1 KB, leather record MFT validate any file. For its own sake, a directory of all files that are on disk. Be some element of data NTFS looks like a file, navigate MFT.

MFT-The zone must always be empty - you need to work in order to make the most important service file ( MFT) without being fragmented with its growth.

Another part of the disk is a great space for saving files.

The free space of the disc, however, includes everything physically free space - the missing pieces MFT-Zoni Tudi tezh turn on. Wickbox mechanism MFT-zone like this: if the files can no longer be written to the greatest space, MFT-The zone just shortens (twice for current versions of the OS), making it a place for writing files. With a change in the month of the state MFT the zone will expand again.

First 16 files (metafiles) MFT- Zoni are a special caste. The stink of service information is being missed, the stench of the fixed camp is fixed and the stench is inaccessible to the operating system. Before the speech, first of tsikh 16 є himself MFT- File.

Malyunok 21.1

The third zone, with its own blackness, divided the disk. I have a copy of the first three records in the third zone. Tse zrobleno for nadіynostі, at times put the information in MFT– file, you can always update the information. All other files in MFT- Zones can be roztashovuvatisya enough.

Disk head directory NTFS– rooted – does not look like any other directories, except for a special message on a new metafile on the cob MFT. Vіn є spefičіchnym file, scho zberіgaє sent to other files and directories, creating a hierarchy of data on the disk. File to the directory of subdivisions into blocks, skin z to replace the name of the file, the basic attributes that are sent to the element MFT, which already gives new information about the element to the catalog.

The catalog is a binary tree, tobto. In the catalog, the information about the data on the disk is sorted out in such a way that, when asked about a file, the catalog was divided into two parts and it turned out that the shukane was in that part itself. Then the same operation is repeated in the other half. І so doti, doki will not find the required file.

At NTFS vikoristovuetsya ciphering data. In this way, if for some reason it happened to reinstall the system again, then encrypted files cannot be read without a second authorization.

NTFS- Vіdmovostіyka system, as a whole you can bring yourself to the correct camp for practically any real problems. Whether a modern file system is based on such a concept, like a transaction - a diy, which is completely and correctly, or not zdіysnyuєtsya vzagali. At NTFS just don’t buy promizhnyh (pardon chi incorrect) camps - diy or skoєno, or skasovano.

Renewal system NTFS guarantees the correctness of the file system, but nothing else.

The building of the OS to the “screening” of collapsible real equipment is already clearly manifested in one of the main subsystems of the OS file system. p align="justify"> The operating system virtualizes the amount of data that is stored on the original storage, in the look of the file - a simple unstructured sequence of bytes, which can be a symbolic name. For transparency, the data files are grouped into catalogs, yakі at their hearts they make groups - catalogs of the greater equal. Koristuvach can, for the help of the OS, check over files and directories like that, like a search for im'ya, a remote view, a view instead of an external attachment (for example, on a display), change that savings instead.

In order to reveal a large number of datasets, scattered in a vertical order on cylinders and on top of disks of various types, in front of everyone who knows well the well-known and ararchical structure of files in that directory, the operating system may fail without a face. The OS file system can change the symbolic names of files, with some pracstuvach or an application programmer, on the physical addresses of data on the disk, organizes simultaneous access to files, protects them from unauthorized access.

When vikonannі svoїkh funktsіy file system closely vzaimodiє z pіdsistemоm keruvannya zvnіshnіmi podstroyami, yak behind the filings of the file system zdіysnyuє transfer of data between disks and operational memory.

The subsystem for handling by the name of outbuildings is also called the input-output subsystem, which plays the role of the interface for all outbuildings connected to the computer. The spectrum of these outbuildings is already great. The nomenclature of accumulating devices on hard, hard and optical disks, printers, scanners, monitors, plotters, modems, wire adapters and more special attachments for introduction and display, such as, for example, analog-to-digital converters, there can be hundreds of models. These models can be directly modified by a set and sequence of commands, for the help of which it is possible to exchange information with the processor and computer memory, the firmware of the robot, the coding of data, the possibility of a combination of various details and others.

The program that manages a specific model of the city will build it and secure all its features, it’s called driver which I will build (from the English drive - keruvati, news). The driver can cover a single model, for example, a U-1496E modem from ZyXEL, or a group of attachments of a singing type, for example, be Hayes-crazy modems. For a koristuvach, it is important that the operating system included as many different drivers as possible, since it guarantees the ability to connect to the computer of a large number of external devices in various types. Due to the availability of the latest drivers, there is a lot of reasons for the success of the operating system on the market (for example, the availability of a lot of necessary drivers for the existing extensions was one of the reasons for the low popularity of OS / 2).



The creations of drivers of attachments are taken care of as retailers of a specific operating system, and facsimiles of companies that issue the appropriate devices. The operating system is responsible for maintaining a good interface between the drivers of that other part of the OS, so that the distributors from the companies-devices in the I/O device could supply drivers for this operating system with their devices at once.

Application programs can be interfacing with driver interfaces when developing their own programs, but it’s not too easy - such an interface sounds like low-level operations, wrapped in a large number of details.

Support of a high-level unified application programming interface to various extensions of the introduction and implementation is one of the most important tasks of the OS. Since the appearance of the UNIX operating system, such a unified interface for large operating systems will be improved with the concept of file access. This conception is based on the fact that the exchange with a well-known attachment looks like an exchange with a file, which may be im'ya and є unstructured sequence of bytes. Like a file can act like a real file on a disk, so is an alphanumeric terminal, attach to a friend or a network adapter. Here we are again maєmo on the right the power of the operating system to replace the real equipment with abstractions that are easy for the programmer.

OS management with files and attachments

The Input-Output Subsystem of a multiprogram OS, when exchanging data with external computer attachments, is guilty of violating a number of important tasks, of which the most important ones are:

Organization of the parallel work of the attachment to the introduction and production of the processor;

Uzgodzhennya shvidkost exchange that cache of data;

Podіl pristroїv and danih mizh processes;

Safeguarding a handy logical interface between attachments and another part of the system;

Support for a wide range of drivers from the possibility of simply including a new driver in the system;

Pіdtrimka kіlkoh file systems;

Support of synchronous and asynchronous operations of introduction-visitation.

One of the main tasks of the operating system is the task of maintaining the integrity of the data, which are saved on the disks. For which OS it is necessary to control the physical structure of data, which is taken care of by a handy for a logical model. Logical file system model materialize at a glance directory tree, which is displayed on the screen by such utilities as Norton Commander or Windows Explorer, by symbolic folder names of files, by commands for working with files. The basic element of this model is file, Yak і, yak і the file system in a flash, can be characterized as a logical, and physical structure.

File- the area of ​​the outer memory is named, so that data can be recorded and read from. Files are saved from memory, stored in the form of energy, sound, on magnetic disks. There are no rules without blame. One of these faults is the name of an electronic disk, if a structure is created in the operative memory that imitates the file system.

Main goals for the file:

Longed for that hopeful collection of information. Dovgorivalіst reach for rahunok vikoristannya pristroїv, scho not to lie in the vіd vіdlennja, and the temple naііynієєєєєєєєєєєєєєєєєє zahistu access to і ієєєєєєі і агінігієу program code os, in case of such failure of the equipment, in most cases, do not destroy, save the file information.

Compiled information. Files are safe in a natural and easy way to subdue information between addenda and coristuvachas for the clarity of the lucidity of a sensible person of a symbolic name and status of saving information and roztashuvannya file. Koristuvach is responsible to his mother to manually manage the files, including directories, to put files into groups, to search files for signs, to type commands for creating, modifying and accessing files. The file can be created with one short file, and then it can be changed to another short file, with which the author of the file or the administrator can assign access rights to another short file. These numbers are implemented in the OS by the file system.

File system(FS) - the whole part of the operating system, which includes:

- collection of all files on the disk;

A set of data structures, which are selected for keruvannya by files, such as, for example, file directories, file descriptors, tables of distribution of free and occupied space on the disk;

A set of system software tools that implement various operations on files, such as creating, editing, reading, writing, naming and searching files.

The file system allows programs to manage a set of simple operations to perform on any abstract object that represents a file. For all programmers, it is not necessary to deal with the details of data transfer data on disk, data buffering and other low-level problems of transferring data from a long-term extension. The functions of the file system are sorted out. The file system splits disk memory, supports file naming, displays file names for external addresses of calling memory, secures access to data, supports files, saves and downloads files.

In this way, the file system plays the role of an intermediate ball, which screens all the complexities of the physical organization of a long-term collection of data, and creates for the program a more simple logical model of this collection, as well as giving it the ability to type handy commands for manipulating files.

Task, rozv'yazuvani FS, to deposit according to the method of organization of the calculation process by zagal. The simplest type - ce FS in single-source and single-program OS, up to which to lie, for example, MS-DOS. The main functions of such a FS are aimed at the accomplishment of upcoming tasks:

Naming files;

Programming interface for programs;

introspection of the logical model of the file system on the physical organization of the data collection;

Stability of the file system before life failures, pardons of hardware and software features.

FS managers are folded into operational single-core multiprogram OS, even though they are recognized for the work of one core, and even give it the opportunity to run a few processes at once. One of the first operating systems of which was OS / 2. Before transferring more tasks, a new task for full access to the file with a number of processes is added. The file is a resource that is being distributed, which means that the file system is to blame for the whole complex of problems associated with such resources. Zokrema, the FS is responsible for transferring blocking to the file of that part, preventing races, turning off deaf kutivs, and making copies too thin.

There is one more task for the insurance companies on richly corrupted systems: protection of files in one creditor for unauthorized access of another creditor. More collapsible are the functions of the FS, which are used in the warehouse of the merezhnoi OS.

File systems support a sprinkling of functionally different file types, before which you can enter the name files, file directories, special files, named pipelines, which files and others are stored in memory.

Starter files, or just files, to remove information of a sufficient nature, how to enter coristuvach into them, or as a result of robotic system programs that coristuvach. Most of today's operating systems (for example, UNIX, Windows, OS/2) do not mix and control instead of the structure of the original file. The replacement of the original file is assigned by the program, as it works with it. For example, a text editor creates text files that consist of a series of symbols that are represented by any code. You can also have documents, see texts of the programs as well. Text files can be read on the screen and sent to the printer. Double files do not change character codes, often fold the internal structure, for example, change program code or archive file. All operating systems are responsible for recognizing only one type of files - their own files, which are selected.

Catalogs- a special type of files, in order to collect systemic additional information about the collection of files, grouped by coristuvachs for some informal sign (for example, files are combined into one group to cover documents of one agreement, or files to create one software package). For rich operating systems, the directory can include files of any type, other directories, with the help of which a tree-like structure is established, just a joke. Directories are set to match between file names and their characteristics, as they are selected by the file system for file traversal. Such characteristics include, zocrema, information (or an indication of a different structure, which should avenge data) about the type of the file and its expansion on the disk, access rights to the file and the date of its creation and modification. For all other ports, directories are viewed by the file system as primary files.

Special files- all fictitious files associated with I/O add-ons, which are used to unify the mechanism for accessing files to those connected add-ons. Special files allow you to change the input-view operation for additional powerful commands to write to a file or read to a file. The commands are processed in sequence by the file system programs, and then, at the next stage, they are converted by the operating system to the commands that are passed to the appropriate extensions.

Modern file systems support other types of files, such as symbolic links, naming pipelines that are stored in memory files.

Koristuvachs turn to files on symbolic names. However, the vibrancy of human memory is surrounded by a large number of names of objects, up to some kind of koristuvach can be written on them. Ієєєrarchіchna organіzatsіya wide range of names allows you to significantly expand the number between. To that end, the majority of file systems have a hierarchy structure, in such a way they are created for the account of the fact that the directory of the lower level can be included before the directory of the highest level (figure 2.16).

Baby 2.16. Hierarchy of file systems (a – single-level structure, b – tree-like structure, c – merged structure)

The graph that describes the hierarchy of catalogues, may be a tree or a fence. Directories approve the tree, so that a file is allowed to enter only up to one directory (Figure 2.16, b), and even if a file can be included in a number of directories (Figure 2.16, c). For example, in MS-DOS and Windows, directories have a tree-like structure, while UNIX has a merged one. The tree-like structure has a leather file as a sheet. The catalog of the most valuable river is called root directory, or roots (root).

With such an organization, it is enough for you to approximately show, to which group you can add that smaller file, so that you can look through the directories sequentially to know it. The Ієєєєрхічна a structure is transparent for rozrahovanoї on a rich coristuvachіv work: leather coristuvach with its files is localized in its catalog or subtree of directories, and at the same time all the files in the system are logically connected.

Let's call it a type of ієarkhіchnoї struktury є odnorivny organіzatsіya, if all files are included in one directory (figure 2.16, a).

Use file types to accept symbolic names. In the hierarchical organization of file systems, there are three types of file names: simple, warehouse, and visual.

Simple, short, symbolic name Identifies the file within the same directory. Forgive the names to give the files of the code and the program, in case of stench it is the fault of the OS exchange, both for the nomenclature of symbols, and for the length of the name. Until a recent hour, the distances between were narrower. So, in the popular FAT file system, most of the names were separated by the scheme 8.3 (8 characters - the correct name, 3 characters - the extension of the name), and in the s5 file system, which is supported by versions of the UNIX OS, just the symbolic name could not take more 14 characters. However, the coristuvachevi is more easily practiced with old names, shards of stench allow you to give names to files that are easy to forget, to speak clearly about those that are avenged in this file. For this reason, file systems, as well as improved options for file systems, which have already been used, as a rule, add more simple symbolic file names. For example, in NTFS and FAT32 file systems, which enter the warehouse of the Windows NT operating system, a file can contain up to 255 characters.

In ierarkhichnyh file systems, different files can have the same simple symbolic names for understanding what stinks lie in different directories. That's why the scheme "a lot of files - one simple im'ya" works here. For unambiguous identification of the file in such systems, it is called so outside the name.

Outside im'yaє in a lansy of simple symbolic names of all directories, through yaki pass the path from the root to the given file. In such a rank, we will put it together, for some reason, we will simply have the names of the Kremlin one and the same accepted in the OS by a retailer. Often, as a vicarious distributor, it is a direct or a return slash, with which it is customary not to specify the name of the root catalog. On little 2.16 b, two files can be simply named main.exe, and the names /depart/main.exe and /user/anna/main.exe are different.

A tree-like file system between a file and a similar name has a mutually unambiguous statement "one file - one same name". For file systems that have a merged structure, a file can be included up to dekіlkoh directories, also, mothers of other names; here it is fair to say "one file - a lot of other names". In both views, the file is uniquely identified by its names.

The file can be identified as well as known names . Vіdnosne im'ya the file is identified through the concept of "stream directory". For a skin koristuvach at the moment, one of the catalogs in the file system can be specified, moreover, this directory is selected by the koristuvach himself for the OS. The file system fixes the name of the streaming directory, so that we can tweak it as an addendum to the external names to create a new file name. At different variant names of koristuvach identifikuє file lanzug іnames of catalogues, through yakі pass the route from the streaming catalog to the file. For example, if the current directory is the /user directory, then the file /user/anna/main.exe looks like this: anna/main.exe.

For some operating systems, it is allowed to assign a few simple names to one file, which can be interpreted as pseudonyms. In this way, just like in a system with a mesh structure, the pattern “one file - a lot of new names” is established, so that a skin simple file name is recognized by one outside name.

And if outside the name it uniquely identifies the file, the operating system is easier to deal with the file, as between files with those names, the identity is mutually unambiguous. Because of this method, you give the file a unique name, so it's fair to say "one file - one unique name". It is uniquely named after one or the other symbolic names, which are assigned to the file by the coders or programs. The unique name is a numeric identifier and is recognized only for the operating system. The example of such a unique file name is the number of the index descriptor in the UNIX system.

The concept of "file" includes not only the data of the name that is saved by it, but its attributes. Attributes- This is the information that describes the authority of the file. Apply possible attributes to the file:

File type (special file, directory, special file or something);

vlasnik file;

File author;

File access password;

Information about the permissions of the operation to access the file;

Hours of creation, the rest of the access that the rest of the change;

Streaming file expansion;

Maximum file size;

Sign "Tіlki for reading";

Sign "attached file";

Sign "system file";

Sign "archive file";

Sign "dviykovy / symbolic";

Sign "timchasov" (visible after the completion of the process);

blocking sign;

Dovzhina record at the file;

Vkaz_vnik on the key field of the record;

Dovezhina key.

The set of attributes in a file depends on the specifics of the file system: file systems of different types may have different sets of attributes. For example, in file systems that support unstructured files, there is no need to select the three remaining attributes of the hovered list that are related to the structuring of the file. In a single-hosted OS, the set of attributes will contain the daily characteristics that are stored for the host and defender, such as the master of the file, the creator of the file, the password for accessing the file, and information about permissions to access the file.

Koristuvach can take away access to attributes, vikoristovuyuchi zadani, data for this file system. Sound is allowed to read the meaning of any attributes, and change only deeds. For example, you can change the access rights to the file (be aware that you may need to update it), or change the creation date, or you are not allowed to stream the file.

Attribute values ​​in files can be randomly reduced in directories, as it is broken in MS-DOS file systems (Figure 2.17, a). The little one shows the structure of the record in the catalog, which can be simply symbolized by the name and attributes of the file. Here, the letters indicate the signs of the file: R - only for reading, A - archiving, H - attaching, S - system.

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

The second option is the placement of attributes in special tables, as in catalogs there are more than enough numbers for tables. Such implementations, for example, in the UFS file system of UNIX OS. In this file system, the directory structure is rather simple. The record about the skin file should be written in a short symbolic name of the file and the index on the file index descriptor, so the table is called in the ufs table, in the value of the attribute in the file (Fig. 2.17, b).

In that case, the directories will provide links between file names and other files. However, pidhіd, if the file is given a password with some attributes, robbing the system with a gnashkіsh. For example, a file can easily be included in multiple catalogs. Entries about the same file in different directories can be replaced by different simple names, but the same number of the index descriptor will be indicated in the field sent.

Filed koristuvach about the file system yak about ієarkhіchno organіzovanu ієrkhіchno іnformаtsiynykh іnformatsiynykh ob'єktіv іn mає є little spіlnogo z sberіgannya zberіgannya files on disk. A file that can form an image of a whole set of bytes, which is uninterrupted, really often scatter "small" on the whole disk, moreover, it does not correspond to the logical structure of the file, for example, a logical record can be scattered in non-summary sectors of the disk. Logically combined files from one directory are not responsible for being placed on the disk. The principles of distribution of files, directories and system information on a real device are described by the physical organization of the file system. Obviously, different file systems can vary in physical organization.

The main type of add-on, which is used in modern accounting systems for saving files and disk storage. These extensions are intended for reading and recording data on hard and soft magnetic disks. The hard disk is folded on one or more glassy metal plates, the skin is covered on one or two sides with magnetic material. In this order, the disk at the vipadku is folded from a package of plates (Figure 2.18).

On the skin side of the skin plate there are thin concentric rings - paths(traks), from whom data is collected. The number of records to be stored according to the type of disk. The numbering of the tracks starts from 0 in the outer edge of the center of the disc. If the disk is wrapped, the element, which is called a head, reads double data from the magnetic track or writes it to the magnetic track.

Baby 2.18. Scheme to attach a hard drive

The head can be positioned over a given track. The heads move over the surface of the disk in discrete steps; Recording on a disk is caused by the soundness of the head of the head and the magnetic power of the track. In some discs, one head moves along the skin surface, and in others, along the head to the skin track. In the first place, for the search for information, the head is to be moved by the radius of the disk. Sound all the heads fixed on a single mechanism, which move, and collapse synchronously. That is, if the head is fixed on a given track on one surface, the head lines are fixed on the tracks with the same numbers. In quiet depressions, if there is a head on the skin, it is not necessary to move the heads from one path to another, for the cost of which one hour is saved, which is spent on the search for data.

The sequence of tracks of the same radius on all surfaces of all plates of the package is called cylinder(cylinder). The skin path is broken into fragments, as they are called sectors(Sectors), or blocks (blocks), so that all tracks can be equal to the number of sectors, in which you can write the maximum number of bytes. The sector of fixings for a particular system is expanding, which is expressed by a step of two. Most sector expansion stores 512 bytes. Vrahovyuchi, scho paths of different radius may have the same number of sectors, the width of the record becomes greater, the closer the path to the center.

Sector- The name of the unit is the exchange of data, which is addressed to the disk extension with operational memory. In order for the controller to know the required sector on the disk, it is necessary to set all the storage addresses of the sector: cylinder number, surface number, sector number. So, as an application program in general, it is not a sector that is consumed, but a number of bytes, not an obligatory multiple of the sector size, a typical reading includes reading decal sectors, in order to cover the necessary information, and one or two sectors, figure 2.19) .

Baby 2.19. Reading overdue data for an hour of exchange with a disk

p align="justify"> The operating system when working with a disk is victorious, as a rule, I am in control of one disk space, called cluster(cluster). When a file is created, the spaces on the disk are seen as clusters. For example, if the file size is 2560 bytes, and the size of the cluster in the file system is 1024 bytes, then the file will be seen on disk 3 clusters.

The tracks of that sector are created as a result of the physical or low-level formatting of the disk, which is forwarded to the disk. For identification between blocks, the disk is recorded with identification information. A low-format disk does not depend on the type of operating system, like a vicarious disk.

The layout of the disk for a specific type of file system is fixed by the procedures of high-level and logical formatting.

With high-speed formatting, the cluster size is displayed and information is written to the disk that is necessary for the operation of the file system, including information about available and non-visible spaces, about inter-regions, introduced files and directories, and information about other areas. In addition, an operating system starter is written to the disk - a small program that will start the process of initializing the operating system after the power is turned on or the computer is restarted.

Before formatting the disk, the file system can be split into a new file system. Rozdil- there is no interruption in the part of the physical disk, as the operating system represents the core as a logical attachment (they also call the logical disk and the logical partition). The logical attachment functions like this, yakbi tse buv okremy physical disk. Itself with logical outbuildings pratsyuє koristuvach, going up to them for symbolic names, vikoristovuyuchi, for example, the meanings of A, B, C, SYS just. Operational systems of different types of vicarious are the only one for them to be informed about the distribution, but they are created on the basis of logical additions, specific to the skin type of OS. As a file system, with which one operating system is used, one can interpret an OS of a different type, it is logically impossible to know which operating systems of a different type. Only one file system can be created on a skin logical device.