▶ Concurrency Labs

Concurrency Labs

Producer-consumer, lock contention, work stealing, races, virtual threads.

5Interactive labs
100%Single-file HTML
Interactive labs

All 5 labs in this category

Advertisement
LAB · 01

Lock Contention

N threads compete for one mutex; see throughput collapse with contention.

Open lab
LAB · 02

Producer-Consumer with Bounded Queue

Tune producer/consumer rates; watch the queue fill and drain.

Open lab
LAB · 03

Race Condition — Counter Increment

N threads doing counter++ without synchronization. Watch the lost updates.

Open lab
LAB · 04

Virtual Threads vs OS Threads

Memory cost of spawning N threads under each model.

Open lab
LAB · 05

Work-Stealing Scheduler

Worker queues fill at different rates; idle workers steal from busy ones.

Open lab