View the hierarchical structure of the disk with. How to open a folder, view a tree structure
Arkhangelsk State University
Kotlas branch
full-time department
Faculty: technical
Specialty: PGS
Course work
Discipline: computer science
Topic: Disk File Structure
Performed
1st year student
Zhubreva Olga
Alexandrovna
Checked:
Introduction. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
§ 1 The concept of a file system. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
§ 2 The MS-DOS file system. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
§ 3 File system Windows 95. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
§ 4 Windows NT file system. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Conclusion. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Introduction.
The methodological manual discloses the essence of the concept of "file system",
which is one of the most important concepts in the course “Software
computer software ”, as well as the structure of file systems of such
operating systems like MS-DOS, Windows 95, Windows NT.
The attempt to achieve this goal determines the structure of the present
manuals: the topic material is divided into 4 main parts (parts are presented in
the form of paragraphs), each of the parts is also broken down into
smaller detailed parts.
§ 1 The concept of a file system.
1.1. Definition of the file system.
File (in English File) - folder, binder.
A file is a named area of \u200b\u200bmemory on some physical
media designed to store information.
The set of operating system tools that provide access to
information on external media is called a file management system or
file system.
The file system is a functional part of the operating system.
a system that is responsible for the exchange of data with external storage
devices.
ORGANIZATION OF FILE ACCESS
Directory structure
We hope that you have a good idea of \u200b\u200borganizing book storage in
library and, accordingly, the procedure for finding the desired book by its code from
directory. Transfer your understanding of this to the way you store files
on the disk and organizing access to it.
Access - the procedure for establishing communication with the memory and the file located in it
for writing and reading data.
The logical drive name preceding the file name in the specification,
indicates the logical drive on which to search for the file. On the same disk
organized a directory that stores the full names of the files, as well as their
characteristics: date and time of creation;
size (in bytes); special attributes. By analogy with the library system
directory organization the fully qualified filename registered in the directory,
will serve as a cipher by which the operating system finds
the location of the file on disk.
Directory - a directory of files with an indication of their location on the disk.
There are two states of the directory - current (active) and passive. MS
DOS remembers the current directory on each logical drive.
Current (active) directory - the directory in which the user is working
produced at the current machine time.
Passive directory - a directory with which it is not currently available
The MS DOS operating system also adopts an ar chical structure
(Figure 9.1) directory organization. Each disc always contains
single main (root) directory. He is at level 0
hierarchical structure and denoted by the "\\" symbol. Root directory
created when formatting (initializing, partitioning) the disk, has
limited size and cannot be removed using DOS tools. The main
directory can include other directories and files that are created by commands
operating system and can be removed by appropriate commands.
Figure: 9.1. The hierarchical structure of the directory organization
The parent directory is a directory that has subdirectories. Subdirectory
A directory that is part of another directory.
Thus, any directory containing lower-level directories can
be, on the one hand, parental to them, and on the other hand,
subordinate to the top-level directory. As a rule, if it is
does not cause confusion, use the term "directory", implying or
subdirectory, or parent directory depending on the context.
Disk directories are organized as system files... The only thing
the exception is the root directory, for which a fixed space is allocated
disk. The directories can be accessed like a regular file.
Note. The directory structure can contain directories that are not
the names of subdirectories are the same as the rules for naming files (see.
subsection 9.1). To distinguish formally from files, usually subdirectories
assign only names, although you can add a type using the same rules as
and for files.
Access to the contents of the file is organized from the main directory, through
chain of subordinate directories (subdirectories) of the i-th level. In the catalog
any level can store both file and directory records
the lower level. are called empty.
In fig. 9.2 shows the simplest directory structure, where in the main
directory 0
level stores only records of files, directories of the lower level
does not exist
In fig. 9.3 shows the hierarchical structure of the directory, where in the directories
at any level, records of files and directories of the lower level are kept. Moreover
the transition to the lower level directory can only be organized
sequentially through the subordinate directories.
Figure: 9.2. Simplest directory structure with no directories
lower level
Figure: 93, .. Typical structure of a directory consisting of directories of the lower
level: when designating the lower level directory, three numbers are used:
the first digit indicates the level number; the second is the serial number of this
directory on this level, the third indicates at what level
his name is registered. Each directory is named CAT with indices.
For example, KAT342 is the name of the third level directory, which is registered in
catalog of the second level at number 4
You cannot go from the main directory directly to a directory, for example, level 5.
It is imperative to go through all previous top-level directories.
The principle of organizing access to a file through a directory described above
is the basis of the file system.
The file system is the part of the operating system that controls the layout and
access to files and directories on disk.
Closely related to the concept of a file system is the concept of a disk file structure,
which means how they are located on disk: the main directory,
subdirectories, files, operating system, as well as what are allocated for them
volumes of sectors, clusters, tracks.
Rules for the formation of the file structure of the disk. When forming a file
disk structure MS DOS follows a number of rules:
A file or directory can be registered with the same name in
different directories, but in the same directory only once;
Order of filenames and subdirectories in the parent directory
arbitrary;
The file can be split into several parts, for which the
areas of disk space of the same volume on different tracks and
sectors.
Path and invitation
Fig. 9.1 - 9.3 you can see that the file is accessed through the directory
thanks to the name of this file registered in it. If the directory has
hierarchical structure, the operating system organizes access to the file
depending on the position of the subdirectory in which the name is registered
the file you are looking for.
The file can be accessed as follows:
If the file name is registered in the current directory, then sufficient for
to access the file, specify only its name;
If the file name is registered in a passive directory, then being in
current directory, you must specify the path, i.e. chain of subordinates
directories through which to organize access to the file.
Path - a chain of subordinate directories that must be traversed
hierarchical structure to the directory where the search file is registered. When
when specifying a path, directory names are written in order and separated
from each other with \\.
User interaction with the operating system is carried out with
using the command line indicated on the display screen. At the beginning
the command line always has a prompt that ends with
\u003e. The prompt may display: the name of the current disc, the name of the current
directory, current time and date, path, separator characters.
Operating system prompt - indication on the display screen of information,
indicating the readiness of the operating system to enter user commands.
Example 9.8.
The current drive is floppy drive A,
the current directory is the main directory, as indicated by the \\.
C: \\ CAT1 \\ CAT2
The current disk is hDD C. Current directory -
second level catalog KAT2, included in the first level catalog
CAT1, which, in turn, is registered in the main
directory.
There are three options for organizing the file access path, depending on
place of its registration:
The file is in the current directory (no path). When organizing
to access a file, just specify its full name;
The file is located in the passive directory of one of the lower levels,
subordinate to the current directory. When organizing access to a file
you must specify a path that lists all directory names
lower level lying on this path (including the directory in which
the file is registered);
the file is in a passive directory on a different branch relative to
the location of the current directory in the hierarchical structure. When
to organize access to the file, you must specify the path starting with
main directory, i.e. with a \\. This is due to the fact that in
hierarchical structure, movement is possible only vertically from above
Horizontal transitions from catalog to catalog are not allowed.
the examples below are illustrated possible options paths.
Example 9.9.
Condition: the file F1.TXT is registered in the current directory of the 1st level K1
hard drive C. Therefore, the screen displays the prompt C: \\ K1
Explanation: in this case, the path is missing and it is sufficient to access the file
specify only its full name F1.TXT
Example 9.10.
Condition: file F1.TXT is registered in the 2nd level K2 directory of the hard
drive C. Current directory - K1. Therefore, the screen displays the prompt
Explanation: in this case, the path will start from the directory
K1 down through the subordinate K2 directory. Therefore, before
the full file name indicates the path from the current K2 directory
Having become familiar with the concept of a path, let us return to the one introduced in subsection. 9.1
the concept of file specification. There is an abbreviated file specification and
full file specification, in the formation of which the path participates. In fig.
9.4 shows variants of the rule for the formation of the file specification.
Figure: 9.4. BOM formats (optional parameter specified)
Example 9.12. Abbreviated form of file specification C: \\ KIT.BAS
The file with the program in BASIC KIT.BAS is located in the main
hard drive directory.
Complete file specification form
C: \\ KAT1 \\ KAT2 \\ VOOK1.THT
The text file VOOK1.TXT is registered in the directory of the second
level CAT2 of hard disk C.
Directory Entry Structure
Now you will be familiar with the structure of the records stored in the directory.
with information about the files and subdirectories of the lower level.
The file entry in the directory contains the name and type of the file, the size of the file in
bytes, creation date, creation time and a number of other parameters required
operating system to organize access.
The subdirectory entry of the lower level in the parent directory contains it
name, attribute, date and time of creation.
Let's consider the possible options for the contents of the directory. 1st option. In the catalog
only file records are stored (Figure 9.5). Before file records
a message about the directory name is displayed. In this case, this is the main
directory of floppy disk A. At the end of the directory contents, a message is displayed about
the number of files stored on the disk and the free disk space in
bytes. For example, the above directory displays the message:
4 file (s) 359560 bytes free
The number of files on the disk. Volume of free
disk space, byte 2nd option.
The directory contains only entries about the directories of the lower level (Fig. 9.6).
Figure: 9.7. The main directory contains files and subdirectories
At the end of the directory, as in the previous case, you will see a similar
the record of the amount of free disk space discussed above.
Option 3: The directory stores both file and directory entries
the lower level (fig. 9.7). This structure shows that in this directory
there are 3 files and 2 lower-level directories BASIC and LEXICON. On disk
free space 2.6575 MB.
The above three directory presentation options reflect the content
main directory. Directory structure starting from 1st level and below,
is identical and differs from the main one only in that before the file records
and the lower-level directories accommodate two entries with ellipsis (Figure 9.8).
The dots you see at the beginning mean that content has been called to the screen
subdirectory (1st level directory) KNIGA, which contains two text
file SVET and TON.
| Directory of C: \\ KNIGA | | |
| |11-12-90 |09:40 |
| |10-10-91 |08:30 |
| svet txt 55700 | 04-04-90 | 10:05 |
| ton txt 60300 | 03-05-91 | 11: 20 |
| 2 files 912348 bytes free | | |
| Fig. 9.8. The structure of entries in the subdirectory |
1.2. FAT file system.
Windows operating systems are used, developed for
DOS is a FAT file system, in which for each DOS partition and volume there is a
boot sector, and each DOS partition contains two copies of the table
file allocation table (FAT).
FAT is a matrix that sets the ratio
between files and folders of the partition and their physical location on the hard
In front of each hard disk partition, two
copies of FAT. Like boot sectors, FAT is located outside
the area of \u200b\u200bthe disk visible to the file system.
Files do not necessarily take up space when written to disk,
equivalent to their size. Usually files are split into clusters
a certain size that can be scattered throughout the section.
As a result, the FAT table is not a list of files and their
locations, and a list of section clusters and their contents, and at the end
FAT table entries are 12-, 16- and 32-bit
hexadecimal numbers, the size of which is determined by the FDISK program, and
the value is directly generated by the FORMAT program.
All floppy disks as well as hard disks up to 16MB
use 12-bit elements in FAT. Hard and removable drives with
size from 16 MB and more, usually 16-bit elements are used.
The FAT file system was used in all versions of MS-DOS and in the first
two releases of OS / 2 (versions 1.0 and 1.1). Each logical volume had
own FAT, which served two functions: contained information
distributions for each file in the volume in the form of a list of module links
distribution (clusters) and indicated which distribution modules are free.
When the FAT was invented, it was an excellent solution for
disk space management, mainly because floppy disks,
on which it was used were rarely more than a few Mb in size.
FAT was small enough to be in memory all the time,
allowed to provide very fast random access to any part
any file.
When FAT was applied to hard drives, it got too large
for memory resident and degraded system performance.
In addition, since information regarding free disk space
space was distributed "across" a large number of FAT sectors,
it was impractical in allocating file space, and
file fragmentation has proven to be a performance barrier.
In addition, the use of relatively large clusters on hard
disks led to a large number of unused areas, since in
on average, for each file, half of the cluster was wasted.
For several years, Microsoft and IBM have been trying to extend
life of the FAT file system due to the removal of restrictions on volume sizes,
improving allocation strategies, caching path names, and relocating
tables and buffers to extended memory. But they can only be regarded
as a temporary measure because the filesystem just didn't fit
large random access devices.
§ 2 The file system of the MS-DOS operating system.
One of the concepts of the MS DOS file system is a logical disk.
Logical drives:
DOS, each logical disk is a separate magnetic disk. Every logical
the disk has its own unique name. As a logical drive name
english letters from A to Z (inclusive) are used.
The number of logical disks is therefore no more than 26.
The letters A and B are reserved strictly for the floppy disks available in the IBM PC (
Starting with the letter C, logical disks (partitions) HDD (
winchester).
The figures show an image of a logical disk.
If this IBM PC has only one FDD, the letter B is skipped
Only logical drives A and C can be system drives. File
logical disk structure:
To access information on disk (located in a file), you need
know the physical address of the first sector, (Nsurface + Ntracks + Nsectors),
the total number of clusters occupied by this file, the address of the next
cluster if the file size is larger than the size of one cluster, etc. All
it is very vague, difficult and unnecessary.
MS DOS relieves the user of such work and does it itself. For
providing access to files - the MS DOS file system organizes and
maintains a specific file structure on a logical disk.
File structure elements:
Start sector (boot sector, Boot sector),
Data area (remaining free disk space)
These elements are created by special programs (in the MS DOS environment) in the process
disk initialization.
Start sector (boot sector, Boot sector):
Here is the information that MS DOS needs to work with the disk:
OS identifier (if the disk is system),
Disk sector size,
Number of sectors in a cluster,
The number of spare sectors at the beginning of the disk,
Number of FAT copies on a disk (standard - two),
The number of items in the catalog,
Number of sectors on disk
Disc format type,
Number of sectors in FAT,
Number of sectors per track,
Number of surfaces,
OS boot block,
FAT is located behind the starting sector.
FAT (File Allocation Table):
The disk data area (see above) is represented in MS DOS as a
a sequence of numbered clusters.
FAT is an array of elements addressing clusters of a disk's data area.
Each cluster of the data area corresponds to one FAT element.
FAT elements serve as a chain of links to file clusters in the area
FAT is an extremely important element of the File Structure. Violations in FAT can
lead to complete or partial loss of information on the entire logical disk.
That is why two copies of the FAT are stored on the disk. There are special programs,
which monitor the state of FAT and correct violations.
Root directory:
This is a specific area of \u200b\u200bthe disk created during the initialization process.
(formatting) a disk containing information about files and directories,
stored on disk.
The root directory always exists on a formatted disk. On the
there is always only one root directory per disk. Root size
directory for a given disk - the value is fixed, so the maximum
the number of files and other (child) directories "linked" to it
(Subdirectories) - strictly defined.
So, summarizing all of the above, we can conclude MS-DOS - 16-
a bit operating system running in real processor mode.
§ 4 The file system of the Windows 95 operating system.
4.1. Prehistory of FAT 32 creation.
In 1987, a crisis arose in the field of personal computers.
The capabilities of the FAT file system, developed by Microsoft in ten
years before for the Standalone Disk Basic interpreter and later
adapted for the DOS operating system have been exhausted. FAT
intended for hard drives with a capacity not exceeding 32 MB, and new hard drives
larger capacity turned out to be completely useless for PC users.
Some ISVs offered their own solutions
this problem, however, only with the advent of DOS 4.0 this crisis was overcome -
for a while.
Significant changes to the file system structure in DOS 4.0
allowed the operating system to work with disks up to 128 MB; from
subsequent introduction of minor additions, this limit was raised to
2 GB. At that time, it seemed that this amount of memory exceeds any
imaginable needs. However, if the history of personal computers is something
and taught exactly that capacity, "exceeding any imaginable
needs "very quickly becomes" almost insufficient for serious
work ". Indeed, there are currently commercially available hard drives
capacity, as a rule, 2.5 GB and above, and once very high and
the 2 GB ceiling that freed us from the restrictions turned into another
an obstacle to be overcome.
4.2. FAT description 32.
Microsoft has developed a new extension for Windows 95 systems
fAT systems - FAT32, without any loud statements provided for in
oEM Service Pack 2.
FAT32 is only installed on new PCs, don't count on
get it when going to new version Windows 95 though, it claims
Microsoft, this extension will become part of the core package for
windows upgrades
4.2.1. Disk areas
This file system provides a number of special areas on
disk allocated to organize disk space during
formatting - Boot Head Record, Disk Partition Table, Write
downloads, file allocation table (from which the FAT system got its
name) and root directory.
On the physical level disk space is split into 512-bytes
areas called sectors. FAT system allocates space for files
blocks that consist of an integer number of sectors and are called clusters.
The number of sectors in a cluster must be a multiple of a power of two. At Microsoft
refer to these clusters as allocation units, and in
the SCANDISK report indicates their size, for example, "16 384 bytes in each
memory allocation unit ".
4.2.2. FAT chain
FAT is a database that links clusters of disk
space with files. This database provides for each cluster
only one item. The first two elements contain information about the
fAT system. The third and subsequent elements are matched
clusters of disk space, starting with the first cluster allocated
for files. FAT elements can contain multiple special values,
indicating that
The cluster is free, i.e. not used by any file;
The cluster contains one or more sectors with physical defects and
should not be used;
This cluster is the last cluster in the file.
For any used by the file but not the last cluster item
FAT contains the number of the next cluster occupied by the file.
Each directory - independently root or subdirectory - also
is a database. In the DOS directory for each file
there is one master record (In Windows 95, for long names
files added additional records). Unlike FAT, where each element
consists of a single field, entries for a file in a directory consist of
multiple fields. Some fields - name, extension, size, date and time -
can be displayed by the DIR command. But the FAT system provides
the field that is not displayed with the DIR command is the field with the number of the first
cluster for the file.
When a program sends a request to the operating system,
the requirement to provide it with the contents of some file is viewed by the OS
a directory entry for it to find the first cluster of that file. Then she
accesses the FAT entry for the given cluster to find the next one
cluster in a chain. Repeating this process until it finds the last
file cluster, the OS determines exactly which clusters belong to a given
file and in what order. In this way, the system can provide
the program any part of the file it requests. This way of organizing
the file is called the FAT chain.
In the FAT system, files are always allocated an integer number of clusters. 1.2-
GB hard drive with 32 KB clusters in the directory can be specified,
that the size of the text file containing the words "hello, world" is
only 12 bytes, but in fact this file occupies 32 KB of disk
space. The unused portion of the cluster is called lost space
(slack). In small files, almost the entire cluster can be lost
place, and on average, losses are half the size of the cluster.
On an 850MB HDD with 16KB clusters at an average size
files of about 50 Kbytes, about 16% of the disk space allocated for files
space will be wasted for unused but allocated files
One way to free up disk space is with
disk compression programs such as DriveSpace, which highlights "lost
places "for use by other files.
4.2.3. Other changes in FAT32
To ensure the ability to work with an increased number of clusters, in
directory entry for each file, 4 bytes should be allocated for the initial
file cluster (instead of 2 bytes in FAT16). Traditionally, each entry in
directory consists of 32 bytes (Fig. 1). In the middle of this record, 10 bytes are not
used (bytes 12 through 21) that Microsoft has reserved for
their own needs in the future. Two of them are now designated as
additional bytes needed to indicate the initial cluster in the system
The operating system has always provided for the presence of two
instances of FAT, but only one of them was used. With the transition to FAT32
the operating system can run on any of these copies. Another
the change is that the root directory, previously having a fixed
size and strictly defined disk space, now you can freely
grow as needed, like a subdirectory. No longer exists
restrictions on the number of entries in the root directory. This is especially important
since there are multiple entries for each long filename
directory.
A combination of a roaming root directory and capability
using both copies of FAT is a good prerequisite for smooth
dynamically resizing disk partitions, for example, shrinking a partition
in order to free up space for another operating system. This new
approach is less dangerous than used in third-party programs
to change disk partitions when working with FAT16.
From all of the above, we can conclude:
MS-DOS was a pure 16-bit operating system and ran in
real processor mode. IN windows versions 3.1 part of the code was 16-
bit, and some are 32-bit. Windows 3.0 supported real mode
processor operation, during the development of version 3.1 it was decided to abandon it
support.
Windows 95 is a 32-bit operating system that
bit code for compatibility with MS-DOS mode. Windows 95 32-bit
bit code.
§ 5 File system of the Windows NT operating system.
5.1. Brief description of the Windows NT operating system.
At the moment, the global computer industry is developing very
the performance of the systems increases, and therefore
the possibilities of processing large amounts of data are increasing.
Operating systems of the MS-DOS class can no longer cope with such
data flow and cannot fully use the resources of modern
computers. Therefore, recently there has been a transition to more powerful and
the most advanced operating systems of the UNIX class, an example of which and
is Windows NT, released by Microsoft Corporation
When a user first sees the Microsoft operating system
Windows NT, he is struck by a clear external resemblance to
favorite interface of Windows 3. +. However, this is a visible similarity
is only a minor part of Windows NT.
Windows NT is a 32-bit operating system with
priority multitasking. As fundamental components
the operating system includes security and
developed network service.
Windows NT also provides compatibility with many others
operating systems, file systems, and networks.
As shown in the following figure, Windows NT is
a modular (more advanced than monolithic) operating system that
consists of separate interconnected relatively simple modules.
The main Windows NT modules are (listed in the order
following from the lower level of the architecture to the upper): level
hardware abstraction HAL (Hardware Abstraction Layer), kernel (Kernel),
executive system (Executive), protected subsystems (protected
subsystems and environment subsystems.
Windows NT modular structure
5.2. Windows NT file system.
When Windows NT first came out, it provided
support for three file systems. This is a file allocation table (FAT),
providing compatibility with MS-DOS, the file system of increased
performance (HPFS) for LAN Manager compatibility, and
a new file system called the New Technologies File System
NTFS had a number of advantages over those used on
that moment for most file servers is file systems.
To ensure data integrity, NTFS has a transaction log.
This approach does not exclude the possibility of loss of information, however,
greatly increases the likelihood that access to the file system
will be possible even if the integrity of the system is violated
server. This becomes possible by using the transaction log to
tracking uncompleted attempts to write to disk on subsequent boot
Windows NT. The transaction log is also used to check the disk for
errors instead of checking each file, if used
file allocation tables.
One of the main advantages of NTFS is security. NTFS
provides the ability to make Access Control records
Entries, ACE) to the Access Control List (ACL). ACE
contains the identification name of a group or user and an access token,
which can be used to restrict access to a specific
directory or file. This access can be readable,
writing, deleting, executing and even owning files.
On the other hand, an ACL is a container containing one
or more ACEs. This allows you to restrict the access of individual
users or user groups to specific directories or files in
In addition, NTFS supports working with long names that have
length up to 255 characters and containing uppercase and lowercase letters in any
sequence. One of the main characteristics of NTFS is
automatic creation of equivalent names, compatible with MS-DOS.
Also NTFS has a compression feature, first introduced in the NT version
3.51. It provides the ability to compress any file, directory or disk
NTFS. Unlike MS-DOS compression programs that create a virtual disk,
having the form hidden file and compressing all the data on that disk,
Windows NT uses an extra layer of file subsystem for compression
and unzipping the required files without creating a virtual disk. it
turns out to be useful when compressing either a certain part of the disk (for example,
user directory), or files of a certain type
(for example, graphic files). The only drawback of NTFS compression
is low, in comparison with the MS-DOS compression schemes, the level
compression. But NTFS is more reliable and
productivity.
So, from all of the above, we can conclude:
To be compatible with various operating systems, Windows
NT contains the FAT 32 file system. In addition, Windows NT contains its own
own NTFS file system, which is not FAT 16 compatible.
the file system has several advantages over FAT, and
is characterized by higher reliability and performance.
Conclusion.
MS-DOS - 16-bit operating system, runs in real
processor mode. In Windows 3.1, some of the code is 16-bit and some
32-bit. Windows 3.0 supported real processor mode,
when developing version 3.1, it was decided to drop its support.
Windows 95 is a 32-bit operating system that
works only in protected mode of the processor. Kernel including control
memory and process dispatch, contains only 32-bit code. it
reduces costs and speeds up work. Only some modules have 16-
bit code for compatibility with MS-DOS mode. Windows 95 32-bit
code is used wherever possible to ensure
increased reliability and fault tolerance of the system. In addition, for
compatibility with legacy applications and drivers is used and 16-
bit code.
Windows NT was not a further development earlier
existing products. Its architecture was created from scratch taking into account
requirements for a modern operating system. Seeking
ensure the compatibility of the new operating system,
windows NT developers have kept the familiar Windows interface and implemented
support for existing file systems (such as FAT) and various
applications (written for MS - Dos, Windows 3.x). Developers also
included in Windows NT tools for working with various network
means.
Reliability and robustness
provide architectural features that protect application
programs from damage to each other and the operating system. Windows NT
uses fault-tolerant structured exception handling on
all architectural levels, which includes the recoverable file
nTFS system and provides protection with the embedded system
security and improved memory management techniques.
You can double-click on the folder icon, after which Explorer will start and show you the contents of the selected folder (see Fig. 21.1).
When you double-click a file icon, the program that created the file starts and displays its contents. Although, in fact, it may not be the same program that created the file. For example, graphic files can be opened with a dedicated viewer rather than the graphic editing program that created them.
When you open a program file, the program starts.
After opening a folder, you will see its contents in the window of this folder. You can configure Windows so that each folder will open in its own window. Here's how to do it.
1. In the folder window, select Tools \u003d\u003e Folder Options.
The Folder Options dialog box appears.
2. On the General tab, select Open each folder in a separate window.
3. Click on OK.
Remember to close all folder windows when you're done.
Viewing the tree structure
The hardest part about working with folders and files is organizing them into what computer scientists call a tree structure. The tree structure is clearly visible on the left side of the Explorer window. This area of \u200b\u200bthe window is called Folders (see Figure 21.1). If you do not see this list, click on the Folders button in the toolbar. Alternatively, select View ^ Explorer Bar ^ Folders from the menu.
Using the mouse, you can quickly find any folder in the tree structure, if, of course, you know where to look for it. After clicking on a folder, its contents are displayed on the right side of the window.
By clicking on the "+" (plus) sign opposite the corresponding folder, you can see all its subfolders, i.e. branch of a tree structure.
By clicking on the “-” (minus) sign opposite the folder, you will close the corresponding branch of the tree structure.
How to hide the tree structure
When the Folders pane is closed, the File Explorer window displays a list of tasks for files and folders, as shown in Fig. 21.2. This list contains basic operations with files in this folder, transitions to other computer directories and other similar tasks.
The list of tasks depends on the type of folder you are viewing, the selected file and its type.
Note that any of the taskbars can be displayed or hidden by clicking the arrow icon.
The initial sector of the hard disk contains the master root record, which is loaded into memory and executed.
The last part of this sector contains the partition table - a 4-element table with 16-byte elements. This table is manipulated by the FDISK program (or an equivalent utility on another operating system).
At boot time, the ROM-BIOS loads the master root record and transfers control to its code. This code reads the partition table to determine the partition marked as active. Then the correct root sector is read into memory and executed.
Table 1. Master Root and Partition Table Structure
Table 2. Section Descriptor Structure
The partition code is used to determine the presence and position of the primary and extended partitions on the disk. After finding the desired section, its size and coordinates can be extracted from the corresponding descriptor fields. If 0 is written in the section code field, then the descriptor is considered empty, that is, it does not define any section on the disk.
Table 3. Partition codes for Microsoft operating systems
Code | Section view | The size | FAT type | OS |
---|---|---|---|---|
01h | Main | 0-15 MB | FAT12 | MS-DOS 2.0 |
04h | Main | 16-32 MB | FAT16 | MS-DOS 3.0 |
05h | Extended | 0-2 GB | - | MS-DOS 3.3 |
06h | Main | 32 MB-2 GB | FAT16 | MS-DOS 4.0 |
0Bh | Main | 512 MB-2 GB | FAT32 | OSR2 |
0Ch | Extended | 512 MB-2 TB | FAT32 | OSR2 |
0Eh | Main | 32 MB-2 GB | FAT16 | Windows 95 |
0Fh | Extended | 0-2 GB | - | Windows 95 |
The following codes are reserved for third-party operating systems:
- 02h - CP / M section;
- 03h - Xenix section;
- 07h - OS / 2 partition (HPFS file system).
Notes:
- Cylinder and sector numbers are 10 and 6 bits respectively:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 c c c c c c c c c c s s s s s s
They are ordered so that when you load CX with a 16-bit value, it is ready to invoke INT 13h to read the correct chunk of disk. Thus, after reading the Master Boot Record into the sect_buf memory area, the CMP code byte ptr sect_buf, 80hwill check if the first section is active and the code
MOV CX, sect_buf
will load CX to call INT 13h to read the root sector of partition # 1.
- The "relative sector" value at offset 08h in each partition is equivalent to the head, sector, and cylinder of the partition's start address. Relative sector 0 coincides with cylinder 0, head 0, sector 1. The relative sector number increases first for each sector on the head, then for each head, and finally for each cylinder.
The formula applies:
Rel_sec \u003d (# Cyl * sec_on_cyl * heads) + (#Goal * sec_on_cyl) + (# Sec -1)
Partitions start at an even numbered cylinder, except for the first partition, which can start at cylinder 0, head 0, sector 2 (since sector 1 is occupied by the Master Boot Record).
When the root of a partition is taken over, DS: SI points to the corresponding entry in the partition table.
Root sector structure
Table 4. Floppy root sector format or partition hard disk
00h | 3 | JMP | xx xx | NEAR jump to download code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
03h | 8 | "I" | "B" | "M" | "4" | "." | "0" | OEM company name and system version | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Bh | 2 | SectSiz | number of bytes per sector (always 512) | start BPB 0Dh | 1
| ClustSiz | number of sectors in a cluster |
0Eh | 2
| ResSecs | number of spare sectors (sectors before FAT # 1) |
10h | 1
| FatCnt | number of FAT tables |
11h | 2
| RootSiz | number of 32-byte entries in the root directory (0 for FAT32) |
13h | 2
| TotSecs | total number of sectors on the medium (DOS partition) |
15h | 1
| Media | media type (same as 1st byte of FAT) |
16h | 2
| FatSize | number of sectors in one FAT | end BPB |
18h | 2
| TrkSecs |
|
| number of sectors per track |
1Ah | 2
| HeadCnt |
| number of heads |
1Ch | 4
| HidnSec | number of hidden sectors (used in partitioning schemes) |
20h | 4
| TotSecs | total sectors, if size\u003e 32 MB |
24h | 1
| 128
|
|
| physical disk number |
25h | 1
|
|
| reserve |
26h | 1
| 29h |
| extended structure attribute |
27h | 4
|
| Volume ID (serial number) |
2Bh | Bh |
| (NO NAME) mark |
36h | 8
|
| File System ID (FAT12) |
3Eh |
| start of code and load data |
|
Notes:
- Types of storage media:
- F0h - floppy disk, 2 sides, 18 sectors per track;
- F8h - hard drive;
- F9h - floppy disk, 2 sides, 15 sectors per track;
- FCh - floppy disk, 1 side, 9 sectors per track;
- FDh - floppy disk, 2 sides, 9 sectors per track;
- FEh - floppy disk, 1 side, 8 sectors per track;
- FFh - floppy disk, 2 sides, 8 sectors per track.
- Use INT 25h absolute read (DX \u003d 0) to read this sector. OR:
- floppy disks: root sector \u003d BIOS INT 13h head 0, track 0, sector 1;
- hard: read PartTable to get BIOS head / track / sector.
- BPB (BIOS Parameter Block) is a subset of the data contained in the root_sector. The "Build BPB" driver request requires the driver to complete the block noted above. BPB length \u003d 13 bytes
Floppy disk parameters table
This 10 byte structure is also known as the "Disk Base Table". It is located at the address of the interrupt vector INT 1Eh (4-byte address at 0: 0078). This table sets some important variables for floppy disk devices. It is initialized by the ROM-BIOS and modified by DOS to improve floppy performance.
Table 5. Diskette parameter table format
Bias | Length | Content |
---|---|---|
00h | 1 | First byte of specification: bits 0-3 - head loading time; bits 4-7 - head step duration |
01h | 1 | Second byte of specification: bit 0 - DMA mode flag; bits 1-7 - heads loading time |
02h | 1 | Delay before turning off the motor (in "ticks" of the system clock) |
03h | 1 | Sector size (bytes): 0 - 128, 1 - 256, 2 - 512, 3 - 1024 |
04h | 1 | Number of sectors per track |
05h | 1 | Read / Write Gap Length |
06h | 1 | Data area length |
07h | 1 | Gap length for formatting operation |
08h | 1 | Placeholder for formatting (usually 0F6h, ie "Ў") |
09h | 1 | Head installation time (in milliseconds) |
0Ah | 1 | Motor start time (in 1/8 s) |
Hard disk parameter table
This 16-byte structure is located at the address of the INT 41h interrupt vector (4-byte address at 0: 0104). The parameters for the second hard disk (if any) are located at the address of the vector INT 46h. These tables set some important variables for hard disk operations.
Table 6. Hard disk table format
Bias | Length | Content |
---|---|---|
00h | 2 | Number of cylinders |
02h | 1 | Number of heads |
03h | 2 | Not used (always 0) |
05h | 2 | Precompensation start cylinder number |
07h | 1 | Maximum length of ECC block |
08h | 1 | Control Byte: bits 0-2 - not used (always 0); bit 3 - set if the number of heads is more than 8; bit 4 - not used (always 0); bit 5 - set if the manufacturer has placed a defect card on the cylinder with the number "maximum working cylinder + 1"; bit 6 - prohibition of ECC repeated control; bit 7 - prohibition of ECC control |
09h | 1 | Not used (always 0) |
0Ah | 1 | Not used (always 0) |
0Bh | 1 | Not used (always 0) |
0Ch | 2 | Parking area cylinder number |
0Eh | 1 | Number of sectors per track |
0Fh | 1 | Reserve |
File Allocation Table (FAT)
File size can change over time. If we allow storing a file only in contiguous sectors, then when the file size increases, the OS must completely rewrite it to another suitable size (free) area of \u200b\u200bthe disk. To simplify and speed up the operation of adding new data to a file, modern operating systems use File Allocation Tables (FAT for short), which allow you to store a file in several non-contiguous regions.
When using FAT, the data area of \u200b\u200bthe logical disk is divided into sections of the same size - clusters... A cluster can consist of one or several sectors sequentially located on the disk. The number of sectors in a cluster must be a multiple of 2 N and can take values \u200b\u200bfrom 1 to 64 (the cluster size depends on the type of FAT used and the size of the logical disk).
Each cluster has its own FAT table entry. The first two FAT elements are spare - if there are K data clusters on the disk, then the number of FAT elements will be K + 2. The FAT type is determined by the K value:
- if K<4085 - используется FAT12;
- if 4084\u003e K<65525 - используется FAT16;
- if 65524\u003e K - FAT32 is used.
The names of FAT types come from the size of the element. So the FAT12 element has a size of 12 bits, FAT16 - 16 bits, FAT32 - 32 bits. It should be borne in mind that in FAT32 the four most significant binary digits are reserved and ignored during the operation of the OS (that is, only the seven least significant hexadecimal digits of the element are significant).
FAT is a linked list that the OS uses to keep track of the physical location of data on disk and to search free memory for new files.
The file directory (table of contents) for each file contains the starting element number in the FAT table corresponding to the first cluster in the file distribution chain. The corresponding FAT element either indicates the end of the chain, or refers to the next element, etc. Example:
This diagram illustrates the basic concepts of FAT. It shows that:
- MYFILE.TXT occupies 10 clusters. The first cluster is cluster 08, the last cluster is 1Bh. The cluster chain - 08h, 09h, 0Ah, 0Bh, 15h, 16h, 17h, 19h, 1Ah, 1Bh. Each element points to the next element in the chain, and the last element contains a special code (see Table 7).
- Cluster 18h is marked as defective and is not part of the distribution chain.
- Clusters 06h, 07h, 0Ch-14h and 1Ch-1Fh are empty and available for distribution.
- Another chain begins with cluster 02h and ends with cluster 05h. To find out the file name, you need to find the TOC element with the starting cluster number 02h.
Table 7. FAT Element Values
FAT usually starts with logical sector 1 in the DOS partition (i.e. it can be read on INT 25h with DX \u003d 1). In general, you first need to read the root_sector (DX \u003d 0) and take the offset 0Eh. It shows how many root and spare sectors are in front of the FAT. Then use this number (usually 1) as the DX content to read the FAT through INT 25h.
Multiple copies of FAT may exist. Usually two identical copies are maintained. In these cases, all copies are located directly one after the other.
Comment:
- It is a common misconception that 16-bit FAT prevents DOS from working with disks larger than 32 megabytes. In fact, it limits the fact that INT 25h / 26h is unable to work with SECTORS with numbers greater than 65535. Since the sector size is usually 512 bytes, or half a kilobyte, this dictates a 32 megabyte limit. On the other hand, nothing prohibits you from having larger sectors, so in theory DOS can work with any disk.
- Multiply the cluster number by 3.
- If the element number is even, perform the AND operation on the read word and mask 0FFFh. If the element number is odd, shift the value right by 4 bits. As a result, you will get the desired value of the FAT element.
Now let's look at the procedure for writing an element to FAT12.
- Multiply the cluster number by 3.
- Divide the result by 2 (element length is 1.5 (3/2) bytes).
- Read a 16-bit word from FAT using the result of the previous operation as the address.
- If the element number is even, perform the AND operation on the read word and the mask 0F000h, and then the OR operation on the obtained result and the value of the recorded element. If the element number is odd, perform an AND operation on the read word and mask 0F000h, and then shift the value to the left by 4 bits and OR with the result of the previous operation.
- Write the resulting 16-bit word back to FAT.
Comment:
- A 12-bit entry can cross two sector boundaries, so be careful when reading one FAT sector at a time.
16-bit elements are simpler - each element contains the 16-bit offset (from the start of the FAT) of the next element in the chain.
32-bit elements - each element contains the 32-bit offset of the next element in the chain.
In assembly language programs, to perform multiplication by 3, instead of the MUL instruction, a shift-and-add algorithm is often used: the source number is copied, the copy of the number is shifted left one bit (multiplication by 2), and then both numbers are added (x + 2x \u003d 3x). Instead of the DIV command, a one-bit right shift is used.
The FAT element contains the cluster number, but when working with disks at a low level, the addressed data unit is the sector, not the cluster.
A floppy disk (or hard disk partition) is structured as follows:
- root and spare sectors;
- FAT # 1;
- FAT # 2;
- root directory (does not exist in FAT32);
- data area.
Each section in this structure has a variable length, and in order to correctly convert the cluster number to the sector number, it is necessary to know the length of each such section.
To get the starting sector number of the cluster from the cluster number ClustNum (read from the corresponding field in the directory entry or in the FAT chain), you can use the undocumented OS 32h function, or read the root sector and apply the following formulas:
root_sectors \u003d (RootSiz * 32) / 512 start_data \u003d ResSecs + (FatSize * FatCnt) + root_sectors start_sector \u003d start_data + ((ClustNum - 2) * ClustSiz),
where the values \u200b\u200bof the variables: RootSiz, ResSecs, FatSize, FatCnt, ClustSiz are retrieved from the root sector or from BPB.
Set DX \u003d start_sector before reading INT 25h or writing INT 26h.
File directories
The file directory is an array of 32-byte file descriptors. From the point of view of the operating system, all directories (except for the root directory in FAT12 and FAT16 systems) look like files and can contain an arbitrary number of entries.
The Root Directory is the main directory of the drive from which the subdirectory tree starts. For the root directory in FAT12 and FAT16 in the system area of \u200b\u200bthe logical disk, a special space of a fixed size (16 KB) is allocated, designed to store 512 elements. In FAT32, the root directory is an arbitrary size file.
Table 8. Directory item structure
Bias | Length | Content |
---|---|---|
00h | 11 | Short file name |
0Bh | 1 | File attributes |
0Сh | 1 | * Reserved for Windows NT (must contain 0) |
0Dh | 1 | * Field specifying the time of file creation (in tens of milliseconds). The field value can range from 0 to 199 |
0Eh | 2 | * File creation time |
10h | 2 | * File creation date |
12h | 2 | * Date of the last access to the file for writing or reading data |
14h | 2 | * High word of the first cluster number of the file |
16h | 2 | Time of the last write to the file |
18h | 2 | Date of the last write to the file |
1Ah | 2 | The least significant word of the first cluster number in the file |
1Ch | 4 | File size in bytes (32-bit) |
The "*" sign means that the field is processed only in the FAT32 file system. On FAT12 and FAT16 systems, the field is considered reserved and contains the value 0.
The short file name consists of two fields: an 8-byte field containing the actual file name and a 3-byte field containing the extension. If the file name entered by the user is shorter than eight characters, then it is padded with spaces (space code - 20h), if the entered extension is shorter than three characters, then it is padded with spaces as well.
Some DOS functions require file attribute bytes as a parameter. The attribute byte bits are set to 1 if the file has a corresponding property:
- bit 0 - read only;
- bit 1 - hidden;
- bit 2 - system;
- bit 3 - volume identifier;
- bit 4 - directory;
- bit 5 - archived;
- bits 6 and 7 are reserved (set to 0).
The file creation time field and the time of the last write operation to the file have the following format:
15 | 9 | 8 | 5 | 4 | 0 |
When files are created, dates are counted from the beginning of the MS-DOS era, i.e. dated 01/01/1980. Bits 9-15 contain the year number minus 1980 (a valid value between 0 and 127).
Long filenames
Beginning with Windows 95, you can give a file (in addition to a short name) a so-called long name. To store a long name, empty directory entries are used adjacent to the main element - the file descriptor. The presence of ones in bits 0-3 of the attributes is an indication that a free directory entry is used to store a section of a long file name (this combination is not possible for file and directory descriptors). The short and long filenames are unique, i.e. should not appear twice in the same directory.
A long name is not written in ASCII characters, but in Unicode format, where each national alphabet corresponds to a set of codes. The price to pay for the versatility of Unicode is to reduce the storage density — each character takes up two bytes (a 16-bit word). In empty elements of the catalog, a long name is written in a cut into pieces (see Table 9).
Table 9. Structure of a directory entry that stores a snippet of a long file name
The long name is written to the directory first, with the fragments in reverse order, starting with the last:
All directories, except for the root, contain special links in the first two elements instead of file descriptors. Element # 0 contains a pointer to the directory itself, and the name field contains one period ("."). Item # 1 contains a pointer to the parent directory, and the name field contains two dots (".."). If the reference to the FAT table for element # 1 has a zero value, then the current directory is in the root directory.
The disk block is formed by the UNDOCUMENTED DOS 32h function.
All the information contained here can be obtained by reading the root sector and calling a number of other OS functions with some calculations, but the information block is convenient in that it contains all the data together. This is the only call that returns the address of the device driver header.
Table 10. Disk block diagram
Bias | Length | Content |
---|---|---|
00h | 1 | Disk number (0 \u003d A, 1 \u003d B, etc.) |
01h | 1 | Sub device number from device header (one driver can manage multiple disks) |
02h | 2 | Sector size in bytes |
04h | 1 | Number of sectors per cluster -1 (maximum sector in a cluster) |
05h | 1 | Shift of a cluster to a sector (cluster \u003d 2 # sectors) (sectors per cluster in powers of two: 2 for 4, 3 for 8) |
06h | 2 | Number of spare sectors (root, start of root) (N of the first FAT sector) |
08h | 1 | Number of FAT tables |
09h | 2 | Max. number of items in the root table of contents |
0Bh | 2 | Sector number for cluster # 2 (1st data cluster) |
0Dh | 2 | Total Clusters +2 (Highest Cluster Number) |
0Fh | 1 | Number of sectors occupied by one FAT |
10h | 2 | Root TOC start sector number |
12h | 4 | Device_header address |
16h | 1 | Media Descriptor Byte |
17h | 1 | Access flag: 0 if the device was accessed |
18h | 4 | Address of the next block of disc information (0FFFFh if the block is the last) |
Open mode bit flags:
- 0-2: Access rights of the process on the network
000 - read; 001 - record; 010 - read and write. - 4-6: Split mode:
000 - compatibility mode
001 \u003d exclusive file capture
010 \u003d reject write
011 \u003d reject read
100 \u003d reject nothing - 7: Inheritance:
1 - file is private for this process 0 - inherited by spawned processes
If the file attribute byte indicates read-only, it overrides these flags.
The network permission and split mode bits are effective only when the SHARE program is installed.
About files and file structures
File
File (eng. file - binder) - a concept in computing: an entity that allows access to any resource of a computing system and has a number of features:
- fixed name (sequence of characters, number or something else that uniquely characterizes the file);
- a certain logical representation and the corresponding read / write operations.
It can be anything - from a sequence of bits (although we read it by bytes, or rather words-groups of bytes, four, eight, sixteen) to a database with an arbitrary organization or any intermediate option; multidimensional database, strictly ordered.
The first case corresponds to read / write operations of a stream and / or an array (that is, sequential or with access by index), the second - DBMS commands. Intermediate options are reading and parsing all kinds of file formats.
In computer science, the following definition is used: a file is a named sequence of bytes.
Working with files is carried out by means of operating systems.
Names like files have and are processed in a similar way:
- data area (optional on disk);
- devices (both physical, ports for example; and virtual);
- data streams (in particular, process input or output) ("pipe" should be translated by the word "pipeline");
- network resources, sockets;
- operating system objects.
Files of the first type are historically the first and the most widespread, so the data area corresponding to the name is often called a "file".
File as data area
Information on external media is stored as files. Working with files is a very important type of computer work. Files store everything: and software, and information required by the user. With files, as with business papers, you constantly have to do something: rewrite them from one medium to another, destroy unnecessary ones, create new ones, search for, rename, arrange in one order or another, etc.
File is information stored on an external medium and united by a common name.
To clarify the meaning of this concept, it is convenient to use the following analogy: the data carrier itself (disk) is like a book. We talked about the fact that a book is external memory a person, and the magnetic disk is the external memory of the computer. The book consists of chapters (stories, sections), each of which has a title. Also, the files have their own names. They are called filenames. There is usually a table of contents at the beginning or end of a book — a list of chapter titles. The disk also has such a directory list containing the names of the stored files.
The directory can be displayed to see if there is a this disc desired file.
Each file contains a separate information object: document, article, numeric array, program, etc. The information contained in the file becomes active, that is, it can be processed by a computer only after it is loaded into RAM.
Any user working on a computer has to deal with files. Even in order to play a computer game, you need to find out in which file its program is stored, be able to find this file and initialize the program.
Working with files on a computer is done using the file system. File system is a functional part of the OS that provides operations with files.
To find the required file, the user must know: a) what is the name of the file; b) where the file is stored.
File name
In almost all operating systems, a file name is composed of two parts separated by a period. For example:
To the left of the dot is the actual file name (tu-prog). The part of the name following the dot is called the file extension (pas). Usually, the file names use Latin letters and numbers. On most operating systems, the maximum extension length is 3 characters. In addition, the file name may not have an extension. In the Windows operating system, Russian letters are allowed in file names; the maximum name length is 255 characters.
The extension indicates what kind of information is stored in this file. For example, the txt extension usually denotes a text file (contains text); extension pcx - graphic file (contains a picture), zip or gag - archive file (contains archive - compressed information), pas - program in Pascal.
Logical drives
One computer can have multiple disk drives - disk devices. Each drive is assigned a one-letter name (followed by a colon), for example A :, B :, C :. Often on personal computers, a large-capacity disk built into a system unit (called a hard disk) is divided into partitions. Each of these partitions is called a logical drive and is named C :, D :, E :, and so on. The A: and B: names usually refer to small removable disks - floppy disks (floppy disks). They can also be considered as names of disks, only logical ones, each of which completely occupies a real (physical) disk. Therefore, A :, B :, C :, D: are all the names of logical drives. The name of the logical drive containing the file is the first "coordinate" that identifies the location of the file.
There are two states of a logical disk - current and passive. Current disk - the disk on which the user is working at the current machine time. Passive disk - a disk with which there is currently no connection.
Disk file structure
The entire collection of files on disk and the relationships between them is called file structure... Different operating systems can support different file structure organizations. There are two types of file structures: simple, or single-level, and hierarchical - multi-level.
Single-level file structure is a simple sequence of files. To find a file on disk, you just need to specify the file name. For example, if the tetris.exe file is located on the A: drive, then its "full address" looks like this:
Operating systems with a single-level file structure are used on the simplest educational computers equipped only with floppy disks.
Multilevel file structure - tree-like (hierarchical) way of organizing files on disk. To facilitate understanding of this issue, we will use the analogy with the traditional "paper" way of storing information. In this analogy, the file is represented as some titled document (text, picture) on paper sheets. The next largest element in the file structure is called catalog... Continuing the "paper" analogy, we will think of a directory as a folder into which many documents, ie files, can be attached. The directory also gets its own name (imagine it is written on the cover of a folder).
The directory itself can be part of another directory external to it. This is the same as nesting a folder into another larger folder. Thus, each directory can contain many files and subdirectories (called subdirectories). The top-level directory that is not nested in any other directory is called the root directory.
The Windows operating system uses the term folder to refer to directory.
A graphical representation of a hierarchical file structure is called a tree.
In fig. 1 directory names are in uppercase letters and files are in lowercase. There are two folders in the root directory: IVANOV and PETROV and one file fin.com. The IVANOV directory contains two sub-directories PROGS and DATA. The DATA directory is empty; there are three files in the PROGS directory, and so on. In a tree, the root directory is usually represented by \\.
Figure: 1. An example of a hierarchical file structure
There are two states of the directory (similar to logical disks) - current and passive. The operating system remembers the current directory on every logical da of the current drive, in this case the OS stores the drive name and the directory name.
6.1 Theoretical information
Files are used to organize and store data in a computer on machine media. The structuring of many files on machine media is carried out using directories. In Windows, file and folder management tools include programs Conductor and the window My computer.
Windows Explorer is a program that displays the hierarchical structure of files, folders and drives on a PC, i.e. is a means of accessing files, folders and disks. On the left side of the window, Windows Explorer uses a hierarchical view of folders, files, and other resources connected to your computer or network. On the right side of the Explorer window, the contents of the selected (selected) folder are displayed on the left side of the Explorer.
To accomplish this laboratory work it is necessary to familiarize yourself with the materials presented in the lecture course or other sources of information:
6.2 Purpose of work
Getting to know the program Windows Explorer and the acquisition of skills in creating the structure of folders and files on a floppy disk.
6.3 Problem statement
To acquire work skills, follow these steps:
- In the Explorer window on flash E: create the directory structure shown in Fig. 6.1 (screenshots are taken in command line and in Explorer).
- {!LANG-f9f3edf04edc1db7d0057870c3f0fa11!} {!LANG-e81f693faf8bf536550e78375c649efc!}{!LANG-3969d2cef4e05da715e0cdaeccb6d406!} {!LANG-edf4f1849d3a140e70df765c783603d1!}{!LANG-10582eefe5298c27111d2956df941657!} {!LANG-cd0370a0181f918dbc5edebde4544160!}{!LANG-482f2a1f31892ed6dc9a8db26248b480!} {!LANG-f3f3aea8fa7d62fb7c2911c4238e4462!}, {!LANG-05a8bc398f32ad373d387f91312864c8!}{!LANG-73365e38bf2b65234d77914e34d9fae0!} {!LANG-78b92168328240bbc6c5c45c71298ecb!}{!LANG-40f66ac76d1cd3b7b8902ad38e83764b!}
- {!LANG-ba7119eb5c03d97bdc38873579a6c64d!} {!LANG-e13aaa8bdc34b1ad10f5485c5bd6daed!}{!LANG-a39c19da8ff2f08644f1f3e6c187896d!} {!LANG-f7d7924e09cb6fbd92527d706b212c1e!}.
- {!LANG-7bcea0b487304a93482b6c0265bdb8f0!} {!LANG-f7d7924e09cb6fbd92527d706b212c1e!}{!LANG-e3bdda740cc3b8978ff528aabab501eb!} {!LANG-56d9f56eea804fe5b5a1de53f5490b5f!}.
- {!LANG-1d9238f2bcedceea465f1c7e871f1fdf!} {!LANG-f7d7924e09cb6fbd92527d706b212c1e!}{!LANG-07aba71d790e5b4a36bb91bf227d0457!} {!LANG-4e8da5f9246a3854dd4b7005f2230f6a!}{!LANG-bf2e305a4c0024b4f7a86285150056b0!} {!LANG-5de13301e64ab80df5eebfbd3adeeefa!}.
- {!LANG-e63f85929ccd7c1a1c9a0207fc1af05c!} {!LANG-2594497fbe38a6e84e1f767953771559!}{!LANG-73365e38bf2b65234d77914e34d9fae0!} {!LANG-ca3cabb1fc59df35223a3814d4b70299!}
{!LANG-3c5993197fc16cd311598c77cca4d023!}
{!LANG-0f6f63f5ca5dbd99ab7862c7e686ebdb!}
{!LANG-57856f318d4cf7ef5cea802ab24d3e21!}
{!LANG-e17ce16253e7b8e63d1d8d728b4ca97d!} {!LANG-2e2ff644f1d5f56c724fa09a6aa3401c!}{!LANG-621100609a163a26db133f771df3ef62!}
{!LANG-8c639963cd33f5c3297a9edebd4621b4!}
{!LANG-66156a5ad8b49ed955b3bf1b8142ff1b!}
{!LANG-a73165bc8aa7d00db965080408709e25!}
{!LANG-7a1249c9e864066dccdf5e3cea69de79!} {!LANG-e81f693faf8bf536550e78375c649efc!}.
{!LANG-1e9cea3b07d1b854601462269196f036!}
- {!LANG-92eae4b5d6e3de99eff200c918bf72d9!} {!LANG-e81f693faf8bf536550e78375c649efc!}{!LANG-f0d9b148ad1ae1c4d6b1d079de10695c!}
- {!LANG-bfac8b131172533366d2efee30e96fce!} {!LANG-e81f693faf8bf536550e78375c649efc!}{!LANG-fb430914fd109c4a4f8a76dc9a155918!}
- {!LANG-8e0fed4bd7c026b32c56e9ae24c5c4f7!}
{!LANG-eaee98628b6b533e47421ad0bb194d8d!}
{!LANG-e91f51b09ab15aaceef26b46a081d3b6!}
- {!LANG-da24bd1e5a1b0ea8481d2d07a44b497a!} {!LANG-9c3feceba36731e7a1d13ea63ad48d4a!}{!LANG-0734805327ec85d791c3d02a13ee62f3!} {!LANG-4a8e42b9c776f41f1d9d6886a66cdabd!};
- {!LANG-4a69f91e7f5e64cfa9d03363c432d557!} {!LANG-4c01bd2afb3c9aeacbe2adf14309b27d!}{!LANG-50e150c83bb0baa632d33d2c1927658c!}
- {!LANG-508e14e643f1a75a1b2dba1e64877752!} {!LANG-8be9b7f7ccd1d61aef6f8995383e5149!}{!LANG-3cca20a4d8c5af7c687e92cff585277b!}
- {!LANG-6fea9864064e4d29763bb5e9d51efd05!}
{!LANG-2a1120f2d7a38f0a4cd41d117114507e!}
{!LANG-40aa18cf0e67448c224b0d6ee76c6e4a!}
{!LANG-f7f10f59afd5bb7996243df7ba2fd6b6!} {!LANG-09b9652ef8d848a6b0b6cafb10e12774!}{!LANG-f0c07a7016b1f9eec0d5794746565305!} {!LANG-09b9652ef8d848a6b0b6cafb10e12774!}{!LANG-f930ec227e6c34a86c38f7e6e02ece57!}
{!LANG-bc8a5de4e06dc759ed8ec09d0e374f8c!}
{!LANG-8909dd757c775c205ad4d41fb09a4f2e!} {!LANG-f1cc233c5a75d6cfc4f6f0de061a5a64!}{!LANG-ca02d135be722e9a2abceb3405737eb6!} {!LANG-57cefab4d8174f494f13e8cf1a5291c0!}{!LANG-89b121a2dc20310fa83aa2e47316fd52!} {!LANG-146527a87294c2bfabfd5dbb3b33214a!}{!LANG-07aba71d790e5b4a36bb91bf227d0457!} {!LANG-f3f3aea8fa7d62fb7c2911c4238e4462!}.
{!LANG-5d53b96aa5b769686d2d47d071f77ff2!}
- {!LANG-309435a50d6a52ed037341f8ba3bc2cb!} {!LANG-d5d2de943f245ead2e7b073f2c5c1a17!}{!LANG-99a4cd208879a84d15dcccaa901371de!}
- {!LANG-85ff790b5869e16eabc846fe2903db58!}
- {!LANG-2b03ac61f5eaf706fb8c917c5ef75976!}
{!LANG-ec63e70504c55ec365448d7914060095!} {!LANG-f1cc233c5a75d6cfc4f6f0de061a5a64!}{!LANG-ca02d135be722e9a2abceb3405737eb6!} {!LANG-e48389d6f5eb6fc022b4119db1633bed!}{!LANG-9b4b0afaa7d1624d197a1fd39e7ebabf!} {!LANG-05a8bc398f32ad373d387f91312864c8!}{!LANG-a0d0c0a2dccecc8a624858d841bb81c5!} {!LANG-cd0370a0181f918dbc5edebde4544160!}.
{!LANG-5662c667980429d03089c4962d5a9f74!} {!LANG-f1cc233c5a75d6cfc4f6f0de061a5a64!}{!LANG-ca02d135be722e9a2abceb3405737eb6!} {!LANG-31bab0b4ed003880bba09c910f241607!}{!LANG-dbd3fdef8f8ffc48544fcf3a0b1a8284!} {!LANG-78b92168328240bbc6c5c45c71298ecb!}{!LANG-df0a6efc64d1177b9ad9972126e84e76!}
{!LANG-0dca5a1a0b116f4c6b8a82e3d3b95c32!} {!LANG-e13aaa8bdc34b1ad10f5485c5bd6daed!}{!LANG-81b2e4d4afb491ff403303c6d3a64a39!} {!LANG-f7d7924e09cb6fbd92527d706b212c1e!}{!LANG-336b3c68eeb7af23fff7576b2cefdd6c!}
{!LANG-597ec4fe5d8fa2b3b9ab181c600fc649!} {!LANG-f7d7924e09cb6fbd92527d706b212c1e!}{!LANG-07aba71d790e5b4a36bb91bf227d0457!} {!LANG-2594497fbe38a6e84e1f767953771559!}{!LANG-444c5cb3acd534b36f74a4636820b4ae!}
{!LANG-1126031411b109612532357aaf018ec6!} {!LANG-f7d7924e09cb6fbd92527d706b212c1e!}{!LANG-482f2a1f31892ed6dc9a8db26248b480!} {!LANG-4e8da5f9246a3854dd4b7005f2230f6a!}{!LANG-73365e38bf2b65234d77914e34d9fae0!} {!LANG-25e817b9b2c51573b8ba54d6cc7c8de7!}{!LANG-9b3b72c69461f7278c0e5c3d2c08ca75!}
{!LANG-8ce16d1319a234f595c2e39df6c5f7ec!} {!LANG-2594497fbe38a6e84e1f767953771559!}{!LANG-73365e38bf2b65234d77914e34d9fae0!} {!LANG-49bbf8b497fe0ba5862e74d4cd269164!}.
{!LANG-232245761c2f67829ce7100c4d1b257f!}
{!LANG-f93066e41029c435e0945bc6224d490d!}