Tag: design-concurrency
All the articles with the tag "design-concurrency".
-
System Design - How Linux System Calls Work
How Linux system calls work: the x86-64 syscall instruction, kernel entry/exit, the syscall dispatch table, vDSO optimization, and a source code walkthrough from the Linux kernel.
-
System Design - How Futexes Work (The Foundation of Every Lock You Use)
How Linux futexes work: the hybrid userspace/kernel synchronization primitive that powers every mutex, condition variable, and semaphore in modern programs. Covers the fast-path CAS, slow-path syscall, kernel hash table, the three-state mutex optimization, and a source code walkthrough from the Linux kernel and glibc.
-
System Design - How Database Connection Pooling Works
How database connection pooling works: the cost of raw connections, pool lifecycle, idle/active management, connection multiplexing modes, HikariCP internals, and PgBouncer architecture with source code walkthrough.
-
System Design - How Paxos Consensus Works
How Paxos distributed consensus works: the protocol phases, roles (proposer, acceptor, learner), Multi-Paxos optimization, comparison with Raft, and real-world implementations in Google Chubby, Apache ZooKeeper, and Spanner.
-
System Design - How Coroutines and Async/Await Work Under the Hood
How coroutines power async/await: the difference between stackful and stackless coroutines, how Python transforms async functions into state machines, how Go's goroutines use stack-copying, and how the event loop ties it all together.
-
System Design - How Database Deadlock Detection Works
How databases detect deadlocks: the wait-for graph algorithm, cycle detection via DFS, InnoDB's implementation, victim selection strategies, and how distributed databases like TiDB handle cross-node deadlocks.