Skip to content
0:00 / 0:00

#goscheduler#goroutines#workstealing

Dmitry Vyukov — Go scheduler: Implementing language with lightweight concurrency

Hydra

3.2K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 3 people: 2 on Hacker News and 1 in engineering communities.
  • A classic. People kept recommending it from 2020 to 2026.
  • Presented by Dmitry Vyukov, Go runtime contributor

Advanced. Deep dive for people who know the field.

46K views7 years ago3 recommendations

Systems programmingProgramming languagesGoConcurrency and parallelismPerformance and optimization

Dmitry Vyukov explains the inner workings of the Go scheduler, covering goroutines, channels, system calls, and stack management.

About Hydra conference: jrg.su/6Cf8RP — Hydra 2022 — June 2-3 Info and tickets: bit.ly/3ni5Hem — — The Go programming language has native support for concurrency in the form of goroutines (light-weight threads) and channels (FIFO queues). This gives users a very convenient means for writing modern concurrent software and feels almost like magic. But we know there is no magic. In this talk, Dmitry will look inside of the Go scheduler and expose how this magic is implemented. First, he will give an overview of the main components of the scheduler and overall operation. Then, take a closer look at some specific aspects like blocking system call handling and growable stacks implementation. Lastly, Dmitry will speculate about potential future improvement to the scheduler.

Why it's here

3 people recommend this

What people say. Engineers recommend this talk as an excellent deep dive into Go's M:N scheduler design and concurrency model.

u/cutculusin r/ProgrammingLanguages • Recommends

The Go Scheduler: Implementing a language with lightweight concurrency

RossBencinaon Hacker News • Recommends

On “A Hitchhiker’s Guide to Asynchronous Programming”

I guess that's because they are "intros," and often multi-core event loops are implemented by the language runtime or some threadpool library. This is a good watch: Dmitry Vyukov — Go scheduler: Implementing language with lightweight concurrency (Oct 14, 2019) link to this video

c0balton Hacker News • Recommends

On “Understanding the Go Runtime: The Scheduler”

link to this video - Dmitry Vyukov — Go scheduler: Implementing language with lightweight concurrency This one notably also explains the design considerations for golangs M:N:P in comparison to other schemes and which specific challenges it tries to address.

lukaslalinskyon Hacker News • Mentions

On “How I turned Zig into my favorite language to write network programs in”

Go depends on the fact that it can track all pointers, and when it needs to resize stacks, it can update them. Previous versions of Go used segmented stacks, which are theoretically possible, if Zig really wanted (would need compiler support), but they have nasty performance side-effects, see link to this video