Overview
Explore the inner workings of the Go scheduler in this 31-minute conference talk from GopherCon 2018. Delve into the M:N multiplexing of goroutines on system threads, examining mechanisms for scheduling, unscheduling, and rebalancing goroutines. Learn how the scheduler supports the netpoller and memory management systems for goroutine stack resizing and heap garbage collection. Evaluate the effectiveness and performance of the scheduler as speaker Kavya Joshi guides you through topics such as N1 scheduling, thread reuse, run queues, concurrency, work stealing, and cooperative preemption. Gain insights into the behind-the-scenes machinery that powers Go programs, efficiently runs goroutines, and coordinates network I/O and memory management.
Syllabus
Intro
What is the scheduler
Why do we need a scheduler
When does it do all the scheduling
Goals
Question
N1 Scheduling
Reuse Threads
Run Queue
Concurrency
Limit Threads
Should we ship it
Distributed run queues
Work stealing
Handoff
Ghost Scheduler
Cooperative preemption
Conclusion
Taught by
Gopher Academy