Show answer
Answer
Source: getrlimit(2), Linux manual page, proc(5), Linux manual page
9 operating systems interview questions on OS internals for backend debugging and file durability, each with the correct answer and a full explanation.
Answer
Source: getrlimit(2), Linux manual page, proc(5), Linux manual page
Answer
Source: Linux kernel docs: Overcommit Accounting, OSTEP: Beyond Physical Memory: Mechanisms
Answer
Source: Linux Load Averages: Solving the Mystery, The USE Method
Answer
Source: Operating system interview questions, OSTEP: Paging: Faster Translations (TLBs)
Answer
Source: OSTEP: Beyond Physical Memory: Mechanisms, proc(5), Linux manual page
Answer
Source: fsync(2), Linux manual page, Ensuring data reaches disk
Answer
Source: rename(2), Linux manual page, Ensuring data reaches disk, fsync(2), Linux manual page
Answer
Source: Fsync Errors, PostgreSQL wiki, fsync(2), Linux manual page
Answer
Log: append each put and delete to a write ahead log and fsync (or group commit several puts per fsync) before acknowledging.
Snapshot: periodically write the full map to a temp file, fsync, rename over the old snapshot, fsync the directory, then truncate the log.
Recovery: load the latest snapshot and replay the log; recency order can be rebuilt approximately from log order, since exact LRU order rarely needs durability.
Tradeoffs: fsync per put is slow, so batching trades a small loss window or latency for throughput; process crash alone is covered by the page cache, power loss needs fsync.
Source: PracHub: Design a crash resilient LRU cache, OSTEP: Crash Consistency: FSCK and Journaling, Ensuring data reaches disk
These questions come from the Operating Systems Interview Practice pack in Bertopia.