ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > >
homework-9 Version 0
👤 Author: by 819755696qqcom 2019-12-03 14:36:51
Contiguous Allocation:

Principle:When creating a file, assign a set of contiguous blocks

Advantage:

1. Convenient for write once operations.

2. Support sequential access and random access, with fast sequential access speed.

3. The minimum number of disk seek times and seek time is required.

Disadvantage:

1. Files cannot grow dynamically. (It is possible that an empty block at the end of the file has been assigned to another file.)

2. It is not conducive to the insertion and deletion of documents.

3. External debris. (After repeatedly adding and deleting files, it is difficult to find continuous blocks with enough space size, which needs to be compressed.)

4. The size of the life file is required when creating the file.
Linked Alloaction:

Principle: the information of a file is stored in several discontinuous physical blocks, which are connected by pointers. The former physical block points to the next physical block.

Advantage:

1. Improve the space utilization of the disk without external fragmentation.

2. It is conducive to the insertion and deletion of documents.

3. It is conducive to the dynamic expansion of documents.

Disadvantages:

1. The access speed is slow. Generally, it is only suitable for sequential access of information, not for random access.

2. Search for a block must follow the pointer from beginning to end.

3. Reliability problems, such as pointer error.

4. More seek times and time.

5. Link pointer takes up a certain space, and multiple blocks are grouped into clusters, which are allocated by clusters rather than by blocks. (increased disk fragmentation)
Indexed Allocation:

Principle: Each file has a first level index in fat that contains entries for each partition assigned to the file. The index of the file is kept in a separate block, and the entry of the file in fat points to this block.

Advantage:

1. Keep the advantages of link structure and solve its disadvantages: fast allocation can eliminate external fragmentation. Partition allocation by size can improve locality. Index allocation supports sequential access to files and direct access to files, which is a common way.

2. Meet the requirements of file dynamic growth, insertion and deletion. (as long as there are free blocks)

3. Make full use of external memory space.

Disadvantages:

1. More seek times and seek space.

2. Index table itself brings system overhead, such as internal and external memory space, access time.

Please login to reply. Login

Reversion History

Loading...
No reversions found.