File Systems Question Bank for C-CAT
Topic-wise File Systems MCQs for CDAC C-CAT preparation with answers and explanations.
Show Answer & Explanation
Correct Answer: C - Linked allocation
FAT uses linked allocation with a table storing links.
Show Answer & Explanation
Correct Answer: D - File metadata (permissions, pointers)
Inode stores file metadata: permissions, size, pointers to data blocks.
Show Answer & Explanation
Correct Answer: A - Special file containing file entries
Directory is a special file that contains entries for files and subdirectories.
Show Answer & Explanation
Correct Answer: D - Bit vector/Linked list
Free space tracked using bit vector, linked list, or grouping.
Show Answer & Explanation
Correct Answer: A - External fragmentation
Contiguous allocation suffers from external fragmentation.
Show Answer & Explanation
Correct Answer: B - Index block with pointers
Indexed allocation uses an index block containing pointers to data blocks.
Show Answer & Explanation
Correct Answer: B - Elevator algorithm
SCAN moves like an elevator from one end to another.
Show Answer & Explanation
Correct Answer: D - Shortest Seek Time First
SSTF services request closest to current head position.
Show Answer & Explanation
Correct Answer: C - Hard link shares inode, soft link is pointer
Hard link shares inode (same file). Soft link is pointer to file path.
Show Answer & Explanation
Correct Answer: B - Logs changes for crash recovery
Journaling logs transactions to recover from crashes.
Show Answer & Explanation
Correct Answer: B - Sequential, Direct, and Indexed
Files can be accessed sequentially, directly (random), or through indexed methods.
Show Answer & Explanation
Correct Answer: C - Redundant Array of Independent Disks
RAID combines multiple disks for redundancy and/or performance improvement.
Show Answer & Explanation
Correct Answer: C - Striping without redundancy
RAID 0 stripes data across disks for performance but provides no redundancy.
Show Answer & Explanation
Correct Answer: C - Mirroring for redundancy
RAID 1 mirrors data across disks for redundancy.
Show Answer & Explanation
Correct Answer: B - Code to boot the operating system
Boot block contains the code needed to start and load the operating system.
Show Answer & Explanation
Correct Answer: A - Scans in one direction only, jumps back
C-LOOK services requests in one direction, then jumps to start without servicing.
Show Answer & Explanation
Correct Answer: C - Time to move head to correct track
Seek time is the time taken to move the disk head to the correct track.
Show Answer & Explanation
Correct Answer: B - Time for disk sector to rotate under head
Rotational latency is the time for the desired sector to rotate under the head.
Show Answer & Explanation
Correct Answer: D - Bit vector or linked list
Free blocks are tracked using bit vectors, linked lists, or grouping methods.
Show Answer & Explanation
Correct Answer: B - File system metadata (size, block count, etc.)
Superblock contains file system metadata like size, number of blocks, and inodes.
Show Answer & Explanation
Correct Answer: B - Linked allocation
Linked allocation stores each file as a linked list of disk blocks scattered anywhere on the disk. Each block contains a pointer to the next block. It eliminates external fragmentation but doesn't support direct access.
Show Answer & Explanation
Correct Answer: D - Simple and supports both sequential and direct access efficiently
Contiguous allocation stores files in consecutive disk blocks, allowing simple implementation and efficient sequential and direct access. However, it suffers from external fragmentation and difficulty in file growth.
Show Answer & Explanation
Correct Answer: D - A data structure that stores metadata about a file (size, permissions, pointers to data blocks)
An inode (index node) is a data structure in Unix/Linux file systems that stores metadata about a file: file size, ownership, permissions, timestamps, and pointers to the data blocks. It does not store the filename.
Show Answer & Explanation
Correct Answer: D - SSTF (Shortest Seek Time First)
SSTF (Shortest Seek Time First) selects the I/O request closest to the current position of the disk head, minimizing seek time for each individual request. However, it may cause starvation for distant requests.
Show Answer & Explanation
Correct Answer: A - The disk arm moves in one direction servicing requests, then reverses direction
SCAN (elevator algorithm) moves the disk arm in one direction, servicing all requests along the way until it reaches the end of the disk, then reverses direction and services requests on the return trip.
Show Answer & Explanation
Correct Answer: A - Each file has an index block containing pointers to all its data blocks
Indexed allocation assigns an index block to each file. The index block contains pointers to all the data blocks of the file. This supports direct access without external fragmentation.
Show Answer & Explanation
Correct Answer: C - A special type of file that contains information about other files
A directory is a special file that contains a list of entries mapping file names to their metadata (such as inode numbers in Unix). It provides a way to organize and locate files in the file system.
Show Answer & Explanation
Correct Answer: C - A hard link points to the inode; a soft link points to the file path
A hard link is a direct reference to the inode of a file — both names share the same inode. A soft (symbolic) link is a separate file that contains the path to the target file. Hard links can't cross file systems; soft links can.
Show Answer & Explanation
Correct Answer: D - A file system that uses a table to track which clusters belong to which files
FAT (File Allocation Table) is a file system that maintains a table mapping each cluster on the disk. Each entry in the table indicates the next cluster of a file or marks a cluster as free, end-of-file, or bad.
Show Answer & Explanation
Correct Answer: D - The disk arm moves in one direction servicing requests, then returns to the beginning without servicing requests
C-SCAN (Circular SCAN) moves the disk arm in one direction servicing requests. When it reaches the end, it returns to the beginning of the disk without servicing requests, then starts again. It provides more uniform wait times.
Show Answer & Explanation
Correct Answer: B - A data structure containing information about a file (permissions, size, location)
A File Control Block (FCB) is a data structure maintained by the OS for each file. It contains file attributes such as name, type, size, location, permissions, and dates. In Unix, the inode serves as the FCB.
Show Answer & Explanation
Correct Answer: A - To store metadata about the file system itself (size, block count, free blocks, inode count)
The superblock contains critical metadata about the file system: total size, block size, total and free block counts, total and free inode counts, and the location of the inode table. Corruption of the superblock can destroy the file system.
Show Answer & Explanation
Correct Answer: B - Tree-structured directory
A tree-structured directory organizes files in a hierarchical tree where each directory can contain files and subdirectories. Most modern file systems use this structure (e.g., /home/user/documents).
Show Answer & Explanation
Correct Answer: C - Recording changes in a log before applying them to the file system for crash recovery
Journaling records intended file system changes in a log (journal) before applying them. If the system crashes during an operation, the journal can be used to recover the file system to a consistent state.
Show Answer & Explanation
Correct Answer: B - 640
FCFS processes requests in order: |53-98| + |98-183| + |183-37| + |37-122| + |122-14| + |14-124| + |124-65| + |65-67| = 45 + 85 + 146 + 85 + 108 + 110 + 59 + 2 = 640 cylinders.
Show Answer & Explanation
Correct Answer: A - Like SCAN but the arm reverses when there are no more requests in that direction
LOOK is similar to SCAN, but instead of going all the way to the end of the disk, the arm reverses direction when there are no more requests in the current direction. This reduces unnecessary head movement.
Show Answer & Explanation
Correct Answer: C - No support for direct (random) access and overhead of pointers
Linked allocation does not support direct (random) access efficiently because accessing the nth block requires traversing all previous blocks. Also, space is wasted in each block for storing the pointer to the next block.
Show Answer & Explanation
Correct Answer: C - To rearrange fragmented data so that files are stored in contiguous blocks
Disk defragmentation rearranges the data on a disk so that files are stored in contiguous blocks, improving read/write performance by reducing seek time. It is mainly beneficial for HDDs, not SSDs.
Show Answer & Explanation
Correct Answer: D - A directory where a file system is attached to the directory tree
A mount point is a directory in the existing file system where a new file system (from a partition, disk, or network share) is attached and made accessible. For example, /mnt/usb is a common mount point.
Show Answer & Explanation
Correct Answer: D - Combining multiple disks for improved performance, reliability, or both
RAID combines multiple physical disks into a logical unit to improve performance (through striping), reliability (through mirroring/parity), or both. Common levels include RAID 0, 1, 5, 6, and 10.
Show Answer & Explanation
Correct Answer: B - RAID 0 stripes data across disks (no redundancy); RAID 1 mirrors data (full redundancy)
RAID 0 stripes data across multiple disks for better performance but provides no redundancy (one disk failure loses all data). RAID 1 mirrors data across disks for full redundancy (can survive one disk failure).
Show Answer & Explanation
Correct Answer: A - To specify detailed permissions for each user or group on a file or directory
ACLs provide fine-grained access control by specifying permissions for individual users or groups on each file or directory, going beyond the traditional owner/group/others permission model.
Show Answer & Explanation
Correct Answer: A - Owner: read/write/execute, Group: read/execute, Others: read only
rwxr-xr-- means: Owner has read, write, and execute (rwx); Group has read and execute (r-x); Others have read only (r--). In octal, this is 754.
Show Answer & Explanation
Correct Answer: A - The fourth extended file system, commonly used in Linux with features like journaling and large file support
ext4 (Fourth Extended File System) is a widely used Linux file system that supports journaling, large file sizes (up to 16 TB), large volumes (up to 1 EB), extents-based allocation, and backward compatibility with ext3/ext2.
Show Answer & Explanation
Correct Answer: A - The smallest unit of data that can be read from or written to a disk by the file system
A block (or cluster in FAT) is the smallest unit of disk space that the file system allocates. Common block sizes are 1 KB, 2 KB, or 4 KB. Even if a file is smaller than a block, one full block is allocated.
Show Answer & Explanation
Correct Answer: A - To open a file and return a file descriptor for subsequent read/write operations
The open() system call opens a file and returns a file descriptor — a small integer used by the process to refer to the file in subsequent read(), write(), and close() operations.
Show Answer & Explanation
Correct Answer: D - New Technology File System, the primary file system for Windows with features like journaling, ACLs, and encryption
NTFS (New Technology File System) is the primary file system for Windows. It supports journaling, access control lists (ACLs), file compression, encryption (EFS), disk quotas, and large file sizes.
Show Answer & Explanation
Correct Answer: B - Sequential access reads data in order; direct access can read any block without reading preceding blocks
Sequential access reads data in order from beginning to end (like a tape). Direct (random) access can read or write any block directly by specifying its position, without accessing preceding blocks (like a disk).
Show Answer & Explanation
Correct Answer: C - An abstraction layer that provides a common interface for different file system implementations
VFS (Virtual File System) is an abstraction layer in the OS that provides a uniform interface for different file system types (ext4, NTFS, FAT, etc.). Applications use the same system calls regardless of the underlying file system.
Show Answer & Explanation
Correct Answer: A - Tracking which disk blocks are available for allocation using techniques like bit vectors or linked lists
Free space management tracks available disk blocks. Common methods include bit vector (bitmap) where each bit represents a block (0=free, 1=allocated), and linked lists where free blocks are linked together.