Back to Practice OS & Networking

File Systems - Practice MCQs for CCAT

50 Questions Section B: Programming OS & Networking

File Systems Question Bank for C-CAT

Topic-wise File Systems MCQs for CDAC C-CAT preparation with answers and explanations.

Q1.
File allocation table (FAT) uses:
AContiguous allocation
BIndexed allocation
CLinked allocation
DNone
Show Answer & Explanation

Correct Answer: C - Linked allocation

FAT uses linked allocation with a table storing links.

Q2.
Inode in UNIX contains:
AFile name
BOnly directory info
COnly data
DFile metadata (permissions, pointers)
Show Answer & Explanation

Correct Answer: D - File metadata (permissions, pointers)

Inode stores file metadata: permissions, size, pointers to data blocks.

Q3.
Directory in file system is:
ASpecial file containing file entries
BSame as file
CNot a file
DHardware
Show Answer & Explanation

Correct Answer: A - Special file containing file entries

Directory is a special file that contains entries for files and subdirectories.

Q4.
Free space management uses:
AManual counting
BOnly arrays
CNo method
DBit vector/Linked list
Show Answer & Explanation

Correct Answer: D - Bit vector/Linked list

Free space tracked using bit vector, linked list, or grouping.

Q5.
Contiguous allocation has:
AExternal fragmentation
BNo fragmentation
CInternal fragmentation only
DNo disadvantage
Show Answer & Explanation

Correct Answer: A - External fragmentation

Contiguous allocation suffers from external fragmentation.

Q6.
Indexed allocation uses:
AFAT table
BIndex block with pointers
CContiguous blocks
DLinked list only
Show Answer & Explanation

Correct Answer: B - Index block with pointers

Indexed allocation uses an index block containing pointers to data blocks.

Q7.
Disk scheduling algorithm SCAN is also called:
ALOOK
BElevator algorithm
CSSTF
DFCFS
Show Answer & Explanation

Correct Answer: B - Elevator algorithm

SCAN moves like an elevator from one end to another.

Q8.
SSTF stands for:
AStandard Sequential Transfer
BSimple Scan Time First
CSystem Seek Transfer First
DShortest Seek Time First
Show Answer & Explanation

Correct Answer: D - Shortest Seek Time First

SSTF services request closest to current head position.

Q9.
Hard link vs Soft link:
ASame thing
BSoft link shares inode
CHard link shares inode, soft link is pointer
DNo difference
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.

Q10.
Journaling file system:
AHas no recovery
BLogs changes for crash recovery
CIs slow only
DCannot recover
Show Answer & Explanation

Correct Answer: B - Logs changes for crash recovery

Journaling logs transactions to recover from crashes.

Q11.
File access methods include:
ASequential access only
BSequential, Direct, and Indexed
CRandom only
DNo access methods exist
Show Answer & Explanation

Correct Answer: B - Sequential, Direct, and Indexed

Files can be accessed sequentially, directly (random), or through indexed methods.

Q12.
RAID stands for:
ARandom Array of Independent Disks
BRapid Access to Integrated Disks
CRedundant Array of Independent Disks
DRedundant Access to Indexed Disks
Show Answer & Explanation

Correct Answer: C - Redundant Array of Independent Disks

RAID combines multiple disks for redundancy and/or performance improvement.

Q13.
RAID 0 provides:
ARedundancy only
BMirroring
CStriping without redundancy
DParity
Show Answer & Explanation

Correct Answer: C - Striping without redundancy

RAID 0 stripes data across disks for performance but provides no redundancy.

Q14.
RAID 1 provides:
AStriping
BParity
CMirroring for redundancy
DNo protection
Show Answer & Explanation

Correct Answer: C - Mirroring for redundancy

RAID 1 mirrors data across disks for redundancy.

Q15.
Boot block contains:
AUser files
BCode to boot the operating system
CApplication data
DTemporary files
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.

Q16.
C-LOOK disk scheduling:
AScans in one direction only, jumps back
BScans in both directions
CUses random access
DIs same as FCFS
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.

Q17.
Disk seek time is:
ATime to rotate disk
BTime to transfer data
CTime to move head to correct track
DTime to find file
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.

Q18.
Rotational latency is:
ATime for head movement
BTime for disk sector to rotate under head
CData transfer time
DFile access time
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.

Q19.
Free block list is maintained using:
AOnly linked list
BNo data structure
COnly arrays
DBit vector or linked list
Show Answer & Explanation

Correct Answer: D - Bit vector or linked list

Free blocks are tracked using bit vectors, linked lists, or grouping methods.

Q20.
Superblock in Unix contains:
AUser data only
BFile system metadata (size, block count, etc.)
COnly file names
DProcess information
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.

Q21.
Which file allocation method stores each file as a linked list of disk blocks?
AContiguous allocation
BLinked allocation
CIndexed allocation
DHash allocation
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.

Q22.
What is the advantage of contiguous file allocation?
ANo external fragmentation
BEasy file expansion
CNo wasted space
DSimple and supports both sequential and direct access efficiently
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.

Q23.
What is an inode in Unix file systems?
AA type of directory
BA process identifier
CA network node
DA data structure that stores metadata about a file (size, permissions, pointers to data blocks)
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.

