Contiguous file allocation stores all the blocks of a file in consecutive locations on the disk. This makes reading the file fast because the disk head moves less.
Click to reveal answer
beginner
How does linked file allocation work?
In linked allocation, each file is a linked list of disk blocks. Each block contains a pointer to the next block. This allows files to be stored anywhere on the disk but can be slower to access.
Click to reveal answer
intermediate
What is the main advantage of indexed file allocation?
Indexed allocation uses an index block that contains pointers to all the file's blocks. This allows direct access to any block, improving speed and flexibility.
Click to reveal answer
intermediate
What is a common problem with contiguous allocation?
Contiguous allocation can cause external fragmentation because files need continuous space, making it hard to find large enough free blocks as disk fills up.
Click to reveal answer
intermediate
Why might linked allocation be slower than indexed allocation?
Linked allocation requires following pointers from one block to the next, which means reading multiple disk blocks sequentially. Indexed allocation allows direct access to any block via the index, speeding up access.
Click to reveal answer
Which file allocation method stores file blocks in consecutive disk locations?
AContiguous allocation
BLinked allocation
CIndexed allocation
DNone of the above
✗ Incorrect
Contiguous allocation stores all file blocks one after another in consecutive disk locations.
In linked allocation, what does each block contain?
AThe file size
BAn index of all blocks
CThe entire file data
DA pointer to the next block
✗ Incorrect
Each block contains a pointer to the next block, forming a linked list.
Which allocation method uses an index block to store pointers to file blocks?
AIndexed allocation
BLinked allocation
CContiguous allocation
DSequential allocation
✗ Incorrect
Indexed allocation uses a special index block that holds pointers to all the file's blocks.
What is a major disadvantage of contiguous allocation?
ASlow access to file blocks
BExternal fragmentation
CComplex index management
DPointers use extra space
✗ Incorrect
Contiguous allocation can cause external fragmentation because files need continuous space.
Why is indexed allocation faster than linked allocation for random access?
ABecause it stores blocks consecutively
BBecause it uses pointers in each block
CBecause it uses an index block for direct access
DBecause it compresses file data
✗ Incorrect
Indexed allocation allows direct access to any block via the index block, speeding up random access.
Explain the differences between contiguous, linked, and indexed file allocation methods.
Think about how files are stored and accessed on disk.
You got /4 concepts.
Describe a real-life situation where linked file allocation might be preferred over contiguous allocation.
Consider flexibility versus speed.
You got /4 concepts.
Practice
(1/5)
1. Which file allocation method stores all file blocks in one continuous sequence on disk?
easy
A. Hybrid allocation
B. Linked allocation
C. Indexed allocation
D. Contiguous allocation
Solution
Step 1: Understand file storage methods
Contiguous allocation stores all file blocks one after another in a continuous space on disk.
Step 2: Compare with other methods
Linked allocation stores blocks scattered with pointers; indexed uses an index block. Only contiguous is continuous.
Final Answer:
Contiguous allocation -> Option D
Quick Check:
Continuous blocks = Contiguous allocation [OK]
Hint: Continuous blocks mean contiguous allocation [OK]
3. Consider a file stored using indexed allocation with an index block containing pointers to data blocks 5, 9, and 12. Which block does the system read first to access the file?
medium
A. The index block
B. Block 5
C. Block 9
D. Block 12
Solution
Step 1: Understand indexed allocation access
The system first reads the index block to find pointers to all data blocks.
Step 2: Identify the first block read
Before accessing data blocks 5, 9, or 12, the index block must be read to know their locations.
Final Answer:
The index block -> Option A
Quick Check:
Index block read first in indexed allocation [OK]
Hint: Index block is always read first in indexed allocation [OK]
Common Mistakes:
Choosing a data block instead of the index block
Confusing linked allocation with indexed
Assuming direct access without index
4. A file system uses linked allocation but the file's blocks are stored non-contiguously without pointers linking them. What is the main problem here?
medium
A. File blocks are stored contiguously, causing slow access
B. File blocks are fragmented but linked correctly
C. Pointers are missing, so file blocks cannot be accessed sequentially
D. Index block is corrupted
Solution
Step 1: Understand linked allocation requirements
Linked allocation requires each block to have a pointer to the next block for sequential access.
Step 2: Identify the problem without pointers
Without pointers, the system cannot follow the chain, so blocks cannot be accessed in order.
Final Answer:
Pointers are missing, so file blocks cannot be accessed sequentially -> Option C
Hint: No pointers means linked allocation fails [OK]
Common Mistakes:
Assuming fragmentation is not a problem
Confusing contiguous storage with linked allocation
Thinking index block is involved in linked allocation
5. A file of size 12 blocks is stored using contiguous allocation starting at block 20. If block 25 is corrupted, what is the impact on the file access?
hard
A. The entire file becomes inaccessible due to break in continuity
B. File access continues using pointers from block 25
C. Only block 25 is lost; other blocks are accessible
D. Index block redirects access around block 25
Solution
Step 1: Recall contiguous allocation properties
Files are stored in continuous blocks; any corruption breaks the sequence.
Step 2: Analyze impact of corrupted block 25
Since block 25 is in the middle, the file cannot be read beyond that point, making the entire file inaccessible.
Final Answer:
The entire file becomes inaccessible due to break in continuity -> Option A
Quick Check:
Corruption breaks contiguous file access [OK]
Hint: Contiguous files fail if any block is corrupted [OK]
Common Mistakes:
Assuming only corrupted block is lost
Thinking pointers or index block help in contiguous allocation
Confusing linked or indexed allocation behavior
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.