CN106020984B - Method and device for creating process in electronic equipment - Google Patents

Method and device for creating process in electronic equipment Download PDF

Info

Publication number
CN106020984B
CN106020984B CN201610342974.7A CN201610342974A CN106020984B CN 106020984 B CN106020984 B CN 106020984B CN 201610342974 A CN201610342974 A CN 201610342974A CN 106020984 B CN106020984 B CN 106020984B
Authority
CN
China
Prior art keywords
processing unit
load rate
processes
load
smaller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610342974.7A
Other languages
Chinese (zh)
Other versions
CN106020984A (en
Inventor
王永清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201610342974.7A priority Critical patent/CN106020984B/en
Publication of CN106020984A publication Critical patent/CN106020984A/en
Application granted granted Critical
Publication of CN106020984B publication Critical patent/CN106020984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Factory Administration (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for creating processes in electronic equipment, belonging to the technical field of electronics, wherein the method comprises the steps of obtaining processes to be created after the initialization of scheduling parameters is completed, detecting the load state of each processing unit in the electronic equipment, wherein the load state comprises at least of the number of the processes and the load rate, determining the processing units of which the number of the processes is smaller than a threshold value of the number of the processes as target processing units, or determining the processing units of which the load rate is smaller than the threshold value of the load rate as target processing units, or determining the processing units of which the number of the processes is smaller than the threshold value of the number of the processes and the load rate is smaller than the threshold value of the load rate as target processing units, and compared with the related technology that the processing units of which a parent process is located are directly used as the target processing units, the load state of the target processing units determined by the method is better, and the method and the device can ensure that the processes to be created are shorter in waiting for the creation.

Description

Method and device for creating process in electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for creating processes in kinds of electronic devices.
Background
The operating system may create a process based on a user's request, and the process creation process generally includes initializing basic information such as a stack address and an environment identifier of the process to be created, then initializing scheduling parameters of the process to be created, and finally allocating the process to be created to the processing unit, thereby completing creation of the process to be created.
However, if the load of the processing unit of the parent process of the process to be created is already high, the process to be created may be distributed to the processing unit, so that the processing unit may be overloaded, and the waiting time for the process to be created to run is long.
Disclosure of Invention
In order to solve the problem that the waiting running time is long after a new process is created in the related art, the invention provides a method and a device for creating processes in kinds of electronic equipment, wherein the technical scheme is as follows:
, a method for creating processes in kinds of electronic devices is provided, the method comprising:
acquiring a process to be created after the initialization of the scheduling parameters is completed, wherein the process to be created is created based on the created process in the electronic equipment;
detecting a load state of each processing unit in the electronic device, wherein the load state comprises at least types of processes and a load rate, the electronic device comprises N processing units, and N is an integer greater than or equal to 2;
determining the processing units with the process number smaller than the process number threshold value as target processing units; or determining the processing unit with the load rate smaller than the load rate threshold value as a target processing unit; or, determining the processing unit with the number of processes smaller than the threshold of the number of processes and the load rate smaller than the threshold of the load rate as a target processing unit;
and inserting the process to be created into the process queue of the target processing unit.
In another aspect , an apparatus for creating a process in kinds of electronic devices is provided, the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a process to be created after the initialization of scheduling parameters is completed, and the process to be created is created based on the created process in the electronic equipment;
the detection unit is used for detecting the load state of each processing unit in the electronic equipment, wherein the load state comprises at least of the number of processes and the load rate, the electronic equipment comprises N processing units, and N is an integer greater than or equal to 2;
the determining unit is used for determining the processing units with the number of processes smaller than the threshold value of the number of processes as target processing units; or determining the processing unit with the load rate smaller than the load rate threshold value as a target processing unit; or, determining the processing unit with the number of processes smaller than the threshold of the number of processes and the load rate smaller than the threshold of the load rate as a target processing unit;
and the creating unit is used for inserting the process to be created into the process queue of the target processing unit.
The technical scheme provided by the invention has the beneficial effects that:
the invention provides a method and a device for creating processes in electronic devices, wherein when an electronic device acquires a process to be created, which has completed scheduling parameter initialization, the load state of each processing unit can be detected, and the processing units with the number of processes smaller than a threshold of the number of processes, or the processing units with the load rate smaller than a threshold of the load rate, or the processing units with the number of processes smaller than the threshold of the number of processes and the load rate smaller than the threshold of the load rate are determined as target processing units.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for creating processes in electronic devices according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for creating a process in another kinds of electronic devices according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a creating apparatus for processes in electronic devices according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in further with reference to the accompanying drawings.
The electronic device in the embodiments of the present invention may include N Processing units, each Processing Unit may be cores of a multi-core CPU when a Central Processing Unit (CPU) of the electronic device is the multi-core CPU, and each Processing Unit may be single-core CPUs of a CPU Cluster when the CPU of the electronic device is the CPU Cluster.
An embodiment of the present invention provides methods for creating processes in an electronic device, and referring to fig. 1, the method may include:
step 101, acquiring a process to be created after the scheduling parameter initialization is completed, wherein the process to be created is created based on the created process in the electronic device.
102, detecting a load state of each processing unit in the electronic device, where the load state includes at least types of processes and a load rate, and the electronic device includes N processing units, where N is an integer greater than or equal to 2.
Step 103, determining the processing units with the number of processes smaller than the threshold of the number of processes as target processing units; or determining the processing unit with the load rate smaller than the load rate threshold value as a target processing unit; or, determining the processing unit with the number of processes smaller than the threshold of the number of processes and the load rate smaller than the threshold of the load rate as the target processing unit.
And 104, inserting the process to be created into the process queue of the target processing unit.
In summary, embodiments of the present invention provide methods for creating a process in an electronic device, where when the electronic device obtains a to-be-created process that has completed scheduling parameter initialization, the load state of each processing unit may be detected, and a processing unit whose number of processes is smaller than a threshold of the number of processes, or a processing unit whose load rate is smaller than a threshold of the load rate, or a processing unit whose number of processes is smaller than the threshold of the number of processes and whose load rate is smaller than the threshold of the load rate is determined as a target processing unit, so that compared with a related art in which a processing unit where a parent process is located is directly used as a target processing unit, the number of processes in the target processing unit determined by the present invention is small or the load rate is low, and it is possible to ensure that a waiting time for a to be run after the to-be-created process is inserted into a.
Fig. 2 is a flowchart of a method for creating a process in another kinds of electronic devices according to an embodiment of the present invention, and with reference to fig. 2, the method may include:
step 201, the electronic device obtains a process to be created after the initialization of the scheduling parameter is completed. Step 202 is performed.
In the embodiment of the present invention, the process to be created is created based on an already created process (i.e. a parent process) in the electronic device, and when a new process needs to be created in the system, the system may copy basic information of the new process, such as a stack address, various environment identifiers of the process, file information of the process, and the like, in the parent process to which the new process belongs. Then, the system can initialize the scheduling parameters of the new process, and when the system allocates the new process to a proper processing unit, the creation of the new process can be completed.
Step 202, detecting whether each processing unit is in an idle state.
When the processing unit in the idle state is detected, executing step 203; when no processing unit in an idle state is detected, step 204 is performed.
In the embodiment of the present invention, the operating system of the electronic device may periodically detect the number of processes in each processing unit and the load rate of the processing unit, and mark the load state of each processing unit. For example, when the number of processes in the process queue of a certain processing unit is 0 or the load rate of the processing unit is 0, the operating system may mark the load state of the processing unit as an idle state. In order to ensure that the process to be created can run in time after the process to be created is inserted into the process queue of the target processing unit, the electronic device may first detect whether each processing unit is in an idle state, and when a processing unit in an idle state is detected, step 203 may be executed; when no processing unit in the idle state is detected among the N processing units, the electronic device may perform step 204.
It should be noted that before step 202, that is, before the electronic device detects the load state of each processing unit, it needs to determine whether the processing unit is powered on (i.e., whether the processing unit is in the online state), when the processing unit is in the online state, the electronic device may determine that the processing unit is capable of being used by the scheduler, so that step 202 may be performed, and when the processing unit is not powered on (i.e., is not in the online state), the electronic device may continue to detect the powered on states of the next processing units.
Step 203, determine the processing unit in the idle state as the target processing unit. Step 210 is performed.
When detecting the processing unit in the idle state, the electronic device may directly determine the processing unit in the idle state as the target processing unit, and perform step 210. Because the target processing unit determined by the electronic device is in an idle state, that is, the current process queue of the target processing unit has no process, after the process to be created is inserted into the process queue of the target processing unit, the target processing unit can run the process to be created in time, so that the time length for the process to be created to wait to run is reduced, and the resources of each processing unit in the electronic device can be reasonably utilized.
And step 204, judging whether the detection of the load states of the N processing units is finished.
When the detection of the load status of the N processing units is completed, step 209 is executed, and when the detection of the load status of the N processing units is not completed, step 205 is executed, wherein the load status comprises at least of the number of processes and the load frequency.
When the electronic device does not detect a processing unit in an idle state among the N processing units, the electronic device may sequentially detect the number of processes and the load frequency of the N processing units from the 1 st processing unit, before detecting the ith processing unit, the electronic device may first determine whether i is less than or equal to N, when i is less than or equal to N, the electronic device may determine that the detection of the load state of the N processing units has not been completed, and perform step 205; when i is not less than N, the electronic device may determine that the detection of the load states of all the N processing units has been completed, and perform step 209.
Step 205, detecting whether the number of processes in the ith processing unit is smaller than the threshold of the number of processes.
When the process number of the ith processing unit is smaller than the process number threshold, execute step 206; when the number of processes in the ith processing unit is not less than the process number threshold, let i be i +1, and execute step 204.
In the embodiment of the present invention, an initial value of the process number threshold may be preset in the electronic device, and in order to ensure that the target processing unit satisfying the condition can be detected from the N processing units, the initial value of the process number threshold may be a maximum value of the data type to which the process number belongs. The electronic device may start with i being 1, detect the number of processes in the i-th processing unit, and determine whether the number of processes is smaller than the process threshold. For example, assume that the 1 st processing unit: if the number of processes in the CPU1 is 3 and the initial value of the process threshold is 1024, the electronic device may execute step 206 because the number of processes 3 in the CPU1 is smaller than the initial value of the process threshold 1024; if the electronic device detects the 2 nd processing unit: if the number of processes in the CPU2 is 4 and the process threshold is updated to 3, then since the number of processes 4 in the CPU2 is greater than the process threshold 3, the electronic device may set i to i +1, and execute step 204, that is, may set i to 3, and determine whether i at this time is less than or equal to N.
It should be noted that, because the processes in each processing unit may include a real-time process and a normal process, where the running priority of the real-time process is higher and the resources of the processing unit that need to be occupied are also more, in order to accurately reflect the load state of each processing unit, the number of processes in the ith processing unit detected by the electronic setting may be the number of real-time processes in the ith processing unit.
Step 206, detecting whether the load rate of the ith processing unit is less than a load rate threshold value.
When the load rate of the ith processing unit is less than the load rate threshold, execute step 207; when the load rate of the ith processing unit is not less than the load rate threshold, let i be i +1, and execute step 204.
In the embodiment of the present invention, an initial value of a load rate threshold may be preset in the electronic device, and in order to ensure that a target processing unit satisfying a condition can be detected from the N processing units, the initial value of the load rate threshold may be a maximum value of a data type to which the load rate belongs.
When the electronic device detects that the number of processes of the ith processing unit is smaller than the threshold value of the number of processes, the electronic device may continue to detect the load rate of the ith processing unit. For example, the electronic device may continue to: detecting the load rate of the CPU1, if the load rate of the CPU1 is 50% and the initial value of the load rate threshold is 256, the electronic device may execute step 207 since the load rate of the CPU1 is 50% smaller than the initial value of the load rate threshold 256; if the electronic device detects the 3 rd processing unit: if the load rate in the CPU3 is 80% and the load rate threshold is updated to 50%, then since the load rate 80% in the CPU3 is greater than the load rate threshold 50%, the electronic device may set i to i +1, and execute step 204, that is, may set i to 4, and determine whether i at this time is less than or equal to N.
Step 207, the load rate of the ith processing unit is used as a new load rate threshold, and the number of processes of the ith processing unit is used as a new process number threshold. Step 208 is performed.
When the electronic device detects that the process number of the ith processing unit is smaller than the process number threshold and the load rate of the ith processing unit is smaller than the load rate threshold, the electronic device may update the process number threshold and the load rate threshold, that is, the load rate of the ith processing unit is used as a new load rate threshold, and the process number of the ith processing unit is used as a new process number threshold. For example, the electronic device may use the process number 3 of the CPU1 as a new process number threshold, and use the load rate 50% of the CPU1 as a new load rate threshold. Therefore, the updated process count threshold is 3, and the updated load factor threshold is 50%.
Step 208, recording the identification of the ith processing unit as a target identification. Let i be i +1 and execute step 204.
In order to screen out the processing unit with the best load state from the N processing units of the electronic device, the electronic device may record and update the identifier of the processing unit of which the number of processes is smaller than the process number threshold and the load rate is smaller than the load rate threshold in the detection process. By way of example, the electronic device may associate the identification of the 1 st processing unit CPU 1: the CPU1 records the target identification, then makes i 2, and executes step 204 again.
Assume that the electronic device includes 4 processing units: CPU1 through CPU4, and the number of processes and load ratios in each processing unit are shown in table 1. For example, when the number of processes of the CPU2 is 4 and the load rate is 20%, after the electronic device detects the number of processes and the load rate of each processing unit, it can be detected that the process number 4 of the CPU2 is greater than the process number threshold 3, and the process number 2 of the CPU3 is less than the process number threshold 3, but the load rate 80% of the CPU3 is greater than the load rate threshold 50%, so the electronic device can determine that neither the CPU2 nor the CPU3 satisfy the condition for updating the process number threshold and the load rate threshold, when the electronic device detects that the number of processes in the fourth processing unit CPU4 is 1, less than the threshold number of processes 3, and when the load rate of the CPU4 is 30% and is less than the load rate threshold 50%, the electronic device may use the process number 1 of the CPU4 as a new process number threshold, use the load rate 30% of the CPU4 as a new load rate threshold, and identify the fourth processing unit CPU 4: the CPU4 updates to a new target identification.
TABLE 1
Processing unit CPU1 CPU2 CPU3 CPU4
Number of processes 3 4 2 1
Rate of load 50% 20% 80% 30%
And step 209, determining the processing unit corresponding to the target identifier as a target processing unit. Step 210 is performed.
After the electronic device determines that the detection of the load states of all the N processing units has been completed, the processing unit corresponding to the target identifier may be determined as the target processing unit. For example, the electronic device may identify the target: the fourth processing unit corresponding to the CPU4 is determined as the target processing unit. Because the processing unit corresponding to the target identifier is the processing unit of which the number of processes is less than the process number threshold and the load rate is also less than the load rate threshold among the N processing units, the time for the process to be created to wait for running is shortest after the process to be created is inserted into the process queue of the target processing unit, compared with the case where the process to be created is inserted into the process queues of other processing units.
Step 210, inserting the process to be created into the process queue of the target processing unit.
When the electronic device determines the processing unit in the idle state as the target processing unit or determines the processing unit corresponding to the target identifier as the target processing unit, the process to be created can be inserted into the process queue of the target processing unit. Because the target processing unit is in an idle state, or when there is no processing unit in the idle state in the electronic device, the target processing unit is a processing unit whose number of processes and load rate are both less than a threshold, after the process to be created is inserted into the process queue of the target processing unit, it can be ensured that the time for the process to be created to wait for running is short.
It should be noted that, any in step 205 and step 206 may be deleted according to circumstances, for example, the electronic device may detect only the number of processes in each processing unit, and after step 204, step 205, and steps 207 to 209, the electronic device may determine the processing unit with the smallest number of processes in the N processing units as the target processing unit, or the electronic device may detect only the load factor of each processing unit, and after step 204 and steps 206 to 209, the electronic device may determine the processing unit with the smallest load factor in the N processing units as the target processing unit.
It should be further noted that, the order of steps of the method for creating a process in an electronic device according to the embodiment of the present invention may be appropriately adjusted, and the steps may also be increased or decreased according to the situation. For example, the execution sequence of step 205 and step 206 may be interchanged, or step 202 may also be executed between step 204 and step 205, that is, before step 205 is executed, it is determined whether the i-th processing unit is in an idle state. Any method that can be easily conceived by those skilled in the art within the technical scope of the present disclosure is covered by the protection scope of the present disclosure, and thus, the detailed description thereof is omitted.
In summary, the embodiment of the present invention provides methods for creating a process in an electronic device, where when an electronic device obtains a to-be-created process that has completed scheduling parameter initialization, the electronic device may determine, as a target processing unit, a processing unit whose number of processes is less than a process number threshold, or a processing unit whose load rate is less than a load rate threshold, or a processing unit whose number of processes is less than a process number threshold and whose load rate is less than a load rate threshold, so that compared with a related art in which a processing unit where a parent process is located is directly used as a target processing unit, the number of processes in the target processing unit determined by the present invention is less or the load rate is lower, and it is possible to ensure that a waiting time for running is shorter after the to-be-created process is inserted into a process queue of the target processing.
Fig. 3 is a schematic structural diagram of an apparatus for creating a process in electronic devices according to an embodiment of the present invention, and with reference to fig. 3, the apparatus includes:
an obtaining unit 301, configured to obtain a to-be-created process that has completed scheduling parameter initialization, where the to-be-created process is created based on a created process in an electronic device.
A detecting unit 302, configured to detect a load state of each processing unit in the electronic device, where the load state includes at least kinds of processes and a load rate, and the electronic device includes N processing units, where N is an integer greater than or equal to 2.
A determining unit 303, configured to determine, as a target processing unit, a processing unit whose number of processes is smaller than a process number threshold; or determining the processing unit with the load rate smaller than the load rate threshold value as a target processing unit; or, determining the processing unit with the number of processes smaller than the threshold of the number of processes and the load rate smaller than the threshold of the load rate as the target processing unit.
A creating unit 304, configured to insert the process to be created into the process queue of the target processing unit.
In summary, the embodiment of the present invention provides an apparatus for creating a process in an electronic device, where when an electronic device acquires a process to be created, a processing unit whose load state satisfies a preset condition in N processing units of the electronic device may be determined as a target processing unit, and because the electronic device comprehensively compares load states of the N processing units in a process of determining the target processing unit, compared with a related art in which a processing unit where a parent process is located is directly used as the target processing unit, the number of processes in the target processing unit determined by the present invention is small or the load ratio is low, and it is ensured that a waiting time for the process to be created to run after being inserted into a process queue of the target processing unit is short.
Optionally, the detecting unit 302 is further configured to: detecting whether each processing unit is in an idle state; when no processing unit in an idle state is detected, a load state of each processing unit in the electronic device is detected.
Optionally, the load status includes a number of processes and a load rate, and the detecting unit 302 is further configured to: detecting whether the process number of each processing unit in the electronic equipment is smaller than a process number threshold value; and when detecting that the process number of the ith processing unit is smaller than the process number threshold, detecting whether the load rate of the ith processing unit is smaller than the load rate threshold, wherein i is an integer which is greater than or equal to 1 and less than or equal to N.
Optionally, the detecting unit 302 is further configured to: and when the load rate of the ith processing unit is smaller than the load rate threshold, taking the load rate of the ith processing unit as a new load rate threshold, and taking the number of processes of the ith processing unit as a new process number threshold.
Optionally, the load status includes the number of processes, and the detecting unit 302 is further configured to: detecting whether the process number of each processing unit in the electronic equipment is smaller than a process number threshold value; and when detecting that the process number of the ith processing unit is smaller than the process number threshold, taking the process number of the ith processing unit as a new process number threshold.
Optionally, the load status includes a load rate, and the detecting unit 302 is further configured to: detecting whether the load rate of each processing unit in the electronic equipment is smaller than a load rate threshold value; and when the load rate of the ith processing unit is detected to be smaller than the load rate threshold value, taking the load rate of the ith processing unit as a new load rate threshold value.
In summary, the apparatus for creating a process in an electronic device according to an embodiment of the present invention is provided, and when the electronic device obtains a to-be-created process that has completed scheduling parameter initialization, the load state of each processing unit may be detected, and a processing unit whose number of processes is smaller than a process number threshold, or a processing unit whose load rate is smaller than a load rate threshold, or a processing unit whose number of processes is smaller than a process number threshold and whose load rate is smaller than a load rate threshold is determined as a target processing unit.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1, A method for creating a process in an electronic device, the method comprising:
acquiring a process to be created after the initialization of the scheduling parameters is completed, wherein the process to be created is created based on the created process in the electronic equipment;
detecting a load state of each processing unit in the electronic device, wherein the load state comprises at least types of processes and a load rate, the electronic device comprises N processing units, and N is an integer greater than or equal to 2;
determining the processing unit with the least number of processes in the N processing units as a target processing unit; or, determining the processing unit with the minimum load rate in the N processing units as a target processing unit; or, determining the processing unit with the least number of processes and the least load rate among the N processing units as a target processing unit;
inserting the process to be created into a process queue of the target processing unit;
wherein, when the load status includes the number of processes, the detecting the load status of each processing unit in the electronic device includes: detecting whether the number of processes of each processing unit in the electronic equipment is smaller than a process number threshold value; when detecting that the process number of the ith processing unit is smaller than a process number threshold, taking the process number of the ith processing unit as a new process number threshold, wherein i is an integer which is greater than or equal to 1 and less than or equal to N;
when the load state includes a load rate, the detecting the load state of each processing unit in the electronic device includes: detecting whether the load rate of each processing unit in the electronic equipment is smaller than a load rate threshold value; and when the load rate of the ith processing unit is detected to be smaller than the load rate threshold value, taking the load rate of the ith processing unit as a new load rate threshold value.
2. The method of claim 1, wherein the detecting the load status of each processing unit in the electronic device comprises:
detecting whether each processing unit is in an idle state;
when no processing unit in an idle state is detected, a load state of each processing unit in the electronic device is detected.
3. The method of claim 1, wherein the load status comprises a number of processes and a load rate, and wherein detecting the load status of each processing unit in the electronic device comprises:
detecting whether the number of processes of each processing unit in the electronic equipment is smaller than a process number threshold value;
and when detecting that the process number of the ith processing unit is smaller than the process number threshold, detecting whether the load rate of the ith processing unit is smaller than the load rate threshold.
Apparatus for creating a process in an electronic device of the kind , the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a process to be created after the initialization of scheduling parameters is completed, and the process to be created is created based on the created process in the electronic equipment;
the detection unit is used for detecting the load state of each processing unit in the electronic equipment, wherein the load state comprises at least of the number of processes and the load rate, the electronic equipment comprises N processing units, and N is an integer greater than or equal to 2;
a determining unit, configured to determine, as a target processing unit, a processing unit with a smallest number of processes in the N processing units; or, determining the processing unit with the minimum load rate in the N processing units as a target processing unit; or, determining the processing unit with the least number of processes and the least load rate among the N processing units as a target processing unit;
the creating unit is used for inserting the process to be created into the process queue of the target processing unit;
wherein, when the load status includes the number of processes, the detecting the load status of each processing unit in the electronic device includes: detecting whether the number of processes of each processing unit in the electronic equipment is smaller than a process number threshold value; when detecting that the process number of the ith processing unit is smaller than a process number threshold, taking the process number of the ith processing unit as a new process number threshold, wherein i is an integer which is greater than or equal to 1 and less than or equal to N;
when the load state includes a load rate, the detecting the load state of each processing unit in the electronic device includes: detecting whether the load rate of each processing unit in the electronic equipment is smaller than a load rate threshold value; and when the load rate of the ith processing unit is detected to be smaller than the load rate threshold value, taking the load rate of the ith processing unit as a new load rate threshold value.
5. The apparatus of claim 4, wherein the detection unit is further configured to:
detecting whether each processing unit is in an idle state;
when no processing unit in an idle state is detected, a load state of each processing unit in the electronic device is detected.
6. The apparatus of claim 4, wherein the load status comprises a number of processes and a load rate, and wherein the detecting unit is further configured to:
detecting whether the number of processes of each processing unit in the electronic equipment is smaller than a process number threshold value;
and when detecting that the process number of the ith processing unit is smaller than the process number threshold, detecting whether the load rate of the ith processing unit is smaller than the load rate threshold.
CN201610342974.7A 2016-05-20 2016-05-20 Method and device for creating process in electronic equipment Active CN106020984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610342974.7A CN106020984B (en) 2016-05-20 2016-05-20 Method and device for creating process in electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610342974.7A CN106020984B (en) 2016-05-20 2016-05-20 Method and device for creating process in electronic equipment

Publications (2)

Publication Number Publication Date
CN106020984A CN106020984A (en) 2016-10-12
CN106020984B true CN106020984B (en) 2020-01-31

Family

ID=57095958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610342974.7A Active CN106020984B (en) 2016-05-20 2016-05-20 Method and device for creating process in electronic equipment

Country Status (1)

Country Link
CN (1) CN106020984B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423123A (en) * 2017-07-25 2017-12-01 广东欧珀移动通信有限公司 Method for scheduling task, device, storage medium and electronic equipment
CN107589995B (en) * 2017-08-16 2020-06-09 广东电网有限责任公司电力调度控制中心 Pre-broadcast preview task scheduling method for data service
CN109271897B (en) * 2018-08-31 2023-10-24 平安科技(深圳)有限公司 Face action unit detection method and device, computer equipment and storage medium
CN109710416B (en) * 2019-01-11 2021-03-02 银清科技有限公司 Resource scheduling method and device
CN113138909A (en) * 2020-01-20 2021-07-20 Oppo广东移动通信有限公司 Load statistical method, device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630272A (en) * 2009-08-19 2010-01-20 用友软件股份有限公司 Process scheduling method and system
CN104850394A (en) * 2015-04-17 2015-08-19 北京大学 Management method of distributed application program and distributed system
CN105592126A (en) * 2014-11-14 2016-05-18 株式会社日立制作所 Agent-free automatic server system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8245173B2 (en) * 2009-01-26 2012-08-14 International Business Machines Corporation Scheduling for parallel processing of regionally-constrained placement problem
JP6130915B2 (en) * 2013-07-11 2017-05-17 株式会社日立製作所 Information processing system and information processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630272A (en) * 2009-08-19 2010-01-20 用友软件股份有限公司 Process scheduling method and system
CN105592126A (en) * 2014-11-14 2016-05-18 株式会社日立制作所 Agent-free automatic server system
CN104850394A (en) * 2015-04-17 2015-08-19 北京大学 Management method of distributed application program and distributed system

Also Published As

Publication number Publication date
CN106020984A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN106020984B (en) Method and device for creating process in electronic equipment
US8190864B1 (en) APIC implementation for a highly-threaded x86 processor
CN110837410A (en) Task scheduling method and device, electronic equipment and computer readable storage medium
CN106874100B (en) Computing resource allocation method and device
CN112650576B (en) Resource scheduling method, device, equipment, storage medium and computer program product
CN109800204B (en) Data distribution method and related product
CN110659142A (en) Message queue processing method and device, electronic equipment and storage medium
US20160011908A1 (en) Task allocation in a computing environment
US9870314B1 (en) Update testing by build introspection
EP3208709B1 (en) Batch processing method and device for system invocation commands
CN104932933A (en) Spin lock acquisition method and apparatus
CN111078422A (en) Message processing method, message processing device, readable storage medium and electronic equipment
CN110955390B (en) Data processing method, device, electronic equipment and storage medium
CN106933512B (en) Data reading and writing method and device
CN115113987A (en) Method, device, equipment and medium for allocating non-uniform memory access resources
CN109002348B (en) Load balancing method and device in virtualization system
CN107180051B (en) Log management method and server
CN110389817B (en) Scheduling method, device and computer readable medium of multi-cloud system
CN108733536B (en) Monitoring management system and method
CN116483546B (en) Distributed training task scheduling method, device, equipment and storage medium
CN116089477B (en) Distributed training method and system
CN113590274A (en) Task allocation method and device and task processing system
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN116627659A (en) Model check point file storage method, device, equipment and storage medium
CN115756828A (en) Multithreading data file processing method, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder