M:N threading maps M user-level threads, such as Go goroutines, onto N kernel-level threads. Multiple kernel threads can run concurrently on multiple processors while user-level work remains lightweight. section 2.3.2
Go assigns kernel threads local run queues and maintains a global queue for unassigned goroutines. When a goroutine blocks on I/O, the runtime can create or reuse another thread and move work. section 2.3.2
Checking processor availability
runtime.NumCPU reports available logical processors, while runtime.GOMAXPROCS(0) reports the current processor limit. For example, both may print 8 on an eight-core system.
