Episode

Queues, Fairness, and The Go Scheduler

with Madhav Jivrajani

How does Go let you seamlessly scale millions of Goroutines atop your system's threads? Let's explore the working of the Go scheduler, how it maps Goroutines to OS threads, all while trying to ensure fairness. Let's also answer the question "What's up with the hardcoded value of 61 hardcoded in the Go scheduler?" We'll also learn about the information schedtrace provides, and how one can use it to gain insights into the working of the Go scheduler along with a few runtime APIs to try and “control” the behavior of the Go scheduler.

Follow Madhav on Twitter