~/talk

Queues, Fairness, and The Go Scheduler

Talkat GopherCon 2021 · 2021-12-05..12-08· [concurrency, go]
slides:none on file

Explains how Go 1.17.2 maps millions of goroutines onto threads using P/M/G with per-P local run queues of 256-local run length, a global run queue, and work stealing; shows non‑cooperative preemption at 10ms preemption delivered by the runtime daemon cismon via a user signal; justifies the 61 hardcoded schedtick (prime to avoid frequency collisions); demos a tool that enables runtime schedtrace, exports metrics to Prometheus/Grafana, and successfully visualizes steals, preempts, and queue dynamics.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15Disclaimer
  3. 4:12User Space Scheduling
  4. 5:50Global Run Queue
  5. 6:50Fairness
  6. 8:43Distributed run queues
  7. 9:33Go max prox
  8. 12:55Fairness in scheduling
  9. 18:03The netpolar
  10. 24:11Demo
  11. 37:09Prime
  12. 38:13Prime Graph
  13. 38:56Handoff
  14. 41:14Scheduling
  15. 42:17Runtime APIs
  16. 43:43Lock OS Thread
  17. 45:07Lock OS Thread Debugging
  18. 45:32Lock OS Case Study
  19. 46:20Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.