❓ Rapid Fire - 1-Line Drills¶
One-line definitions for warm-up or last-minute review. Cover the term, then check. For depth, jump to the matching Fundamentals note or the topic Q&A file. Format legend: Overview.
Each entry: term - a one-sentence answer you could say in an interview.
Systems & OS¶
- Process vs thread - process = isolated memory; thread = shares its process's memory, cheaper to switch.
- Context switch - save one thread's CPU state, load another's; pure overhead that also thrashes caches.
- Deadlock - threads wait on each other forever; needs all four Coffman conditions.
- Race condition - result depends on interleaving of operations on shared state.
- Mutex vs semaphore - mutex allows one holder; semaphore allows up to N.
- Virtual memory - per-process address space mapped to RAM in pages; gives isolation + overcommit.
Concurrency¶
- Concurrency vs parallelism - structuring overlapping tasks vs actually running them at once.
- Idempotent - doing it twice has the same effect as doing it once.
- Amdahl's law - speedup is capped at 1/(serial fraction).
- GIL - Python's lock allowing one thread of bytecode at a time (kills CPU-bound threading).
Networking¶
- TCP vs UDP - reliable ordered stream vs fast best-effort datagrams.
- 3-way handshake - SYN, SYN-ACK, ACK to open a TCP connection.
- TLS handshake - asymmetric crypto to authenticate + exchange a key, then symmetric for data.
- DNS - resolves a hostname to an IP by walking root → TLD → authoritative, cached by TTL.
- Head-of-line blocking - one stalled item blocks everything queued behind it.
Databases¶
- ACID - Atomicity, Consistency, Isolation, Durability.
- CAP - under a partition, choose Consistency or Availability, not both.
- Index - secondary sorted structure (usually B-tree) that avoids full scans; slows writes.
- Sharding vs replication - split different data across nodes vs copy the same data to many.
- MVCC - versioned rows so readers and writers don't block each other.
Hashing, caching, security¶
- Consistent hashing - ring placement so a node change remaps only ~K/N keys.
- Bloom filter - probabilistic set: "definitely not" or "maybe"; no false negatives.
- Cache-aside - check cache, on miss read DB and populate it.
- AuthN vs authZ - who you are vs what you're allowed to do.
- Idempotency key - client-supplied token letting the server dedup retried requests.
Related: QA-Bank index · Fundamentals · System Design Guide