Sobes.tech
Junior

What is P (processor) in the Go scheduler — is it a physical processor?

sobes.tech AI

Answer from AI

In the Go scheduler, P (Processor) is not a physical processor but a logical entity that manages the execution of goroutines. P represents an execution context that links goroutines (G) and system threads (M). The number of Ps is usually limited to the number of available logical processors (e.g., CPU cores), but P itself is an abstraction that provides scheduling and execution of goroutines, not a real physical processor.