Operating System: Question Set – 28
What is a log-structured file system?
All changes are sequentially written to a log in a log-structured file system. Performance on devices with high write latency, such SSDs, is enhanced by this method.
What is the difference between block storage and file storage?
- Block Storage: Manages data as fixed-sized blocks. Example: SANs.
- File Storage: Manages data as files with hierarchical directories. Example: NAS systems.
What is a cluster in a file system?
The smallest unit of disk space allotted for file storage is called a cluster (also known as an allocation unit). It is a collection of disk sectors.
What is the difference between ext3 and ext4?
| Feature | ext3 | ext4 |
| Maximum File Size | 2 TB | 16 TB |
| Journaling | Supported | Supported |
| Extents | Not supported | Supported |
| Performance | Moderate | Better |
What is RAID, and how does it relate to file systems?
RAID (Redundant Array of Independent Disks) combines multiple disks for redundancy and performance. File systems are built on top of RAID to manage data storage.
How do modern file systems handle encryption?
To protect data, encryption capabilities are supported by contemporary file systems like NTFS, APFS, and ext4. Tools like BitLocker and LUKS can be used to implement encryption, or it can be done at the file system level.
What is the purpose of a superblock in a file system?
The superblock is a critical metadata structure in a file system. It contains:
- Information about the file system type.
- Size of the file system.
- Status of the file system.
- Locations of important file system structures.
If the superblock is corrupted, the file system might become inaccessible.
What is the difference between a file system and a database?
| Feature | File System | Database |
| Purpose | Manages files and directories | Manages structured data |
| Organization | Hierarchical directories | Tables, rows, columns |
| Querying | No built-in query language | Supports SQL or similar |
| Data Relationships | Not explicitly defined | Defined using keys |
What is Direct Memory Access (DMA) in the context of file systems?
Without using the CPU, DMA enables hardware devices to move data directly to or from memory. This lowers CPU overhead during file operations, improving file system efficiency.
How does a file system prevent unauthorized access?
File systems use security measures such as:
- File permissions (read, write, execute).
- Access Control Lists (ACLs).
- Encryption (file-level or disk-level).
- Authentication mechanisms.
What is file system consistency? How is it maintained?
File system consistency ensures that the file system structure and metadata remain correct, even after unexpected failures. Techniques used include:
- Journaling.
- Write-ahead logging.
- Periodic consistency checks (e.g., fsck in Linux).
What is the role of a buffer cache in a file system?
A buffer cache temporarily stores disk blocks in memory to reduce the number of physical disk I/O operations. It improves performance by:
- Reducing disk access time.
- Allowing read-ahead and write-behind operations.