~/talk

Understanding the Go runtime

Talkat GoLab 2023 · 2023-11-19..11-21· [go]
slides:none on file

Covers Go runtime v1.21 internals: the binary starts at an entry assembly that reads auxv then initializes TLS, CPU flags and the scheduler; the scheduler builds P/M/G structures and does a stop‑the‑world bootstrap that creates stack pools (2K/4K/8K/16K sizes) and the memory allocator. Explains spans and 8 KB page units so allocations round to spans (example next span 9,472 bytes), MHeap handling >32 KB, GC Pacer logic (GOGC=100 default), forceGC goroutine, sweeper/scavenger, the cismon timer (up to 10 ms), runtime.main and package init ordering.

AI-written summary · about

  1. 0:00Introduction to Go runtime
  2. 1:29Compiler and runtime relationship
  3. 3:57Runtime overhead in Go binaries
  4. 8:14Bootstrap process of runtime
  5. 10:23Scheduler and its components
  6. 12:31Stop the world in garbage collection
  7. 13:38Memory allocator internals
  8. 21:37Garbage collector initialization
  9. 24:46Processor creation and start
  10. 26:09Sysmon and background processes
  11. 29:22Runtime before main function
  12. 31:53Resources and further learning
  13. 34:42Exploring Go runtime source code
  14. 36:09Q&A on runtime investigations
  15. 40:08Runtime thread management
  16. 44:44Channels and runtime complexity
  17. 46:29Motivation for studying runtime
  18. 47:33Init functions execution order
~/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.