You are designing a file system for a cloud storage service where files vary widely in size and random access speed is critical. Which allocation method would you choose and why?
hard🌍 Real-world Scenario Q9 of Q15
Operating Systems - File Allocation Methods - Contiguous, Linked, Indexed
You are designing a file system for a cloud storage service where files vary widely in size and random access speed is critical. Which allocation method would you choose and why?
ALinked allocation, because it handles variable file sizes efficiently and minimizes fragmentation.
BContiguous allocation, because it provides the fastest sequential access for large files.
CIndexed allocation, because it supports efficient random access and flexible file sizes.
DHybrid allocation, combining contiguous for small files and indexed for large files.
Step-by-Step Solution
Solution:
Step 1: Identify key requirements
Variable file sizes and critical random access speed.
Step 2: Evaluate linked allocation
Good for variable sizes but poor random access performance.
Step 3: Evaluate contiguous allocation
Fast sequential access but poor for variable sizes due to fragmentation.
Step 4: Evaluate indexed allocation
Supports flexible file sizes and provides direct block access for fast random reads.
Step 5: Consider hybrid allocation
Complex to implement; indexed alone suffices for requirements.
Final Answer:
Option C -> Option C
Quick Check:
Indexed allocation balances random access and variable file sizes [OK]
Quick Trick:Indexed allocation = flexible size + fast random access [OK]