Atomic Operations
Everything on SkillVeris tagged Atomic Operations — collected across the glossary, study notes, blog, and cheat sheets.
10 resources across 1 library
Interview Questions(10)
What Data Structures Does Redis Support and When to Use Them?
Redis is an in-memory key-value store whose values can be rich data structures — strings, hashes, lists, sets, sorted sets, and streams — each offering differe…
How Do You Implement API Rate Limiting With Database-Backed Counters?
Database-backed rate limiting stores a per-client request counter and a time window in a row, atomically incrementing that counter on each request and rejectin…
What Are Lock-Free Data Structures?
A lock-free data structure guarantees system-wide progress without using mutexes, by relying on atomic hardware primitives like compare-and-swap (CAS) so that…
What is the Compare-and-Swap (CAS) Instruction?
Compare-and-swap (CAS) is an atomic CPU instruction that reads a memory location, compares it to an expected value, and only writes a new value if the comparis…
How is a Mutex Lock Actually Implemented?
A mutex is implemented as a memory word holding a locked/unlocked flag plus a wait queue, where acquiring it uses an atomic instruction such as compare-and-swa…
What Are Atomic Operations in an Operating System?
An atomic operation is one that executes as a single, indivisible step from the perspective of every other thread or CPU core, so no concurrent operation can e…
How is a Semaphore Implemented Internally?
A semaphore is implemented as an integer counter protected by an atomic update, paired with a kernel-managed wait queue: the wait (P) operation atomically decr…
How to Design a Parking Garage System?
A parking garage system models floors, rows and spots as a hierarchy with real-time availability counters, uses atomic decrement/increment operations at entry…
How to Design a Flash Sale System
A flash sale system survives a massive, near-instant demand spike on a tiny stock count by throttling traffic before it hits the database, reserving inventory…
How to Design a Coupon System
A coupon system stores codes and their rules (discount type, eligibility, usage caps) separately from redemption records, validates each redemption against rem…