The Virtual Wars of Dining Philosophers
summary
Using the classic Dining Philosophers concurrency problem, the talk measures misconceptions about Java virtual threads by implementing and benchmarking solutions with platform threads and virtual threads, using ReentrantLock and synchronized approaches. Benchmarks are built with JMH and JLBH to compare performance and behavior under various simulated activities (eating, sleeping, running, networking).
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:23Virtual vs platform threads
- 3:32Performance claims
- 6:42Dining philosophers problem
- 8:52Structured concurrency
- 10:58Benchmark results
- 13:04Benchmark methodology
- 15:32CPU vs I/O-bound tasks
- 17:18Sleeping philosophers
- 18:45Active waiting
- 19:48Disk reading
- 22:55Benchmarking tools
- 25:03JMH vs JLBH
- 27:11JLBH details
- 30:01Network reading
- 32:29HTTP clients
- 33:56Benchmark summary
- 36:27Scaling to 100k
- 38:55Scaling analysis
- 40:42Key takeaways
- 43:11Testing methodology
- 44:36Q&A
