Don't understand how runtime.schedule() get its p and parallelism

Hello! According to source code, schedule() function represents one round of scheduling.
From here we are looking for local p queue (or sometimes global from sched for fairness), then find runnable g and execute it.
How do this function knows inside which p to perform a search? What is a sequence for starting this func? Is it launched from multiple os threads per each m attached to p?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.