Organization of the file system
The first few blocks of addresses file stored directly in the index node, thus
the index for small files node keeps all the necessary information, which is
copied from disk to memory, at the time of opening the file. For large files
from one node addresses index points to a block of indirect addressing. This
unit is composed of additional disk blocks. If this is not enough use of
indirect addressing double block, which contains the address blocks indirect
addressing. If this is not enough and using indirect addressing triple block.
This scheme uses Unix (as well as HPFS file system, NTFS, etc.). This approach
allows for fixed, relatively small amount of index node support the work with
files, which can vary from a few bytes to several gigabytes. It is that for
small files used only direct addressing to ensure maximum productivity. Office
employed and free disk space. In modern OS used several methods used accounting
disk space. Consider the most common. Recognition through the organization bit
vector. Often the list of free disk blocks realized in the form of bit vector (or
bit map bit vector). Each block is represented by one bit receiving value 0 or 1,
depending on whether it is occupied or vacant. For example,
00111100111100011000001 .... The main advantage of this approach is relatively
simple and it performs while in the first free block, or n consecutive blocks on
the disk. Many computers have the bit manipulation instructions that can be used
for this purpose. For example, computers families Intel and Motorola have
instructions that in which you can easily locate one single bit in the word. The
accounting method described free blocks used in Apple Macintosh. Unfortunately,
this technique is effective only if the bit vector is placed entirely in memory,
which is possible only for relatively small disks. For example, the size of 1.3
GB disk with blocks of 512 bytes needed in the table size 332 K for the
management of free blocks. Integrating communication through the organization
list. Another approach - link to the list of all available units, maintaining a
pointer to the first free block in a special place of the disk, along keshiruya
in memory of this information. The scheme is not always effective. For a list of
fingerprinting to be done a lot of hits on the disk. But fortunately we need, as
a rule, only the first free block. Sometimes resorting to modify the list
cohesive approach, organizing storage addresses n free blocks in the first free
block. The first n-1 of these units actually used. The last block is composed of
other n blocks. Etc.
Next part
|