I haven't found the answer by googling. I'm wondering because I can't make sense of what I see on my M1 MacBook Air when giving it a heavy load of BOINC jobs when on battery vs. plugged in. Screenshots show macOS assigning the four jobs to the same four cores, regardless of power source; I naively expected a difference. No matter what I try, BOINC runs only on the right four cores, never the left four, even when I give it eight jobs. But what are the MenuMeters left and right, performance or efficiency? Is BOINC doing the choosing?
In general the developer of the software can choose (or at least strongly indicate to the operating system) which type of core to use. The developer sets a quality-of-service expectation and the operating system generally follows that.
In addition to the developer supplied QoS expectation, the operating system monitors the application's workload over a period of time, as well as the whole system's workload over a period of time, and use heuristics to make an overall decision on whether to schedule a specific thread on a P-core (performance) or E-core (energy).
Note that applications and background processes are treated differently in this respect. For example a GUI application could be treated differently whether its window(s) are in the foreground or in the background. For background processes (such as BOINC computation) that doesn't apply.
You can read a relatively non-technical overview of how it works here:
And a bit more specifics (but still overview information) about the QoS-classes here:
Note that it is actually often possible for you as the user to override the QoS-class set by the developer. Get the PID (process ID) of the BOINC job you want to affect (using for example Activity Monitor) - and then use the
taskpolicy command to set a new quality-of-service class.
By the load set by you.
The more programs or more likely an algorithm that looks at the processor loading based on the activities in progress which brings in more or fewer cores as needed to meet a given performance rating.
Most processors will max out when provided with mains power and are throttled when on battery for a longer life.