File Allocation Methods MCQs: 10 Solved Questions with Explanations
Practise ten questions on contiguous, linked and indexed allocation. Each answer includes the reasoning, arithmetic and a useful boundary check.
KnowledgeGate Team
Exam prep & CS education

Students often memorise the definitions of contiguous, linked and indexed allocation, then lose the question when block size, pointer size, fragmentation or an I/O assumption changes. Block size governs the number of records or pointers per block, while the allocation method governs access, growth and fragmentation. Calculate each answer first, then reveal the explanation. KnowledgeGate has about 60 live practice questions on File Allocation Methods, and the topic sits within the wider GATE CS Exam Preparation route.
File allocation methods in one six-block example
Suppose a file has six logical blocks: A, B, C, D, E, F.
In contiguous allocation, they occupy physical blocks 40, 41, 42, 43, 44, 45, with metadata start = 40, length = 6. Logical block D has offset 3, so its location is 40 + 3 = 43.
In linked allocation, the sequence is 7 -> 19 -> 4 -> 31 -> 12 -> 26. Reaching D requires following links to physical block 31. In indexed allocation, index block 9 contains [7, 19, 4, 31, 12, 26], so entry 3 points directly to block 31.
Method | Placement | Direct access | Growth | Main space cost |
|---|---|---|---|---|
Contiguous | One adjacent run | Yes, by arithmetic | Difficult if the next block is occupied | Suitable free run and possible unused reserved space |
Linked | Blocks may be scattered | No, links must be followed | Easy | A pointer in each data block |
Indexed | Blocks may be scattered | Yes, through the index | Easy while index capacity remains | One or more index blocks |
Contiguous allocation is fast but needs a suitable run. Linked allocation grows easily but pays pointer and traversal costs. Indexed allocation gives direct access but consumes index space.
File allocation MCQs 1-2: block size and fragmentation
Question 1
ISRO 2009
Using a larger block size in a fixed block size file system leads to
A. better disk throughput but poorer disk space utilization
B. better disk throughput and better disk space utilization
C. poorer disk throughput but better disk space utilization
D. poorer disk throughput and poorer disk space utilization
Answer: A. better disk throughput but poorer disk space utilization.
Larger blocks move more bytes per I/O and need fewer lookups, improving throughput. The cost is internal fragmentation in the last block. A 10 KB file with 4 KB blocks needs ceil(10 / 4) = 3 blocks, allocating 12 KB and wasting 2 KB. With 8 KB blocks, it needs 2 blocks, allocating 16 KB and wasting 6 KB. Full solution for Question 1.
Question 2
ISRO 2013
Suppose we have variable logical records of lengths of 5 bytes, 10 bytes, and 25 bytes while the physical block size in disk is 15 bytes. What is the maximum and minimum fragmentation seen in bytes?
A. 25 and 5
B. 15 and 5
C. 15 and 0
D. 10 and 0
Answer: D. 10 and 0.
A 5-byte record leaves 15 - 5 = 10 bytes, the maximum. A 10-byte record leaves 5 bytes. A 25-byte record fills one 15-byte block, giving 0 fragmentation there, then uses 10 bytes of a second block and leaves 5. The observed maximum is 10 bytes and minimum is 0. Full solution for Question 2.
File allocation MCQs 3-4: external fragmentation and indexed storage
Question 3
GATE 2017
In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?
I. Contiguous II. Linked III. Indexed
A. I and III only
B. II only
C. III only
D. II and III only
Answer: D. II and III only.
Contiguous allocation needs one adjacent run. Free runs of 3, 2 and 4 blocks total 9, but none holds a 5-block file. Linked and indexed allocation can select any five free blocks, so neither depends on a contiguous hole. Full solution for Question 3.
Question 4
UGC NET 2023
Indexed / grouped allocation is useful as :
(A) It supports both sequential and direct access.
(B) Entire block is available for data.
(C) It does not require lots of space for keeping pointers.
(D) No external fragmentation.
Choose the correct answer from the options given below :
A. (A) Only
B. (B) and (C) Only
C. (B) Only
D. (A), (B) and (D) Only
Answer: D. (A), (B) and (D) Only.
An index supports sequential traversal and direct lookup, so (A) is true. Data blocks do not carry next-block pointers, so (B) is true. The separate index stores addresses and can become large, making (C) false. Scattered data blocks make (D) true. In the example, index block 9 stores six addresses while the targets retain their data area. Full solution for Question 4.
File allocation MCQs 5-6: i-node capacity and indexed I/O
Question 5
UGC NET 2020
Suppose you have a Linux file system where the block size is 2K bytes, a disk address is 32 bits, and an i-node contains the disk addresses of the first 12 direct blocks of file, a single indirect block and a double indirect block. Approximately, what is the largest file that can be represented by an i-node?
A. 513 Kbytes
B. 513 Mbytes
C. 537 Mbytes
D. 537 Kbytes
Answer: B. 513 Mbytes.
A 32-bit address is 4 bytes, so a 2 KB = 2048-byte indirect block holds 2048 / 4 = 512 addresses. The i-node reaches 12 direct blocks, 512 single-indirect blocks, and 512 x 512 = 262,144 double-indirect blocks. Total data blocks are 12 + 512 + 262,144 = 262,668. Capacity is 262,668 x 2048 = 537,944,064 bytes. In binary units, 537,944,064 / 1,048,576 = 513.02 Mbytes, approximately 513 Mbytes. Full solution for Question 5.
Question 6
UGC NET 2016
Consider a file currently consisting of 50 blocks. Assume that the file control block and the index block is already in memory. If a block is added at the end (and the block information to be added is stored in memory), then how many disk I/O operations are required for indexed (single-level) allocation strategy ?
A. 1
B. 101
C. 27
D. 0
Answer: A. 1.
The file control block and index block need no reads because they are in memory. Writing the new data block costs 1 disk I/O; updating the in-memory index adds none. An explicitly required immediate metadata write-back would change the count, but this item does not include it. Full solution for Question 6.
File allocation MCQs 7-8: linked updates and direct-access arithmetic
Question 7
UGC NET 2015
In _____ allocation method for disk block allocation in a file system, insertion and deletion of blocks in a file is easy.
A. Index
B. Linked
C. Contiguous
D. Bit Map
Answer: B. Linked.
In 7 -> 19 -> 4 -> 31 -> 12 -> 26, insert block 55 by pointing 4 to 55 and 55 to 31. Delete it by pointing 4 back to 31. No later data block moves. Contiguous allocation may require relocation. A bitmap tracks free space, not file allocation. Full solution for Question 7.
Question 8
MPPSC Assistant Professor 2025
A direct-access file system uses blocks of size 4 KB. Each logical record is 512 bytes. What is the block number for the logical record numbered 235?
A. 29
B. 30
C. 31
D. 32
Answer: B. 30.
A 4 KB block holds 4096 / 512 = 8 records. With one-based numbering, compute ceil(235 / 8) = ceil(29.375) = 30. Boundary check: record 232 = 29 x 8 ends block 29, while records 233-240 occupy block 30. Full solution for Question 8.
File allocation MCQs 9-10: descriptor reach and advance sizing
Question 9
GATE 2012
A file system with 300 Gbyte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
A. 3 Kbytes
B. 35 Kbytes
C. 280 Bytes
D. Dependent on the size of the disk
Answer: B. 35 Kbytes.
One pointer block holds 128 / 8 = 16 addresses. Direct reach is 8 x 128 = 1,024 bytes = 1 KB. Single-indirect reach is 16 x 128 = 2,048 bytes = 2 KB. Double-indirect reach is 16 x 16 x 128 = 32,768 bytes = 32 KB. Total reach is 1 + 2 + 32 = 35 KB. The 300 Gbyte disk is a distractor because descriptor reach is the limit. Full solution for Question 9.
Question 10
LTI Mindtree 2023
In which allocation method does the user size the file before creating the file?
A. Contiguous
B. Linked
C. Indexed
D. None of the these
Answer: A. Contiguous.
Contiguous allocation needs the length when its adjacent extent is selected. Declaring 6 blocks reserves 40-45. If the file later needs eight blocks but 46-47 are occupied, it cannot grow in place. Linked and indexed files can add scattered blocks by updating links or index entries. Full solution for Question 10.
Turn the ten answers into a file-allocation revision routine
Trigger | Rule to recall | Questions |
|---|---|---|
Block size | Throughput versus internal fragmentation | 1-2 |
Contiguous requirement | Adjacent run and external fragmentation | 3 and 10 |
Index block | Direct access plus pointer-space cost | 4 and 6 |
Addresses per block | Block size divided by pointer size | 5 and 9 |
Logical record location | Ceiling division, then a boundary check | 8 |
Redo Questions 2, 5, 8 and 9 without the options. Write units beside every intermediate value and test one boundary. Then use File Systems & Allocation MCQs (GATE OS) for the broader mix of allocation, directory operations, swap space and disk fragmentation; this set stays focused on file-block placement, pointer reach and access arithmetic. Use Disk Scheduling MCQs: FCFS, SSTF, SCAN for the next storage-management drill.
Continue with GATE Guidance by Sanchit Sir for a sequenced Operating Systems route, then use the GATE Test Series for timed practice.
Keep learning

Segmentation and Hybrid MCQs: 10 Solved OS Questions with Explanations
Solve ten memory-management MCQs, then check the keyed answers, short reasoning paths, distractor traps, and worked address calculations.

Paging and TLB MCQs: 12 Solved Questions with Step-by-Step Explanations
Solve 12 Paging and TLB MCQs in a sequence that builds from page-table basics to address splits, TLB coverage, timing and fragmentation.

OS Types & Evolution MCQs: 12 Solved Questions with Explanations
Solve 12 published OS Types & Evolution questions. Each answer identifies the clue that separates batch, multiprogramming, time sharing and other OS models.

Multilevel Paging MCQs: 12 Solved Questions with Explanations
Solve 10 MCQs and two NATs on multilevel paging. Each answer works through the address bits, table capacity or access-time path that decides the result.