📝 Introduction to Storage Management in Operating Systems (30 MCQs)
Storage Hierarchy and Persistent Data Organisation
Storage management controls how an operating system organises, accesses, allocates, and retrieves data across storage devices. The storage hierarchy includes CPU registers, caches, main memory, solid-state drives, hard disks, and archival media, arranged according to capacity, speed, and cost. The operating system manages persistent storage through device drivers, block interfaces, file systems, and allocation mechanisms.
Why Systems Need Multiple Storage Technologies
No single storage technology provides the highest speed, largest capacity, lowest cost, and persistence simultaneously. Main memory offers fast access but is generally volatile, whereas secondary storage retains information without continuous power. The operating system bridges these differences by managing transfers, caching frequently accessed information, allocating storage space, and organising persistent files for reliable application access.
Block Devices, I/O Scheduling, and File Allocation
Block devices transfer data in addressable units, allowing the kernel to request reads and writes through storage drivers. A file system maps logical file contents to allocated storage blocks and maintains metadata describing files and directories. I/O scheduling may reorder pending requests to reduce access delays, while caching and buffering help coordinate transfers between applications and physical devices.
Following a File Write to Secondary Storage
Suppose an application writes 8 KiB to a file. The kernel passes the data through file-system and storage layers, which identify the required blocks and prepare write requests. Data may initially enter a cache before reaching the device. A subsequent synchronization operation requests the necessary write-back, subject to the file system and device's persistence guarantees.
Storage Performance, Reliability, and Allocation Constraints
Storage management affects application latency, throughput, capacity utilisation, and data reliability. Caching can avoid repeated physical reads, while efficient allocation reduces wasted space and unnecessary access operations. Fragmentation, slow devices, queue congestion, and write endurance in flash storage impose limitations. File-system consistency mechanisms and appropriate backup strategies address different aspects of data protection and recovery.
Misconceptions About Storage and File Operations
'Every successful write() immediately guarantees physical persistence' is incorrect because data may remain in volatile caches. 'A file system and a storage device are identical' is incorrect because the file system organises data on a storage medium. 'Secondary storage is always slower in every operation' is incorrect because performance varies by technology, workload, and access pattern.
Exam Focus: Storage Hierarchy and Block Management
Be able to compare storage technologies by speed, capacity, volatility, and cost. Trace a file read or write through the system-call, file-system, cache, driver, and device layers. Questions may involve block allocation, buffering, caching, disk scheduling, fragmentation, persistence, and the difference between logical files and physical storage blocks.
Key Terms of Storage Management
- Secondary storage - Persistent data storage medium.
- Block device - Device transferring addressable data blocks.
- File system - Organises files and directories.
- Buffering - Temporarily holds data during transfers.
- Caching - Retains frequently accessed data.
- Persistence - Survival of data after power loss.
📝 All Introduction to Storage Management in Operating Systems MCQs
Q1. A storage controller exposes fixed-size blocks, and an application can request block 900 without reading earlier blocks. How should this device normally be classified?
📖 Explanation: A block device exposes addressable fixed-size blocks and supports direct access to selected blocks. The tempting character-device option describes a byte stream without block-oriented random access, so it does not match this interface.
Q2. A magnetic disk has several platters with recording surfaces. Tracks at the same radial position across the surfaces form which structure?
📖 Explanation: A cylinder consists of tracks at the same radial position on different recording surfaces. The tempting sector option is only a subdivision of a track, not the vertically aligned collection of tracks.
Q3. A hard disk reports a long delay before transferring data because its actuator must move the read/write head to the requested track. Which component of access time is responsible?
📖 Explanation: Seek time is the time required to position the disk head over the requested track. The tempting rotational-latency option measures waiting for the sector to rotate beneath the head after positioning is complete.
Q4. A magnetic disk rotates at 7200 revolutions per minute. Assuming requests arrive uniformly over a rotation, what is its average rotational latency?
📖 Explanation: One revolution takes seconds, or 8.33 ms. Average rotational latency is half a revolution, approximately 4.17 ms; the tempting 8.33 ms is a full rotation, not the average wait.
Q5. A scientific application frequently reads consecutive blocks and also jumps directly to selected blocks in a large file. Which file-allocation method most directly supports both efficient sequential and direct access?
📖 Explanation: Contiguous allocation places a file's blocks together, supporting efficient sequential transfer and direct calculation of block locations. The tempting linked-allocation option supports sequential traversal well but requires following pointers for arbitrary access.
Q6. A file system stores each file block with a pointer to the next block. What is the main limitation of this linked allocation method?
📖 Explanation: Linked allocation supports sequential traversal, but locating an arbitrary block requires following earlier pointers unless additional indexing is maintained. The tempting contiguous-allocation limitation is reversed because linked files need not occupy adjacent blocks.
Q7. A Unix-like file system uses inodes. Which information is normally stored in an inode rather than in the directory entry that names the file?
📖 Explanation: An inode stores file metadata such as ownership, permissions, size, timestamps, and data-block locations. The tempting filename option is wrong because directory entries normally map names to inode numbers rather than storing the name inside the inode itself.
Q8. A volume contains 4096 data blocks and uses a free-space bitmap with one bit per block. How many bytes are required for the bitmap, ignoring metadata?
📖 Explanation: The bitmap needs 4096 bits, one for each block. Dividing by eight gives 512 bytes. The tempting 4096-byte answer counts one byte per block rather than one bit, overstating bitmap storage by a factor of eight.
Q9. A computer's firmware needs to locate the initial code that loads the operating-system kernel from a bootable disk. Which disk structure normally stores this startup code?
📖 Explanation: The boot block contains code used to begin loading the operating system during startup. The tempting free-space bitmap tracks unused disk blocks and does not provide the startup instructions needed to load a kernel.
Q10. A storage array contains two identical disks configured as a mirror. If each disk has 2 TB capacity, what usable data capacity does the mirrored pair provide?
📖 Explanation: Mirroring stores the same data on both disks, so usable capacity equals one disk's capacity: 2 TB. The tempting 4 TB adds both physical capacities, but the duplicate copy is for redundancy rather than extra space.
Q11. A disk head begins at cylinder 50. FCFS services requests in this order: 82, 170, 43, and 140. What is the total head movement?
📖 Explanation: FCFS movement is cylinders. The tempting 294 is incorrect because it omits the long move from cylinder 170 back to cylinder 43; every consecutive pair in the queue must be included.
Q12. A disk head is at cylinder 50, and pending requests are 82, 170, 43, 140, and 24. Under SSTF, which total head movement results when the nearest request is always selected?
📖 Explanation: SSTF visits 43, 24, 82, 140, and 170. Movement is cylinders. The tempting 208 follows a different ordering and does not repeatedly select the nearest pending request at each step in this queue.
Q13. A hard disk rotates at 10,000 revolutions per minute. Assuming a uniform arrival position, what is its average rotational latency?
📖 Explanation: One rotation takes seconds, or 6 ms. Average rotational latency is half that period, giving 3 ms; the tempting 6 ms represents a full revolution rather than the mean wait.
Q14. An administrator divides a new disk into partitions and then creates a file system on one partition. Which statement correctly distinguishes these operations?
📖 Explanation: Partitioning defines logical regions of a physical disk, while logical formatting creates structures such as file-system metadata within a selected region. The tempting identical-task option confuses two separate preparation stages.
Q15. A RAID 5 array contains five disks, each with a capacity of 2 TB. Assuming one disk's worth of distributed parity, what is the usable capacity?
📖 Explanation: RAID 5 reserves capacity equivalent to one disk for distributed parity. Usable capacity is TB; the tempting 10 TB counts parity space as ordinary user data and therefore overstates usable capacity.
Q16. A RAID 6 array uses distributed dual parity across several disks. What failure tolerance does this organization provide under normal operation?
📖 Explanation: RAID 6 stores two independent parity values and can reconstruct data after any two disk failures. The tempting one-failure answer describes single-parity protection such as RAID 5, not dual parity.
Q17. A laptop uses a dedicated swap partition. Its physical memory becomes heavily occupied, so the operating system moves some inactive memory pages to that partition. What is the primary purpose of the swap area?
📖 Explanation: Swap space provides backing storage for virtual-memory pages that are temporarily moved out of RAM. The tempting permanent-document option confuses memory backing with ordinary file storage and user-managed persistent data.
Q18. A file system uses metadata journaling. The machine loses power during a file update, and the system replays its journal during recovery. What is the main benefit?
📖 Explanation: Metadata journaling records intended metadata changes so recovery can replay or roll back incomplete operations and restore structural consistency. The tempting backup option is wrong because journaling does not replace independent data backups.
Q19. An SSD cannot overwrite an arbitrary flash page without first erasing the larger erase block containing it. What does the controller commonly do when reclaiming space?
📖 Explanation: Flash erasure occurs at block granularity, so the controller may copy valid pages elsewhere before erasing and reusing a block. The tempting page-only erase ignores the larger physical erase unit used by flash memory.
Q20. A storage benchmark records queue depth and throughput: (1, 80 MB/s) ; (2, 140 MB/s) ; (4, 220 MB/s) ; (8, 260 MB/s) ; (16, 250 MB/s). At which queue depth is the measured throughput highest?
📖 Explanation: The highest recorded throughput is 260 MB/s at queue depth eight. Throughput then falls to 250 MB/s at depth sixteen; the tempting sixteen assumes that more queued requests always improve performance.
Q21. A disk has cylinders 0 through 199. The head is at 50 and moving upward. Requests are at 24, 43, 82, 140, and 170. Under SCAN, what total movement occurs if the head travels to the disk's upper end before reversing?
📖 Explanation: SCAN moves from 50 to 199, then reverses toward cylinder 0: cylinders. The tempting 324 corresponds to stopping at the last request rather than reaching the physical end as SCAN requires.
Q22. A disk head is at cylinder 50 and moves upward. Pending requests are 24, 43, 82, 140, and 170. Using C-LOOK, what total movement results, including the circular jump?
📖 Explanation: C-LOOK services 82, 140, and 170, jumps to 24, then services 43. Movement is cylinders. The tempting SCAN total includes travel to a physical disk boundary, which C-LOOK does not visit.
Q23. A RAID 5 array stores data bytes D0=10110010 and D1=01101001. Its parity byte is calculated using bitwise XOR. What parity byte is produced?
📖 Explanation: RAID 5 parity is the bitwise XOR of the data bytes: . The tempting all-ones option incorrectly assumes every differing bit produces a one without checking each bit position.
Q24. A disk has 8 recording surfaces, 10,000 cylinders, 100 sectors per track, and 512 bytes per sector. Assuming every track has the stated number of sectors, what is its raw capacity in decimal bytes?
📖 Explanation: Capacity is surfaces times cylinders times sectors per track times bytes per sector: bytes. The tempting 40.96 billion multiplies by an extra factor of ten.
Q25. A disk request requires 6 ms of seek time. The disk rotates at 7200 rpm, and transferring the requested data takes 10 ms. Ignoring controller overhead, what is the expected total access time using average rotational latency?
📖 Explanation: A 7200-rpm disk has average rotational latency ms. Total time is ms. The tempting 16.17 milliseconds adds seek and rotational delay only, omitting the specified data transfer time.
Q26. A free-space bitmap uses one bit per disk block, with block numbers starting at zero and bit 0 defined as the least-significant bit in each byte. Which byte index and bit position identify block 1000?
📖 Explanation: For block 1000, , so the byte index is 125 and the bit position is 0. The tempting byte 124 is an off-by-one result from incorrect division or indexing.
Q27. A 1 MiB file is stored using contiguous allocation with a block size of 4 KiB. How many consecutive data blocks are required?
📖 Explanation: A 1 MiB file contains 1024 KiB. Dividing by 4 KiB per block gives blocks; the tempting 512 doubles the count by incorrectly treating each block as 2 KiB.
Q28. A database uses a write-back storage cache. A transaction updates a cached block, but power fails before the dirty block is flushed to persistent storage. Which outcome is possible?
📖 Explanation: Write-back caching may acknowledge changes before they reach persistent media, so a sudden failure can lose dirty data. The tempting guaranteed-survival option requires protection, such as battery-backed cache or a durable database log.
Q29. An SSD controller distributes writes across physical erase blocks even when the operating system repeatedly updates the same logical block. Which feature is primarily being used?
📖 Explanation: Wear leveling spreads erase and write activity across flash blocks to reduce uneven cell wear and extend device life. The tempting disk-scheduling option orders mechanical head movement, which SSDs do not require.
Q30. A storage server contains four 2 TB disks arranged as RAID 10 using two mirrored pairs striped together. Which statement correctly describes usable capacity and failure tolerance?
📖 Explanation: RAID 10 mirrors two pairs and stripes across them, giving TB usable. It survives one failure in each pair, but losing both members of one pair destroys that pair's data.