SYSTEM-DESIGN
intermediate
Concurrency & Threading Models
Software Engineer path · lesson 91 of 99Visualise race conditions, mutex locking, and the difference between concurrency and parallelism through an animated shared-account withdrawal demo.
Shared Account Balance$100
Thread 1
READ —
COMPUTE —
WRITE —
both want
withdraw($10)
withdraw($10)
Thread 2
READ —
COMPUTE —
WRITE —
Press Run to start the simulation.
Concurrency or parallelism?
Sort
Sort each description into the concept it describes.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Concurrency
Drop items hereParallelism
Drop items here6 pieces left to place
Test your knowledge
20 questions
Question 1 of 20
Score: 0
What is a race condition?
The short version
Imagine two people sharing a notepad that shows the company bank balance. Both glance at the notepad at the same moment, each scribbles "$100 minus $10 = $90", and both write "$90" back — neither noticed the other was writing at the same time, so one withdrawal silently disappeared.
Interview Questions
Stripe
Amazon
Google
Microsoft
Google
Meta
Netflix
References & Further Reading
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required