US 11,782,756 B2
Method and apparatus for scheduling processor core, and storage medium
Jie Cheng, Guangdong (CN)
Assigned to GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD., Dongguan (CN)
Filed by GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD., Guangdong (CN)
Filed on Oct. 13, 2020, as Appl. No. 17/69,289.
Application 17/069,289 is a continuation of application No. PCT/CN2019/083520, filed on Apr. 19, 2019.
Claims priority of application No. 201810362695.6 (CN), filed on Apr. 20, 2018.
Prior Publication US 2021/0026688 A1, Jan. 28, 2021
Int. Cl. G06F 9/48 (2006.01); G06F 9/50 (2006.01); G06F 9/54 (2006.01); G06F 9/451 (2018.01); G06F 9/38 (2018.01); G06F 9/4401 (2018.01); G06F 9/445 (2018.01); G06F 11/34 (2006.01)
CPC G06F 9/4881 (2013.01) [G06F 9/3877 (2013.01); G06F 9/4401 (2013.01); G06F 9/44505 (2013.01); G06F 9/451 (2018.02); G06F 9/505 (2013.01); G06F 9/5027 (2013.01); G06F 9/541 (2013.01); G06F 11/3428 (2013.01); G06F 11/3433 (2013.01); G06F 11/3495 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for scheduling a processor core, wherein the method is applied to a terminal, a processor in the terminal comprises at least one first performance core and at least one second performance core, a performance of the first performance core is higher than a performance of the second performance core, an operating system and at least one application run on the terminal, and the method comprises:
sending, by a target application, a target request to the operating system by calling a first application programming interface (API) provided by an embedded software development kit (SDK), the target request being used to indicate the operating system to feed back core information of the processor, and the core information comprising configuration conditions of the first performance core and the second performance core;
feeding, by the operating system, the core information back to the target application; and
scheduling, by the target application, a target core to operate a process of the target application via system calls based on the core information, comprising:
determining, by the target application, the target core corresponding to the process;
setting, by the target application, an affinity degree between the process and each core via system calls based on a core number of the target core and a process identifier of the process, wherein an affinity degree between the process and the target core is greater than an affinity degree between the process and another core; and
binding, by the operating system, the process and the target core based on the affinity degree, wherein the bound process operates on the target core.