Module-5 2 4
Module-5 2 4
The file allocation method of choice in both Unix and Windows is the
indexed allocation method. This method was championed by the Multics
operating system in 1966.
The file-allocation table contains a multi-level index for each file. Indirection
blocks are introduced each time the total number of blocks “overflows” the
previous index allocation.
Typically, the indices are neither stored with the file-allocation table nor with
the file, and are retained in memory when the file is opened
Advantages of Index Allocation
The advantages of index allocation are:
1.The index allocation method solves the problem of external
fragmentation.
2.Index allocation provides direct access.
Disadvantages of Index Allocation
The disadvantages of index allocation are:
1.In index allocation, pointer overhead is more.
2.We can lose the entire file if an index block is not correct.
3.It is totally a wastage to create an index for a small file.
A single index block cannot hold all the pointer for files with large sizes.
To resolve this problem, there are various mechanism which we can use:
1.Linked scheme
2.Multilevel Index
3.Combined Scheme
1.Linked Scheme: – In the linked scheme, to hold the pointer, two
or more than two index blocks are linked together. Each block
contains the address of the next index block or a pointer.
1.Multilevel Index: – In the multilevel index, to point the second-level
index block, we use a first-level index block that in turn points to the
blocks of the disk, occupied by the file. We can extend this up to 3 or more
than 3 levels depending on the maximum size of the file.
1.Combined Scheme: – In a combined scheme, there is a special block
which is called an information node (Inode). The inode comprises of all the
information related to the file like authority, name, size, etc.
To store the disk block addresses that contain the actual file, the
remaining space of inode is used. In inode, the starting pointer is used to
point the direct blocks. This means the pointer comprises of the addresses
of the disk blocks, which consist of the file data. To indicate the indirect
blocks, the next few pointers are used. The indirect blocks are of three
types, which are single indirect, double indirect, and triple indirect.
MCQ
To hold the pointer, two or more than two index blocks are linked together.
Each block contains the address of the next index block or a pointer.
a)Inode
b)Link-List
c)Indexed
d)None of the Above
Ans b)