10 Interactive Demos

Concurrency
Demystified

Master concurrency through interactive visualizations. See race conditions, deadlocks, and synchronization primitives in action.

View on GitHub
🌱 Beginner
#1

Race Conditions

Watch multiple threads corrupt shared data in real-time. See why counter++ isn't actually atomic.

Lost UpdatesThread Interleaving
🌱 Beginner
#2

Async vs Threads

Side-by-side comparison of async/await, threading, and true parallelism. Clear the confusion!

I/O vs CPUConcurrency Models
🌱 Beginner
#3

Locks & CAS

Explore how Mutex and Compare-And-Swap solve race conditions with different trade-offs.

Mutual ExclusionAtomic Operations
🌿 Intermediate
#4

Deadlock

Visualize two threads lock each other in an eternal embrace of death. See the circular wait condition.

Circular WaitLock Ordering
🌿 Intermediate
#5

Producer-Consumer

Watch producers fill a bounded buffer while consumers drain it. See blocking in action.

Bounded BufferBlocking Queue
🌿 Intermediate
#6

Semaphore

Control access to a limited pool of resources. The tollbooth analogy for rate limiting.

Rate LimitingResource Pool
🌿 Intermediate
#7

Thread Pool

See how a fixed pool of workers processes a queue of tasks efficiently without thread explosion.

Worker PoolTask Queue
🔥 Advanced
#8

Reader-Writer Lock

Multiple readers OR one exclusive writer - never both. Perfect for read-heavy workloads.

Shared AccessExclusive Write
🔥 Advanced
#9

Memory Ordering

See why CPU caches can cause threads to see stale values. Understand memory barriers.

Cache CoherenceVisibility
🔥 Advanced
#10

Starvation

Watch low-priority threads wait forever. Compare unfair vs fair scheduling strategies.

Priority InversionFair Scheduling

📚 Suggested Learning Path

🌱 Beginner
1. Race Conditions→2. Async vs Threads→3. Locks & CAS
🌿 Intermediate
4. Deadlock→5. Producer-Consumer→6. Semaphore→7. Thread Pool
🔥 Advanced
8. Reader-Writer→9. Memory Ordering→10. Starvation

Follow the numbered path from beginner to advanced concepts