Order PDF of any content from our website with a little minor Fee to donate for hard work. Online MCQs are fully free but PDF books are paid. For details: contact whatsapp +923028700085 Important notes based PDF Books are available in very little price, starting from 500/-PKR; Order Now: contact whatsapp +923028700085

File-System Internals – MCQs

File-System Internals – MCQs

Q#1: The main purpose of a file system is to:
(A) Execute programs
(B) Organize and manage data on storage devices
(C) Perform network communication
(D) Manage CPU scheduling
Answer: (B) Organize and manage data on storage devices

Q#2: A file is:
(A) A collection of bytes stored on secondary storage
(B) A process in memory
(C) A hardware device
(D) A CPU register
Answer: (A) A collection of bytes stored on secondary storage

Q#3: Which of the following is NOT a file type?
(A) Regular file
(B) Directory
(C) Socket
(D) Thread
Answer: (D) Thread

Q#4: In a file system, a directory is:
(A) A special file containing names of other files and pointers
(B) A program in memory
(C) A type of disk block
(D) A process table
Answer: (A) A special file containing names of other files and pointers

Q#5: Which file system structure maps a file name to its metadata?
(A) Directory structure
(B) File allocation table
(C) Inode table
(D) Superblock
Answer: (A) Directory structure

Q#6: In UNIX, the inode contains:
(A) File metadata such as owner, permissions, timestamps
(B) File name
(C) Disk scheduling policy
(D) Network socket info
Answer: (A) File metadata such as owner, permissions, timestamps

Q#7: Which of the following is stored in an inode?
(A) File size
(B) Creation time
(C) Disk block addresses
(D) All of the above
Answer: (D) All of the above

Q#8: The superblock of a file system stores:
(A) File system metadata such as size, free blocks, root inode
(B) File data
(C) Directory entries
(D) Network information
Answer: (A) File system metadata such as size, free blocks, root inode

Q#9: Which allocation method stores file data in contiguous blocks?
(A) Contiguous allocation
(B) Linked allocation
(C) Indexed allocation
(D) Hybrid allocation
Answer: (A) Contiguous allocation

Q#10: A disadvantage of contiguous allocation is:
(A) External fragmentation
(B) Complex metadata
(C) Slow sequential access
(D) Inefficient indexing
Answer: (A) External fragmentation

Q#11: Linked allocation stores file blocks as:
(A) Pointers to the next block
(B) Contiguous blocks
(C) Indexed array
(D) Directories
Answer: (A) Pointers to the next block

Q#12: A disadvantage of linked allocation is:
(A) Sequential access only
(B) Random access is slow
(C) Requires large contiguous space
(D) Requires a superblock
Answer: (B) Random access is slow

Q#13: Indexed allocation uses:
(A) A separate index block containing addresses of file blocks
(B) Contiguous blocks
(C) Pointers in inodes only
(D) Directories only
Answer: (A) A separate index block containing addresses of file blocks

Q#14: UNIX uses which allocation scheme?
(A) Indexed allocation with inode
(B) Contiguous allocation
(C) Linked allocation
(D) Hybrid allocation
Answer: (A) Indexed allocation with inode

Q#15: The main advantage of indexed allocation is:
(A) Supports direct access efficiently
(B) Avoids external fragmentation
(C) Simple to implement
(D) Works only sequentially
Answer: (A) Supports direct access efficiently

Q#16: Free space in a file system can be tracked using:
(A) Bit vector
(B) Linked list of free blocks
(C) Grouping
(D) All of the above
Answer: (D) All of the above

Q#17: A bit vector for free space requires:
(A) 1 bit per disk block
(B) 1 byte per disk block
(C) 1 inode per file
(D) 1 block per directory
Answer: (A) 1 bit per disk block

Q#18: Linked list method for free space may require:
(A) Accessing multiple blocks sequentially
(B) Random access only
(C) Contiguous allocation
(D) Superblock only
Answer: (A) Accessing multiple blocks sequentially

Q#19: File system mounting is:
(A) Attaching a file system to a directory tree
(B) Deleting a file
(C) Allocating memory
(D) Managing CPU time
Answer: (A) Attaching a file system to a directory tree

Q#20: The root directory is:
(A) The topmost directory in a file system hierarchy
(B) The bottom-most directory
(C) A special hidden file
(D) An inode table
Answer: (A) The topmost directory in a file system hierarchy

Q#21: Sequential access files are accessed:
(A) In order, from beginning to end
(B) Randomly
(C) Using inode
(D) Using superblock only
Answer: (A) In order, from beginning to end

Q#22: Direct access files allow:
(A) Random access of any block
(B) Sequential access only
(C) Only read operations
(D) Only append operations
Answer: (A) Random access of any block

Q#23: File system consistency is ensured by:
(A) Journaling
(B) Sequential access only
(C) Directory tables
(D) Inode allocation
Answer: (A) Journaling

Q#24: Which technique logs changes before committing them?
(A) Journaling
(B) Contiguous allocation
(C) Bit vector
(D) Linked allocation
Answer: (A) Journaling