Q24.
Which disk scheduling algorithm services the request closest to the current head position?
AFCFS
BC-SCAN
CSCAN
DSSTF (Shortest Seek Time First)
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.

Q25.
What is the SCAN disk scheduling algorithm?
AThe disk arm moves in one direction servicing requests, then reverses direction
BIt randomly selects requests
CIt services requests in FCFS order
DIt only services requests in the outer tracks
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.

Q26.
What is indexed file allocation?
AEach file has an index block containing pointers to all its data blocks
BFiles stored in index order
CFiles indexed by name only
DFiles stored in alphabetical order
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.

Q27.
What is a directory in a file system?
AA memory buffer
BA type of disk partition
CA special type of file that contains information about other files
DA network resource
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.

Q28.
What is the difference between a hard link and a soft link?
AThey are the same
BA soft link is faster
CA hard link points to the inode; a soft link points to the file path
DHard links work across file systems
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.

Q29.
What is the FAT (File Allocation Table) file system?
AA Unix file system
BA virtual file system
CA network file system
DA file system that uses a table to track which clusters belong to which files
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.

Q30.
What is the C-SCAN disk scheduling algorithm?
AA compression-based algorithm
BA FCFS variant
CA random scheduling algorithm
DThe disk arm moves in one direction servicing requests, then returns to the beginning without servicing requests
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.

Q31.
What is a file control block (FCB)?
AA program that controls file access
BA data structure containing information about a file (permissions, size, location)
CA disk partition
DA CPU register for file operations
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.

Q32.
What is the purpose of a file system's superblock?
ATo store metadata about the file system itself (size, block count, free blocks, inode count)
BTo store user passwords
CTo cache file data
DTo encrypt files
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.

Q33.
Which directory structure uses a tree-like hierarchy?
ASingle-level directory
BTree-structured directory
CTwo-level directory
DAcyclic-graph directory
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).

Q34.
What is journaling in a file system?
AKeeping a log of user activities
BCompressing old files
CRecording changes in a log before applying them to the file system for crash recovery
DEncrypting file metadata
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.

Q35.
In FCFS disk scheduling, requests arrive at cylinders 98, 183, 37, 122, 14, 124, 65, 67 with the head starting at 53. What is the total head movement?
A236
B640
C480
D720
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.

Q36.
What is the LOOK disk scheduling algorithm?
ALike SCAN but the arm reverses when there are no more requests in that direction
BThe same as SCAN
CA random algorithm
DAn algorithm for SSDs only
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.

Q37.
What problem does linked file allocation suffer from?
AExternal fragmentation
BNo support for sequential access
CNo support for direct (random) access and overhead of pointers
DWastes too much disk space
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.

Q38.
What is the purpose of disk defragmentation?
ATo delete files
BTo encrypt the disk
CTo rearrange fragmented data so that files are stored in contiguous blocks
DTo increase disk size
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.

Q39.
What is a mount point in a file system?
AA hardware connector
BA disk controller
CA type of partition
DA directory where a file system is attached to the directory tree
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.

Q40.
What is the RAID (Redundant Array of Independent Disks) concept?
AA single large disk
BA memory management technique
CA type of file system
DCombining multiple disks for improved performance, reliability, or both
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.

Q41.
What is the difference between RAID 0 and RAID 1?
ARAID 0 provides redundancy; RAID 1 provides speed
BRAID 0 stripes data across disks (no redundancy); RAID 1 mirrors data (full redundancy)
CRAID 0 is slower; RAID 1 is faster
DThere is no difference
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).

Q42.
What is the purpose of access control lists (ACLs) in file systems?
ATo specify detailed permissions for each user or group on a file or directory
BTo speed up file access
CTo compress files
DTo defragment disks
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.

Q43.
In Unix, what do the file permissions rwxr-xr-- represent?
AOwner: read/write/execute, Group: read/execute, Others: read only
BOwner: read only, Group: all, Others: all
CEveryone has full access
DOwner: read/write, Group: execute, Others: none
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.

Q44.
What is the ext4 file system?
AThe fourth extended file system, commonly used in Linux with features like journaling and large file support
BA Windows file system
CA network protocol
DA database file system
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.

Q45.
What is a block in the context of file systems?
AThe smallest unit of data that can be read from or written to a disk by the file system
BA security mechanism
CA type of directory
DA network packet
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.

Q46.
What is the purpose of the open() system call for files?
ATo open a file and return a file descriptor for subsequent read/write operations
BTo create a new file only
CTo delete a file
DTo rename a file
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.

Q47.
What is the NTFS file system?
AA Linux file system
BA macOS file system
CA network file system
DNew Technology File System, the primary file system for Windows with features like journaling, ACLs, and encryption
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.

Q48.
What is the difference between sequential access and direct (random) access?
AThere is no difference
BSequential access reads data in order; direct access can read any block without reading preceding blocks
CDirect access is always slower
DSequential access requires more memory
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).

Q49.
What is a virtual file system (VFS)?
AA file system stored in virtual memory
BA file system for virtual machines only
CAn abstraction layer that provides a common interface for different file system implementations
DAn encrypted file system
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.

Q50.
What is free space management in file systems?
ATracking which disk blocks are available for allocation using techniques like bit vectors or linked lists
BDeleting unnecessary files
CCompressing unused space
DEncrypting free blocks
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.

Showing 1-10 of 50 questions