Dr Gopher, Anatomy of the Scheduler
summary
Explains how the Go runtime scheduler multiplexes goroutines onto OS threads by inspecting its core components G, M, and P and mechanisms like thread creation, thread parking, local run queues, and work stealing. Shows how these scheduler internals allow Go concurrency to abstract resource management while optimizing use of system threads.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:09Scheduler role
- 3:38Scheduler goals
- 4:44P, M, G structure
- 6:07Local Run Queues
- 7:12Work Stealing
- 8:38Spinning threads
- 10:04Hand Off for syscalls
- 11:59Key mechanisms summary
- 13:07Conclusion
related talks
22mTales of Go Runtime Scheduler
47mQueues, Fairness, and The Go Scheduler
14mGo's work stealing scheduler
49mDeep dive into the Go scheduler, or Why would I steal goroutines?
16mIn the Land of Gophers (from Age 3)
50mUnderstanding the Go runtime
40mDebugging concurrency programs in Go
16mIn the land of Gophers from age 3
