Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Operating Systems Through the Go Runtime

A mini course that teaches operating systems concepts through the Go runtime.


Why the Go Runtime?

The Go runtime is essentially a user-space operating system. It:

  • Schedules thousands of goroutines onto a small number of OS threads
  • Manages memory with its own allocator and garbage collector
  • Multiplexes I/O using epoll/kqueue so blocking calls don’t block threads
  • Handles signals for preemption and OS integration
  • Manages stacks that grow and shrink dynamically

All of this is written in readable Go (with some assembly for the lowest-level operations), making it far more approachable than a kernel like Linux while covering the same fundamental concepts.


Course Structure

Optional Modules

ModuleTopicDuration
2System Calls60 min
8Memory Management60 min
9Goroutine Stacks45 min

Materials

Each module includes:

  • Lecture notes — Detailed reading material with Go runtime code walkthroughs
  • Comprehension checks — Short questions to verify understanding

Additional resources:

Getting Started

  1. Read the syllabus for the full course overview and learning outcomes
  2. Clone the Go source tree to follow along with code references
  3. Start with Module 1

All code references use the format file.go:line and point to files under src/runtime/ in the Go source tree unless otherwise noted.