Look at this well-known image taken from morsmachine.dk/go-scheduler

Gray lists are local runqueues of P. If this queue is empty, they will be populated by go programs from the global runqueue.
The question is, who fills the local runqueue P?
Scheduler without synchronization or does each P do it for itself (mutex)?
PS The article omitted this information.
source
share