Q#25: File system caching improves performance by:
(A) Reducing disk I/O
(B) Increasing fragmentation
(C) Slowing access
(D) Reallocating memory
Answer: (A) Reducing disk I/O

Q#26: The difference between soft and hard links in UNIX is:
(A) Soft link points to filename, hard link points to inode
(B) Soft link points to inode, hard link points to filename
(C) No difference
(D) Soft link is faster
Answer: (A) Soft link points to filename, hard link points to inode

Q#27: Which operation updates file metadata like access time?
(A) open()
(B) mkdir()
(C) mount()
(D) stat()
Answer: (A) open()

Q#28: The maximum file size depends on:
(A) Number of pointers in inode
(B) Disk capacity only
(C) CPU speed
(D) File name length
Answer: (A) Number of pointers in inode

Q#29: Multi-level indexed allocation improves:
(A) Support for large files
(B) Directory management
(C) Free space tracking
(D) Journaling
Answer: (A) Support for large files

Q#30: Disk quotas are used to:
(A) Limit space and number of files per user
(B) Allocate CPU time
(C) Restrict memory usage
(D) Track file access
Answer: (A) Limit space and number of files per user

Q#31: File system fragmentation occurs due to:
(A) Allocation and deletion of files over time
(B) CPU scheduling
(C) Network traffic
(D) Cache misses
Answer: (A) Allocation and deletion of files over time

Q#32: Defragmentation is needed to:
(A) Reduce file fragmentation
(B) Encrypt files
(C) Delete files
(D) Manage CPU
Answer: (A) Reduce file fragmentation

Q#33: The logical block number in a file refers to:
(A) Offset from the start of the file
(B) Physical block on disk
(C) Superblock entry
(D) Directory pointer
Answer: (A) Offset from the start of the file

Q#34: The physical block number refers to:
(A) Actual location on disk
(B) File name
(C) Directory entry
(D) Inode pointer only
Answer: (A) Actual location on disk

Q#35: Which of the following is a journaling file system?
(A) ext3
(B) FAT16
(C) NTFS old version
(D) ISO9660
Answer: (A) ext3

Q#36: Log-structured file systems are optimized for:
(A) Fast writes
(B) Sequential access
(C) Large directories
(D) Small files only
Answer: (A) Fast writes

Q#37: The mount point is:
(A) Directory in which another file system is attached
(B) Disk block
(C) Inode of root
(D) Superblock location
Answer: (A) Directory in which another file system is attached

Q#38: File system crash recovery often uses:
(A) Journals and checkpoints
(B) Linked list only
(C) Contiguous allocation
(D) Indexing only
Answer: (A) Journals and checkpoints

Q#39: A cluster is:
(A) Unit of disk allocation consisting of one or more blocks
(B) CPU core
(C) Network segment
(D) Memory page
Answer: (A) Unit of disk allocation consisting of one or more blocks

Q#40: FAT file systems track free space using:
(A) File Allocation Table
(B) Inodes
(C) Superblock
(D) Journals
Answer: (A) File Allocation Table

Q#41: Which is a disadvantage of FAT?
(A) Poor performance for large disks
(B) Supports large files efficiently
(C) Indexed allocation
(D) Journaling
Answer: (A) Poor performance for large disks

Q#42: Extents are used to:
(A) Reduce fragmentation by allocating contiguous block ranges
(B) Encrypt files
(C) Store file names
(D) Manage CPU
Answer: (A) Reduce fragmentation by allocating contiguous block ranges

Q#43: In ext4, a file can use:
(A) Direct, single-indirect, double-indirect, and triple-indirect blocks
(B) Only direct blocks
(C) Only indirect blocks
(D) Only contiguous allocation
Answer: (A) Direct, single-indirect, double-indirect, and triple-indirect blocks

Q#44: Soft links can point to:
(A) Files across file systems
(B) Only same file system
(C) Only directories
(D) Only root inode
Answer: (A) Files across file systems

Q#45: Hard links can point to:
(A) Only files within the same file system
(B) Across file systems
(C) Only directories
(D) Only symbolic names
Answer: (A) Only files within the same file system

Q#46: The maximum number of links to a file is limited by:
(A) Inode structure
(B) Disk size
(C) Directory depth
(D) Block size
Answer: (A) Inode structure

Q#47: Journaling file systems can recover after a crash using:
(A) Logged changes
(B) Directory tree only
(C) File name table
(D) Free space bitmap
Answer: (A) Logged changes

Q#48: File permissions in UNIX are stored in:
(A) Inode
(B) Superblock
(C) Directory entry
(D) FAT table
Answer: (A) Inode

Q#49: The root inode number in UNIX is typically:
(A) 2
(B) 0
(C) 1
(D) 10
Answer: (A) 2

Q#50: The key purpose of a journaling file system is to:
(A) Maintain consistency and allow crash recovery
(B) Reduce disk size
(C) Increase directory entries
(D) Encrypt files
Answer: (A) Maintain consistency and allow crash recovery

Contents Copyrights Reserved By T4Tutorials