Send a link to your students to track their progress
13 Terms
1
New cards
What is an inode, and what information does it store about a file?
An index node that stores file metadata (size, owner, permissions, timestamps, data block pointers). It does NOT store the file path or name.
2
New cards
What happens to a file on disk when you run the rm command on a file that a running process is currently reading?
The file's link count decrements by 1 via unlink(), but its disk space is not freed until the last process closing it terminates.
3
New cards
Explain the difference between Buffered I/O and Direct I/O (O_DIRECT).
Buffered I/O passes data through the Linux Page Cache (RAM) for kernel-managed writing; Direct I/O completely bypasses the Page Cache to write straight from application memory to the storage controller.
4
New cards
Why do databases frequently issue the fsync() system call? What does it guarantee?
It forces the operating system to immediately flush modified data from volatile kernel caches (RAM) onto the underlying physical, non-volatile storage media.
5
New cards
What is the role of the Linux Page Cache, and how does it utilize free RAM?
It caches disk blocks in unallocated physical RAM to make file read and write operations run at memory speeds instead of slow storage disk speeds.
6
New cards
How does the mmap() system call work, and why do some database engines prefer it over standard read() / write() calls?
It maps file contents directly into an application's virtual memory address space, avoiding the CPU performance overhead of copying data between kernel space and user space.
7
New cards
What is the difference between a hard link and a soft (symbolic) link at the filesystem level?
A hard link is a duplicate directory entry pointing directly to an existing inode number; a soft link is a distinct shortcut file containing the text string of another path.
8
New cards
Explain the term "Write-Ahead Logging" (WAL) and how it relates to filesystem crashes.
A mechanism where state modifications are appended and fsynced to a dedicated disk log file BEFORE the actual database data files are modified, ensuring crash recovery.
9
New cards
What does the "dirty pages" metric mean in the context of memory and storage?
It describes pages of data in the Linux Page Cache that have been modified or written by an application but have not yet been synchronized to physical disk.
10
New cards
How do a system's "open file descriptors" limits (ulimit -n) impact a highly concurrent database server?
Because network sockets and active data partitions all consume file descriptors, hitting this limit causes connection drops and prevents the database from reading files.
11
New cards
What is the purpose of the Linux Virtual Filesystem (VFS) layer?
An abstraction layer in the kernel providing a uniform interface (open, read, write) so applications interact with different filesystems (EXT4, XFS, NFS) identically.
12
New cards
Why is random I/O significantly more expensive than sequential I/O on traditional hard drives, and how does this change on NVMe SSDs?
Traditional HDDs require physical mechanical head movement and platter rotation to find sectors; NVMe SSDs use flash with zero moving parts, making random I/O significantly faster.
13
New cards
What is the block size of a filesystem versus the sector size of a physical disk?
Sector size is the absolute minimum hardware read/write physical unit of the storage drive; block size is the logical abstraction chunk size managed by the filesystem software.