liveBook · Manning

Go runtime

As explained in Go in Practice, Second Edition

The Go runtime is the system software bundled with Go programs that provides execution support such as scheduling, memory management, and garbage collection.

The Go runtime supplies execution support inside a compiled Go program. The program’s operating-system binary contains the runtime, imported packages, and application code, so deploying it generally means deploying one binary rather than installing a separate runtime. section 1.3.3

The runtime manages goroutines across application threads. A web server can use goroutines to handle connections concurrently, while the runtime runs that work across multiple threads and cores. This removes thread-management work that an equivalent C application would need to handle itself. section 1.3.4 section 1.3.1

Choosing where it fits

A server using four cores can launch goroutines without assigning work to threads manually. A resource-constrained embedded device is a less natural fit: the runtime and garbage collector add demands that may not suit its limits. For a deployed service, monitoring the runtime is part of operating the application, though no monitoring procedure is specified here. section 1.3.1 section 1.3 section 12.0

How Go in Practice, Second Edition covers it

How deep it goes
Describes packaging, garbage collection, and goroutine management; defers further concurrency detail and gives no runtime-monitoring procedure.
Examples
Uses a four-core server, concurrent web connections, and resource-constrained embedded systems to show practical trade-offs.
What you can do after
Evaluate/understand when bundled execution support simplifies service deployment and when its resource demands make embedded use less suitable.
How it connects
Connects goroutines, threads, garbage collection, compiled binaries, and cloud deployment.

Also explained in

Compare how 2 books explain Go runtime →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Go in Practice, Second Edition. The section links point to the parts of the book it draws on.