HomeSubjectsUniversityBlogAbout

File Systems

Topic in Operating Systems

210 total MCQsShowing 30 with explanations10 Easy10 Medium10 Hard

About This Topic

A file system is the part of an operating system that organises data into named files and directories and controls how they are accessed and protected. MCQs test file attributes and operations, sequential versus direct access, and directory structures from single-level to tree and acyclic-graph designs, including hard and soft links. Allocation methods are a staple: contiguous, linked (with the FAT variant) and indexed allocation, plus inode layouts using direct, single, double and triple indirect blocks. Free-space tracking with bitmaps or linked lists, journaling for crash consistency, mounting, and comparisons of FAT32, NTFS and ext4 extents also appear.

Below are 30 practice questions from a pool of 210 File Systems MCQs, one of 12 topics in Operating Systems. Each shows the correct answer with an explanation; when you are ready, take a timed quiz to test recall under exam conditions.

Practice Questions

Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.

File SystemsEasy

Q1. A file is:

  1. A.A physical storage device like a hard drive
  2. B.A hardware component on the computer motherboard
  3. C.A type of process running in the operating system
  4. D.A named collection of data on secondary storage✓ Correct

Explanation

A file is a named collection of related information recorded on secondary storage. It is the smallest logical storage unit and can contain programs, data, text, images, etc.

Report an error in this question

File SystemsEasy

Q2. A symbolic (soft) link is:

  1. A.A compressed version of original file
  2. B.A file containing path to another file✓ Correct
  3. C.A full copy of the original source file
  4. D.The same as a hard link to a file

Explanation

A symbolic link is a special file that contains the pathname of another file. Unlike hard links, symbolic links can cross file system boundaries and can point to directories.

Report an error in this question

File SystemsMedium

Q3. A tree-structured directory organizes files in:

  1. A.A randomly organized structure
  2. B.A flat single-level structure
  3. C.A hierarchical parent-child structure✓ Correct
  4. D.A circular connected structure

Explanation

A tree-structured directory allows users to create subdirectories to organize files hierarchically. Each file has a unique path from the root, and efficient searching is possible.

Report an error in this question

File SystemsMedium

Q4. Direct access (random access) to a file means:

  1. A.Reading or writing any block directly without prior reads✓ Correct
  2. B.Reading the file sequentially from start to end
  3. C.Accessing the file at random without any specific pattern
  4. D.Accessing the file exclusively through the OS kernel layer

Explanation

Direct (random) access allows reading or writing any block of a file directly by specifying the block number, without needing to read all preceding blocks. Databases commonly use this access method.

Report an error in this question

File SystemsHard

Q5. What is a journaling file system and how does it improve reliability?

  1. A.Logs changes to journal before applying for crash recovery✓ Correct
  2. B.A read-only file system that never allows modifications
  3. C.A file system that keeps a diary of user activities
  4. D.A file system that journals all network activity on disk

Explanation

A journaling file system writes metadata (and optionally data) changes to a journal (log) before writing them to their final location. After a crash, the journal is used to replay committed or discard incomplete transactions.

Report an error in this question

File SystemsEasy

Q6. A hard link in UNIX:

  1. A.Creates a complete copy of the original file
  2. B.Links to a file located on another disk drive
  3. C.Creates a shortcut file with a different path
  4. D.Creates another entry pointing to same inode✓ Correct

Explanation

A hard link creates another directory entry that points to the same inode as the original file. Both names are equally valid and the file is deleted only when all hard links are removed.

Report an error in this question

File SystemsEasy

Q7. FAT (File Allocation Table) file system uses:

  1. A.Inodes for each file entry
  2. B.A table of linked block lists✓ Correct
  3. C.Hash tables for fast lookup
  4. D.B-trees for indexing entries

Explanation

FAT uses a table in which each entry corresponds to a disk block and contains the number of the next block in the file, forming a linked list of blocks for each file.

Report an error in this question

File SystemsMedium

Q8. Access control lists (ACLs) in file systems provide:

  1. A.File versioning for tracking changes over time
  2. B.File data encryption for security and privacy
  3. C.File data compression for saving disk space
  4. D.Fine-grained permissions for users and groups✓ Correct

Explanation

ACLs allow fine-grained control over file access by specifying permissions (read, write, execute) for individual users and groups, going beyond the basic owner/group/others model.

Report an error in this question

File SystemsEasy

Q9. File system mounting is the process of:

  1. A.Deleting a file system from a partition
  2. B.Compressing a file system for archiving
  3. C.Creating a new file system on disk
  4. D.Making a file system accessible at a point✓ Correct

Explanation

Mounting attaches a file system to a specific point (mount point) in the existing directory tree, making its contents accessible through that location.

Report an error in this question

