In a file allocation system, which of the following allocation scheme ...
Contiguous Allocation:
- In contiguous allocation, each file occupies a contiguous block of storage space on the disk.
- This scheme allows for efficient direct access since the file can be accessed by calculating the starting address and directly accessing the required block.
- However, this scheme can lead to external fragmentation, where free blocks of space are scattered throughout the disk, making it difficult to allocate large contiguous blocks of space for new files.
Linked Allocation:
- In linked allocation, each file is represented as a linked list of disk blocks.
- Each block contains a pointer to the next block in the file.
- This scheme does not allow for efficient direct access since the file must be accessed sequentially by following the linked list.
- Therefore, linked allocation is not suitable for supporting efficient direct access.
Indexed Allocation:
- In indexed allocation, each file has an index block that contains a list of pointers to the actual blocks of the file.
- This allows for efficient direct access since the index block provides a mapping between logical and physical addresses.
- However, this scheme can also lead to external fragmentation if the index blocks are scattered throughout the disk.
Combining Contiguous and Indexed Allocation:
- By combining the contiguous and indexed allocation schemes, it is possible to support efficient direct access without external fragmentation.
- In this scheme, each file is allocated a contiguous block of storage space for the index block, which contains pointers to the actual blocks of the file.
- This allows for efficient direct access to the file using the index block, while also avoiding external fragmentation since the file is not allocated in a contiguous manner.
- Therefore, the combined scheme of contiguous and indexed allocation can be used to support efficient direct access without external fragmentation.
Conclusion:
- Option D, which states that both contiguous and indexed allocation can be used, is the correct answer.
- Contiguous allocation allows for efficient direct access, but can lead to external fragmentation.
- Indexed allocation can also enable efficient direct access, but can also lead to external fragmentation.
- By combining the two schemes, it is possible to support efficient direct access without external fragmentation.
In a file allocation system, which of the following allocation scheme ...
There is always the possibility of external fragmentation in contiguous allocation. Both the linked and the indexed allocation methods are completely free of any external fragmentation.
To make sure you are not studying endlessly, EduRev has designed SSC CGL study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in SSC CGL.