LLD in practice: threads and case studies
Module 15 of the System Design Masterclass. Every lesson here is free to read. No account needed.
- 4 lessons
- 1 h 48 min of reading
- 103Thread safety in codeHow to keep shared data correct when many requests run at the same moment: why a counter loses updates, locks, a check followed by a change, atomic steps, deadlock and lock order, a safe cache, and why a lock in code does not protect many servers.24 minDepth
- 104Case study: LLD parking lotA parking lot from the problem statement to working Python code: find the classes, put the rules that can change in their own small classes, then add monthly passes with a small change.28 minCore · Case study
- 105Case study: LLD elevator and vending machineTwo state machines written as working Python code: a lift (one class for each mode, then a fire alarm as a new class) and a vending machine (a table of legal moves, then a stopped state as three new rows).28 minDepth · Case study
- 106Case study: LLD SplitwiseA bill-sharing app from the problem statement to working Python code: debts as a graph, whole-rupee splits with a leftover rule, one place that joins opposite debts, settling up, and fewer payments worked out from each person's total.28 minDepth · Case study
Want help while you learn?
Reading is free for everyone. A free account adds the AI tutor, quizzes, notes and your progress.