File SystemsMedium

Q10. Free space on disk can be managed using:

  1. A.Only the FAT table for tracking
  2. B.Only bit vectors for tracking
  3. C.Only linked lists for tracking
  4. D.Bit vectors, lists, or counting✓ Correct

Explanation

Free space management methods include: bit vector (bitmap, one bit per block), linked list (linking all free blocks), grouping (storing addresses of free blocks in groups), and counting (storing start + count of contiguous free blocks).

Report an error in this question

File SystemsMedium

Q11. NTFS (New Technology File System) is primarily used by:

  1. A.Linux
  2. B.macOS
  3. C.Android
  4. D.Windows✓ Correct

Explanation

NTFS is the primary file system used by Windows operating systems. It supports features like access control lists (ACLs), journaling, encryption, compression, and large file sizes.

Report an error in this question

File SystemsMedium

Q12. An acyclic-graph directory structure allows:

  1. A.Only one single link per file in the system
  2. B.Circular file references between directories
  3. C.No file sharing between any user accounts
  4. D.Sharing files via links while preventing cycles✓ Correct

Explanation

An acyclic-graph directory allows sharing of files and subdirectories through links (hard or symbolic) while ensuring no cycles exist, preventing infinite loops during directory traversal.

Report an error in this question

File SystemsMedium

Q13. ext4 is:

  1. A.A database system format
  2. B.The default Linux file system✓ Correct
  3. C.A Windows file system format
  4. D.A macOS file system format

Explanation

ext4 (Fourth Extended Filesystem) is the default file system for most Linux distributions. It supports journaling, large files/volumes, extents, and backward compatibility with ext2/ext3.

Report an error in this question

File SystemsEasy

Q14. A directory in a file system:

  1. A.Is the same as a disk partition or volume
  2. B.Contains file info like names and locations✓ Correct
  3. C.Is a file type that stores only text content
  4. D.Stores raw data directly on the disk surface

Explanation

A directory is a special file that contains entries mapping file names to their metadata (attributes, location on disk). It provides a way to organize files in a hierarchical structure.

Report an error in this question

File SystemsEasy

Q15. The absolute path of a file starts from:

  1. A.The root directory✓ Correct
  2. B.The home directory
  3. C.The current directory
  4. D.The parent directory

Explanation

An absolute path specifies the complete path from the root directory to the file, providing a unique identifier for the file regardless of the current working directory.

Report an error in this question

File SystemsEasy

Q16. An inode in UNIX/Linux file systems stores:

  1. A.Metadata: permissions, size, pointers✓ Correct
  2. B.The actual file content data itself
  3. C.The file name string value
  4. D.The directory name for this entry

Explanation

An inode (index node) stores file metadata including permissions, owner, group, size, timestamps, and pointers to the data blocks on disk. The file name is stored in the directory entry, not the inode.

Report an error in this question

File SystemsEasy

Q17. File attributes typically include:

  1. A.Name, type, size, location, timestamps✓ Correct
  2. B.Only the file creation date stored
  3. C.Only the file size in bytes stored
  4. D.Only the file name string value

Explanation

File attributes include name, identifier, type, location, size, protection/permissions, timestamps (creation, modification, access), and owner information.

Report an error in this question

File SystemsMedium

Q18. File system consistency checking is needed because:

  1. A.Users make frequent file handling errors
  2. B.Files grow too large for disk capacity
  3. C.Hardware never fails in normal practice
  4. D.A crash during ops leaves inconsistent state✓ Correct

Explanation

If the system crashes during file operations (while updating metadata or data), the file system can be left in an inconsistent state. Tools like fsck or chkdsk check and repair these inconsistencies.

Report an error in this question

File SystemsEasy

Q19. Which file access method reads records in order, one after another?

  1. A.Random access
  2. B.Indexed access
  3. C.Sequential access✓ Correct
  4. D.Direct access

Explanation

Sequential access reads data in order, one record after another. It is the simplest and most common access method, used by text editors and compilers.

Report an error in this question

File SystemsMedium

Q20. What is the difference between contiguous, linked, and indexed file allocation?

  1. A.They only differ in the speed of read and write operations
  2. B.Contiguous uses adjacent; linked chains; indexed uses pointers✓ Correct
  3. C.They only differ in the security settings for file access
  4. D.They are all identical in behavior and performance

Explanation

Contiguous allocation places files in consecutive blocks (fast but causes fragmentation). Linked allocation chains blocks together (no fragmentation but slow random access). Indexed allocation uses an index block pointing to all data blocks.

Report an error in this question

File SystemsMedium

Q21. What is the Virtual File System (VFS) layer?

  1. A.An abstraction for uniform file system interface✓ Correct
  2. B.A file system stored in virtual memory
  3. C.A compressed file system saving disk space
  4. D.A file system designed for virtual machines

Explanation

VFS provides a common interface (open, read, write, close) that abstracts the differences between various file system implementations (ext4, NTFS, FAT), allowing uniform file operations.

Report an error in this question

File SystemsHard

Q22. How do UNIX file systems handle files larger than what direct block pointers in an inode can address?

  1. A.By splitting the file into multiple smaller separate files
  2. B.Using indirect, double indirect, and triple indirect pointers✓ Correct
  3. C.They cannot handle files larger than direct pointers allow
  4. D.By compressing the file data to reduce total block count

Explanation

UNIX inodes use multi-level indexing: direct pointers for small files, single indirect pointers (point to a block of pointers), double indirect (pointer to block of pointers to blocks of pointers), and triple indirect for very large files.

Report an error in this question

File SystemsHard

Q23. What is file system defragmentation and why is it needed?

  1. A.Checking file system integrity and repairing errors
  2. B.Breaking files into smaller fragments for storage
  3. C.Deleting all fragmented files from the disk drive
  4. D.Reorganizing blocks to be contiguous for performance✓ Correct

Explanation

Defragmentation reorganizes fragmented files so their blocks are stored contiguously on disk. This improves sequential read performance on HDDs by reducing seek time. It is less important for SSDs.

Report an error in this question

File SystemsHard

Q24. What is a RAID system and what is its purpose?

  1. A.A debugging tool for disk diagnostics
  2. B.A memory management technique for allocation
  3. C.Multiple disks combined for performance or reliability✓ Correct
  4. D.A type of file system for special purposes

Explanation

RAID combines multiple physical disks into a logical unit using techniques like striping (performance), mirroring (reliability), and parity (both) at various RAID levels (0, 1, 5, 6, 10, etc.).

Report an error in this question

File SystemsHard

Q25. What is a log-structured file system (LFS)?

  1. A.Writes all data sequentially to a log for write speed✓ Correct
  2. B.A file system that only stores system log files
  3. C.A file system with built-in logging capability
  4. D.A file system used only for system log storage

Explanation

LFS treats the disk as a circular log and writes all data and metadata sequentially. This optimizes write performance by converting random writes to sequential writes, but complicates reads and requires garbage collection.

Report an error in this question

File SystemsHard

Q26. What is the Network File System (NFS)?

  1. A.A database for networked storage
  2. B.A firewall for file server protection
  3. C.A local file system for one machine
  4. D.A protocol for remote files as local✓ Correct

Explanation

NFS is a distributed file system protocol that allows a client to access files on a remote server over a network as if they were on the local filesystem, providing transparent remote file access.

Report an error in this question

File SystemsHard

Q27. What is the buffer cache in file system implementation?

  1. A.A buffer used for printer output spooling
  2. B.Memory caching disk blocks to reduce I/O ops✓ Correct
  3. C.A buffer used for storing network packet data
  4. D.A cache for graphical user interface buffers

Explanation

The buffer cache (or page cache in Linux) keeps recently accessed disk blocks in memory. Subsequent accesses to those blocks can be served from memory instead of disk, dramatically improving performance.

Report an error in this question

File SystemsHard

Q28. In UNIX, what is the purpose of the superblock?

  1. A.To store the largest file in the system
  2. B.To store file system metadata like size and counts✓ Correct
  3. C.To speed up file access through data caching
  4. D.To store user passwords and authentication info

Explanation

The superblock contains essential metadata about the file system: its size, block size, number of free blocks and inodes, free block/inode lists, and other configuration parameters. Losing the superblock can make the file system unmountable.

Report an error in this question

File SystemsHard

Q29. What are extents in modern file systems like ext4?

  1. A.Extra storage space added to disk
  2. B.External file links to other systems
  3. C.Contiguous block range by start and length✓ Correct
  4. D.Extended file attributes for metadata

Explanation

An extent describes a contiguous range of blocks using just a starting block number and length, instead of listing each block individually. This reduces metadata size and improves performance for large files.

Report an error in this question

File SystemsHard

Q30. What is a copy-on-write file system like ZFS or Btrfs?

  1. A.Never overwrites data; writes to new locations always✓ Correct
  2. B.A file system that prevents all write operations
  3. C.A file system that duplicates all data for safety
  4. D.A file system that copies files when writing to disk

Explanation

Copy-on-write file systems never overwrite existing data. Modified blocks are written to new locations, and metadata is updated to point to new blocks. This enables efficient snapshots and maintains consistency.

Report an error in this question

Ready to test yourself on File Systems?

Take a timed quiz drawn from 210+ questions on this topic. No signup required — your progress saves in your browser.

Start File Systems Quiz