CN106020957A - Process creation method for mobile communication terminal and mobile communication terminal - Google Patents

Process creation method for mobile communication terminal and mobile communication terminal Download PDF

Info

Publication number
CN106020957A
CN106020957A CN201610323155.8A CN201610323155A CN106020957A CN 106020957 A CN106020957 A CN 106020957A CN 201610323155 A CN201610323155 A CN 201610323155A CN 106020957 A CN106020957 A CN 106020957A
Authority
CN
China
Prior art keywords
cpu
sub
determining
ppid
user
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.)
Pending
Application number
CN201610323155.8A
Other languages
Chinese (zh)
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
Publication of CN106020957A publication Critical patent/CN106020957A/en
Pending legal-status Critical Current

Links

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

Embodiments of the present invention provide a process creation method for a mobile communication terminal and the mobile communication terminal. The method comprises: determining whether a subprocess is a process that needs to interact with a user when an application is started; after it is determined that the subprocess is the process that needs to interact with the user when the application is started, determining whether there exists a CPU large core in an idle state; if the CPU large core in the idle state exists, initializing a scheduling parameter of the subprocess into a parameter of the CPU large core, so as to make the subprocess to run on the CPU large core, which ensures that the process that needs to interact with the user when the application is started can be immediately run on the CPU large core. Therefore, enough CPU resources can be obtained instantly the application is started, so that a starting speed of the application is increased, and thus user experience is improved.

Description

Mobile communication terminal process creation method and mobile communication terminal
Technical Field
The present invention relates to computer technologies, and in particular, to a method for creating a process of a mobile communication terminal and a mobile communication terminal.
Background
With the development of information technology and the increasing demand for entertainment of users, mobile communication terminals are widely used, and at the same time, more applications are running on the mobile communication terminals. Most of the existing mobile communication terminals adopt a multi-core architecture mode of a plurality of Central Processing Units (CPUs). Since the CPU resources of the mobile communication terminal are limited, in order to enable each application to operate normally, the process of the application needs to be scheduled.
In the prior art, when an application program is started, an operating system creates one or more sub-processes for the application program. The example of creating a sub-process for an application by an operating system is described herein. In the process of creating the child process, data in the scheduling parameters of the process defaults to the parameters of the CPU of the parent process. That is, after the child process is created, it is executed on the CPU on which the parent process of the child process is located by default. Then at this point at least 2 processes need to be run on the CPU where the parent process is located: a parent process and the child process. And the CPU of the parent process schedules the child process according to the scheduling strategy.
However, with the above process creation method, after the child process is created, the CPU where the parent process is located includes at least two processes, and when the child process runs on the CPU after being created, the CPU needs to determine according to the scheduling policy, and when it is determined according to the scheduling policy that the parent process is preferentially executed, the child process may need to be executed for a long time, so that the application program needs to wait for the parent process to finish running to acquire enough CPU resources at the start moment, and thus the start of the application program is slow.
Disclosure of Invention
The invention provides a mobile communication terminal process creation method and a mobile communication terminal, which aim to improve the starting speed of an application program.
In a first aspect, an embodiment of the present invention provides a method for creating a process of a mobile communication terminal, including:
judging whether the sub-process is a process which needs to be interacted with a user when the application program is started; wherein, the mobile communication terminal comprises a plurality of Central Processing Units (CPU);
if the sub-process is determined to be a process needing to interact with a user when the application program is started, judging whether a CPU (Central processing Unit) big core in an idle state exists or not;
and if the CPU big core in the idle state is determined to exist, initializing the scheduling parameter of the sub-process to the parameter of the CPU big core so as to enable the sub-process to run on the CPU big core.
Before determining whether the sub-process is a process that needs to interact with a user when the application is started, the method further includes:
determining the parent process number PPID of the child process;
the step of judging whether the sub-process is a process which needs to interact with a user when the application program is started comprises the following steps:
and judging whether the subprocess is a process which needs to be interacted with a user when the application program is started or not according to the PPID of the subprocess.
The method for judging whether the sub-process is a process which needs to interact with a user when the application program is started according to the PPID of the sub-process comprises the following steps:
if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, determining that the sub-process is a process which needs to interact with a user when the application program is started;
and if the PPID is the PPID of the daemon process or the PPID of the kernel process, determining that the sub-process is not the process which needs to interact with the user when the application program is started.
As shown above, if it is determined that there is no CPU big core in an idle state, the method further includes:
determining a CPU with a busy state meeting a preset condition;
and initializing the scheduling parameters of the subprocess to the parameters of the CPU meeting the preset conditions so as to enable the subprocess to run on the CPU.
The method for determining the CPU with the busy state meeting the preset condition comprises the following steps:
determining the number of loads running on each CPU, and determining the CPU with the number of the running loads smaller than a preset threshold as the CPU with the busy state meeting a preset condition; or,
and determining the number of loads running on each CPU, and determining the CPU with the minimum load number as the CPU meeting the preset condition.
In a second aspect, an embodiment of the present invention provides a mobile communication terminal, including:
the first judgment module is used for judging whether the sub-process is a process which needs to be interacted with a user when the application program is started; wherein, the mobile communication terminal comprises a plurality of Central Processing Units (CPU); (ii) a
The second judgment module is used for judging whether a CPU (Central processing Unit) big core in an idle state exists or not when the subprocess is determined to be a process which needs to interact with a user when the application program is started;
the first initialization module is used for initializing the scheduling parameter of the sub-process to the parameter of the CPU big core when the CPU big core in an idle state is determined to exist, so that the sub-process runs on the CPU big core.
The mobile communication terminal as described above, further comprising:
the first determining module is used for determining a parent process number PPID of the child process;
the first judging module comprises:
and the judgment sub-module is used for judging whether the sub-process is a process which needs to be interacted with a user when the application program is started or not according to the PPID of the sub-process.
In the mobile communication terminal described above, the determining sub-module is specifically configured to:
if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, determining that the sub-process is a process which needs to interact with a user when the application program is started;
and if the PPID is the PPID of the daemon process or the PPID of the kernel process, determining that the sub-process is not the process which needs to interact with the user when the application program is started.
The mobile communication terminal as described above, further comprising:
the second determining module is used for determining the CPU with a busy state meeting the preset condition when the CPU with the idle state is determined not to exist;
and the second initialization module is used for initializing the scheduling parameters of the subprocess to the parameters of the CPU meeting the preset conditions so as to enable the subprocess to run on the CPU.
In the mobile communication terminal described above, the second determining module is specifically configured to:
determining the number of loads running on each CPU, and determining the CPU with the number of the running loads smaller than a preset threshold as the CPU with the busy state meeting a preset condition; or,
and determining the number of loads running on each CPU, and determining the CPU with the minimum number of loads as the CPU meeting the preset condition.
The invention provides a mobile communication terminal process establishing method and a mobile communication terminal, which determine whether a CPU big core in an idle state exists or not by judging whether a sub-process is a process which needs to interact with a user when an application program is started or not, and after determining that the sub-process is the process which needs to interact with the user when the application program is started, determine whether the CPU big core in the idle state exists or not, if the CPU big core in the idle state exists, initialize a scheduling parameter of the sub-process to a parameter of the CPU big core so as to enable the sub-process to run on the CPU big core, thereby realizing that the sub-process can run on the CPU big core immediately after determining that the sub-process is the process which needs to interact with the user when the application program is started and if the CPU big core in the idle state exists, and ensuring that the process which needs to interact with the user when the application program is started can obtain enough CPU resources instantly, the starting speed of the application program is improved, and further, the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a first embodiment of a method for creating a process of a mobile communication terminal according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a second embodiment of a method for creating a process of a mobile communication terminal according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a mobile communication terminal according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a second embodiment of a mobile communication terminal according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method for establishing the mobile communication terminal process provided by the embodiment of the invention can be applied to the mobile communication terminal adopting operating systems such as Linux, Unix and the like with a multi-core architecture. The mobile communication terminal in the embodiment of the invention can be a mobile phone, a notebook computer, a tablet computer and the like. The mobile communication terminal includes a plurality of CPUs. In a system with a multi-core architecture, a CPU whose performance satisfies a preset condition is referred to as a CPU large core, and the remaining CPUs are referred to as CPU small cores. It should be noted that the CPU core may be one or more CPUs; the CPU corelet may also be one or more CPUs. The performance of a CPU big core is strong, and the power consumption is high; the performance of the small CPU core is weaker and the power consumption is lower than that of the large CPU core.
When an application needs to be started, the parent process creates one or more child processes for the application. If a child process is defaulted to run on the CPU of its parent process according to the prior art, it may take a long time to run, affecting the start-up speed of the application. The mobile communication terminal process creation method provided by the embodiment of the invention firstly judges whether the subprocess is a process which needs to interact with a user when the application program is started, if so, judges whether a CPU (central processing unit) big core in an idle state exists, and if so, initializes the scheduling parameter of the subprocess to the parameter of the CPU big core, so that the subprocess can run on the CPU big core, and ensures that the subprocess which needs to interact with the user when the application program is started can be immediately run by the CPU big core, thereby, enough CPU resources can be obtained at the starting moment of the application program, the starting speed of the application program is improved, and further, the user experience is improved.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a flowchart illustrating a first method for creating a process of a mobile communication terminal according to an embodiment of the present invention. As shown in fig. 1, a method for creating a mobile communication terminal process according to an embodiment of the present invention includes the following steps:
s101: and judging whether the sub-process is a process which needs to be interacted with the user when the application program is started.
Wherein the mobile communication terminal includes a plurality of CPUs.
The method for establishing the process of the mobile communication terminal provided by the embodiment of the invention can be executed by a CPU where the parent process of the child process is positioned. Of course, other CPU implementations are possible. The embodiment of the present invention is not limited thereto. It is necessary to first determine whether the sub-process is a process that needs to interact with the user when the application is started. A process that requires interaction with a user means that the process needs to interact with the user after it is started. For example, the process is created and run to display a start user interface of an application for a user to input instructions. Alternatively, a process that requires interaction with a user means that the process' running process is perceived by the user. For example, the process is created and run to display a start interface for an application that the user may know has been launched.
In an operating system, the process of creating a process needs to be trapped in the kernel through system calls, and the kernel completes the underlying creation of the process. Accordingly, the CPU of the mobile communication terminal can determine whether the sub-process is a process of the application program. For example, in a Linux operating system, processes are divided into kernel processes and user processes. The user process includes a daemon process such as a service process and a process needing interaction with a user. The mobile communication terminal process creation method provided by the embodiment of the invention can not be adopted for the daemon process and the kernel process, and the user experience cannot be influenced because the user cannot perceive the operation of the daemon process and the kernel process. And only the process needing to interact with the user when the application program is started is optimally created by adopting the mobile communication terminal process creation method provided by the embodiment of the invention, so that the user experience is improved.
In one implementation, whether the child process is a process that needs to interact with a user when the application is started can be determined by a Parent Process Identity (PPID) of the child process. If the PPID of the sub-process meets certain preset conditions, the sub-process can be determined to be a process which needs to interact with a user when the application program is started. The preset condition may be a PPID range, which indicates that the child processes whose PPIDs are within the PPID range are all processes that need to interact with the user when the application is started. This PPID range varies from operating system to operating system.
In another implementation manner, whether the sub-Process is a Process that needs to interact with the user when the application is started can be determined by a Process Identity (PID) of the sub-Process. If the PID of the sub-process meets certain preset conditions, the sub-process can be determined to be a process which needs to interact with a user when the application program is started. The preset condition may be a PID threshold or a PID range, which varies with the operating system.
S102: and if the subprocess is determined to be the process which needs to interact with the user when the application program is started, judging whether a CPU (Central processing Unit) big core in an idle state exists.
Specifically, in an operating system of a multi-core architecture, information of a plurality of CPUs may be stored in a data structure such as a list or a table.
Here, the information of the CPU is stored in a list form as an example. The list stores the type of each CPU, i.e., whether it is a big core or a small core. The current state of each CPU is also stored in the list. For example, it currently has an operating load or not and the number of loads. The load is a process running on the CPU. The list may also store parameter information of each CPU, such as operating frequency and bus speed. A CPU big core in an idle state means that the CPU is a CPU big core and there is no running load on the CPU. The CPU may scan only the CPU macrocells in the list to determine if there is a CPU macrocycle in an idle state. And if no load is scanned on at least one CPU big core, determining that the CPU big core in an idle state exists.
S103: if the CPU big core in the idle state is determined to exist, the scheduling parameters of the sub-process are initialized to the parameters of the CPU big core, so that the sub-process runs on the CPU big core.
Specifically, there are two implementations:
in one implementation, if the scanning is stopped after determining that there is one CPU core in the idle state in S102, the scheduling parameter of the sub-process is initialized to the parameter of the CPU core. For example, a cache parameter in the scheduling parameter of the sub-process may be initialized to the cache parameter of the CPU core. And after the scheduling parameter initialization of the sub-process is completed, the creation of the sub-process is completed. The sub-process will then run on the CPU core.
In another implementation manner, if the mobile communication terminal scans information of all CPUs in S102 and determines that there are multiple CPU megacores in the idle state, the CPU selects one of the CPU megacores in the idle state according to a preset rule. The preset rule may be preset in the operating system. For example, the preset rule may be to select a CPU core in an idle state with the highest operating frequency, or the preset rule may be to select a CPU core in an idle state with the highest bus speed. After the CPU determines the CPU big core, the scheduling parameter of the sub-process is initialized to the parameter of the CPU big core, so that the sub-process runs on the CPU big core.
It should be noted that, in the embodiment of the present invention, if it is determined that the sub-process is not a process that needs to interact with a user when the application is started, a normal creation operation is performed on the sub-process.
The method for establishing the process of the mobile communication terminal provided by the embodiment of the invention determines whether the CPU big core in the idle state exists or not by judging whether the subprocess is the process which needs to be interacted with the user when the application program is started or not and after determining that the subprocess is the process which needs to be interacted with the user when the application program is started, if the CPU big core in the idle state exists, the scheduling parameter of the subprocess is initialized to the parameter of the CPU big core so as to enable the subprocess to run on the CPU big core, so that after determining that the subprocess is the process which needs to be interacted with the user when the application program is started and if the CPU big core in the idle state exists, the subprocess is enabled to run on the CPU big core, the process which needs to be interacted with the user when the application program is started can be ensured to run on the CPU big core immediately, therefore, enough CPU resources can be obtained at the moment when the application program is started, and the starting speed of the application program is, furthermore, user experience is improved.
Further, in the embodiment shown in fig. 1, before S102, determining the PPID of the sub-process is further included, and then S102 may specifically be implemented as follows: and judging whether the sub-process is a process which needs to be interacted with a user when the application program is started or not according to the PPID of the sub-process.
When a child Process is created by its parent Process, the parent Process copies all data including its own Process Identity (PID) to its child Process, that is, the child Process in the embodiment of the present invention. The sub-process saves this data in its own structure. Wherein the PID of the parent process becomes the PPID of the child process. Accordingly, the mobile communication terminal can acquire the PPID of the sub-process in the structure body of the sub-process. In a more specific implementation, the PPID of a child process may be obtained by calling the getppid () function.
Judging whether the sub-process is a process needing to interact with a user when the application program is started according to the PPID of the sub-process can be realized by adopting the following modes: if the PPID is not the PPID of a daemon (daemon) process and not the PPID of a kernel process, determining that the sub-process is a process which needs to interact with a user when the application program is started, and if the PPID is the PPID of the daemon process or the PPID of the kernel process, determining that the sub-process is not the process which needs to interact with the user when the application program is started.
In a more specific implementation manner, in the Linux operating system, when a kernel is started, two special processes are created, namely a kernel process No. 1 with a PID of 1 and a kernel process No. 2 with a PID of 2. The kernel process No. 1 finally evolves into a user process No. 1 init process, and the init process is responsible for creating all daemon processes. The kernel process number 2 is called a ktreaded process, which is responsible for creating all kernel processes. In this implementation, the PPID of the daemon process is 1, and the PPID of the kernel process is 2. If the PPID of a sub-process is neither 1 nor 2, this indicates that it is created neither by an init process nor by a kthread process, then the sub-process must be the process that needs to interact with the user when the application starts. If the PPID of a sub-process is 1 or 2, this indicates that the sub-process was created by an init process or a kthread process. As previously mentioned: the init process is responsible for creating all daemon processes, the ktreadd process is responsible for creating all kernel processes, and it is indicated that the sub-process is either a daemon process or a kernel process, namely, the sub-process is not a process which needs to interact with a user when an application program is started.
In the implementation mode, whether the sub-process is a process which needs to interact with a user when the application program is started is judged according to the PPID of the sub-process by determining the PPID of the sub-process, if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, the sub-process is determined to be the process which needs to interact with the user when the application program is started, if the PPID is the PPID of the daemon process or the PPID of the kernel process, the sub-process is determined not to be the process which needs to interact with the user when the application program is started, and in the process of determining whether the sub-process is the process which needs to interact with the user when the application program is started, the judgment is carried out through the PPID, so that the method is convenient to realize, simple to operate, high in judgment speed, and further improves user experience.
Fig. 2 is a flowchart illustrating a process creating method of a mobile communication terminal according to a second embodiment of the present invention. Embodiment of the present invention, the steps after S103 will be described in detail based on the embodiment shown in fig. 1. As shown in fig. 2, the method for creating a mobile communication terminal process provided by this embodiment includes the following steps:
s201: and judging whether the sub-process is a process which needs to be interacted with the user when the application program is started.
S202: and if the subprocess is determined to be the process which needs to interact with the user when the application program is started, judging whether a CPU (Central processing Unit) big core in an idle state exists.
The implementation processes and technical principles of S201-S202 are similar to those of S101-S102, and are not described herein again.
S203: and if the CPU big core in the idle state does not exist, determining the CPU with the busy state meeting the preset condition.
Specifically, in S102, if the mobile communication terminal scans all the CPU megacores and finds that all the CPU megacores are in a busy (busy) state, it is determined that there is no CPU megacore in an idle state.
The mobile communication terminal then determines a CPU whose busy state satisfies a preset condition.
In one implementation, a CPU whose busy state satisfies a preset condition may be determined by: the number of loads running on each CPU is determined. And determining that the CPU with the running load quantity less than the preset threshold is the CPU with a busy state meeting the preset condition.
The mobile communication terminal may scan a data structure storing information of a plurality of CPUs to determine the number of loads running on each CPU. And if the number of the loads is less than a preset threshold value, determining that the CPU is the CPU with a busy state meeting a preset condition. The preset threshold may be set based on empirical data. The fact that the number of the loads is smaller than the preset threshold value indicates that the CPU can also run the sub-process under the condition that the starting speed of the application program is met, and user experience is not affected. When a CPU with a busy state meeting the preset conditions is determined, the CPU with the busy state meeting the preset conditions is determined to be the CPU with the busy state meeting the preset conditions. When determining that a plurality of CPUs with busy states satisfying preset conditions exist, the mobile communication terminal selects one CPU according to preset rules. The preset rule may be that, among the CPUs whose busy states satisfy the preset condition, a CPU with the least load is selected as the CPU whose busy state satisfies the preset condition. Or, the preset rule may be that, among the CPUs whose busy states satisfy the preset condition, the CPU big core with the least load is selected as the CPU whose busy state satisfies the preset condition.
In another implementation, the preset condition may be a CPU core with the smallest load. In the implementation mode, only one CPU big core with the minimum load number is selected from the CPU big cores to serve as the CPU with the finally determined busy state meeting the preset condition.
In yet another implementation, the preset condition may be a CPU with a minimum number of loads. And determining the number of loads running on each CPU, and determining the CPU with the minimum load number as the CPU meeting the preset condition. The difference from the previous implementation is that the number of loads of all CPUs can be compared, and a CPU with the smallest load number is selected as the CPU whose busy state finally determined meets the preset condition. The finally determined CPU may be a CPU big core or a CPU small core.
S204: and initializing the scheduling parameters of the subprocess into CPU parameters meeting preset conditions so that the subprocess runs on the CPU.
The initializing the scheduling parameter of the sub-process to the parameter of the CPU meeting the preset condition may be initializing a cache parameter in the scheduling parameter of the sub-process to the cache parameter of the CPU, or initializing an identifier in the scheduling parameter of the sub-process to the identifier of the CPU. After the scheduling parameters of the sub-process are initialized, the creation of the sub-process is completed, and then the sub-process runs in the CPU of which the busy state meets the preset condition.
In the method for establishing the process of the mobile communication terminal provided by the embodiment of the invention, when the CPU in the idle state is determined not to exist, the CPU with the busy state meeting the preset condition is determined, the scheduling parameter of the sub-process is initialized to the CPU with the busy state meeting the preset condition, so that the sub-process runs on the CPU with the busy state meeting the preset condition, the process needing to be interacted with a user can be run by the CPU with the busy state meeting the preset condition in a short time when the application program is started, the starting speed of the application program is not influenced, and the user experience is improved.
Fig. 3 is a schematic structural diagram of a mobile communication terminal according to a first embodiment of the present invention. As shown in fig. 3, a mobile communication terminal according to an embodiment of the present invention includes:
the first judging module 31 is configured to judge whether the sub-process is a process that needs to interact with a user when the application is started.
Wherein the mobile communication terminal includes a plurality of CPUs.
And the second judging module 32 is configured to judge whether a CPU big core in an idle state exists when it is determined that the sub-process is a process that needs to interact with a user when the application is started.
The first initializing module 33 is configured to initialize the scheduling parameter of the sub-process to the parameter of the CPU big core when it is determined that the CPU big core in the idle state exists, so that the sub-process runs on the CPU big core.
The mobile communication terminal provided in the embodiment of the present invention is specifically configured to execute the embodiment of the method for creating a process of a mobile communication terminal shown in fig. 1, and the implementation process and the technical principle are similar, and are not described herein again.
The mobile communication terminal provided by the embodiment of the invention is provided with a first judgment module for judging whether a subprocess is a process which needs to be interacted with a user when an application program is started, a second judgment module for judging whether a CPU (central processing unit) big core in an idle state exists when the subprocess is determined to be the process which needs to be interacted with the user when the application program is started, a first initialization module for initializing a scheduling parameter of the subprocess to a parameter of the CPU big core when the CPU big core in the idle state exists so as to enable the subprocess to run on the CPU big core, after the subprocess is determined to be the process which needs to be interacted with the user when the application program is started, if the CPU big core in the idle state exists, the subprocess is enabled to run on the CPU big core, thereby ensuring that the process which needs to be interacted with the user when the application program is started can be immediately run by the CPU big core, enough CPU resources can be obtained at the moment of starting the application program, the starting speed of the application program is improved, and further the user experience is improved.
Further, on the basis of the embodiment shown in fig. 1, the mobile communication terminal further includes: the first determining module is used for determining the PPID of the sub-process. The first judging module comprises: and the judgment sub-module is used for judging whether the sub-process is a process which needs to be interacted with the user when the application program is started according to the PPID of the sub-process. The judgment submodule is specifically configured to: if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, determining that the sub-process is a process which needs to interact with a user when the application program is started; and if the PPID is the PPID of the daemon process or the PPID of the kernel process, determining that the sub-process is not the process which needs to interact with the user when the application program is started.
In this implementation, a first determining module is provided for determining the PPID of the sub-process, and the determining submodule is specifically configured to: if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, the subprocess is determined to be a process which needs to be interacted with a user when the application program is started, if the PPID is the PPID of the daemon process or the PPID of the kernel process, the subprocess is determined not to be a process which needs to be interacted with the user when the application program is started, and in the process of determining whether the subprocess is the process which needs to be interacted with the user when the application program is started, judgment is carried out through the PPID, so that convenience in implementation, simplicity in operation and higher judgment speed are achieved, and user experience is further improved.
Fig. 4 is a schematic structural diagram of a second embodiment of a mobile communication terminal according to the present invention. As shown in fig. 4, the mobile communication terminal according to the embodiment of the present invention further includes, based on the embodiment shown in fig. 3:
and a second determining module 41, configured to determine, when it is determined that there is no CPU big core in an idle state, a CPU whose busy state satisfies a preset condition.
And a second initializing module 42, configured to initialize the scheduling parameter of the sub-process to a parameter of the CPU that meets a preset condition, so that the sub-process runs on the CPU.
The second determining module 41 is specifically configured to: and determining the number of loads running on each CPU, wherein the CPU with the number of running loads smaller than a preset threshold is determined as the CPU with a busy state meeting a preset condition. Or, determining the number of loads running on each CPU, and determining the CPU with the minimum number of loads as the CPU meeting the preset condition.
The mobile communication terminal provided in the embodiment of the present invention is specifically configured to execute the embodiment of the method for creating a process of a mobile communication terminal shown in fig. 2, and the implementation process and the technical principle are similar, and are not described herein again.
The mobile communication terminal provided by the embodiment of the invention is provided with the second determining module for determining the CPU with the busy state meeting the preset condition when the CPU with the idle state is determined not to exist, and the second initializing module for initializing the scheduling parameter of the sub-process into the parameter of the CPU meeting the preset condition so as to enable the sub-process to run on the CPU, thereby ensuring that the process needing to interact with the user can be run by the CPU with the busy state meeting the preset condition in a short time when the application program is started, and not influencing the starting speed of the application program, thereby improving the user experience.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A mobile communication terminal process creation method is characterized by comprising:
judging whether the sub-process is a process which needs to be interacted with a user when the application program is started; wherein, the mobile communication terminal comprises a plurality of Central Processing Units (CPU);
if the sub-process is determined to be a process needing to interact with a user when the application program is started, judging whether a CPU (Central processing Unit) big core in an idle state exists or not;
and if the CPU big core in the idle state is determined to exist, initializing the scheduling parameter of the sub-process to the parameter of the CPU big core so as to enable the sub-process to run on the CPU big core.
2. The method of claim 1, prior to determining whether the sub-process is a process that requires interaction with a user at application start-up, the method further comprising:
determining the parent process number PPID of the child process;
the step of judging whether the sub-process is a process which needs to interact with a user when the application program is started comprises the following steps:
and judging whether the subprocess is a process which needs to be interacted with a user when the application program is started or not according to the PPID of the subprocess.
3. The method of claim 2, wherein the determining whether the sub-process is a process that needs to interact with a user when an application starts according to the PPID of the sub-process comprises:
if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, determining that the sub-process is a process which needs to interact with a user when the application program is started;
and if the PPID is the PPID of the daemon process or the PPID of the kernel process, determining that the sub-process is not the process which needs to interact with the user when the application program is started.
4. The method of any of claims 1-3, wherein if it is determined that there is no CPU big core in an idle state, the method further comprises:
determining a CPU with a busy state meeting a preset condition;
and initializing the scheduling parameters of the subprocess to the parameters of the CPU meeting the preset conditions so as to enable the subprocess to run on the CPU.
5. The method of claim 4, wherein determining the CPU with the busy status satisfying the predetermined condition comprises:
determining the number of loads running on each CPU, and determining the CPU with the number of the running loads smaller than a preset threshold as the CPU with the busy state meeting a preset condition; or,
and determining the number of loads running on each CPU, and determining the CPU with the minimum load number as the CPU meeting the preset condition.
6. A mobile communication terminal, comprising:
the first judgment module is used for judging whether the sub-process is a process which needs to be interacted with a user when the application program is started; wherein, the mobile communication terminal comprises a plurality of Central Processing Units (CPU); (ii) a
The second judgment module is used for judging whether a CPU (Central processing Unit) big core in an idle state exists or not when the subprocess is determined to be a process which needs to interact with a user when the application program is started;
the first initialization module is used for initializing the scheduling parameter of the sub-process to the parameter of the CPU big core when the CPU big core in an idle state is determined to exist, so that the sub-process runs on the CPU big core.
7. The mobile communication terminal according to claim 6, wherein the mobile communication terminal further comprises:
the first determining module is used for determining a parent process number PPID of the child process;
the first judging module comprises:
and the judgment sub-module is used for judging whether the sub-process is a process which needs to be interacted with a user when the application program is started or not according to the PPID of the sub-process.
8. The mobile communication terminal according to claim 7, wherein the determining sub-module is specifically configured to:
if the PPID is not the PPID of the daemon process and not the PPID of the kernel process, determining that the sub-process is a process which needs to interact with a user when the application program is started;
and if the PPID is the PPID of the daemon process or the PPID of the kernel process, determining that the sub-process is not the process which needs to interact with the user when the application program is started.
9. The mobile communication terminal according to any of claims 6-8, wherein the mobile communication terminal further comprises:
the second determining module is used for determining the CPU with a busy state meeting the preset condition when the CPU with the idle state is determined not to exist;
and the second initialization module is used for initializing the scheduling parameters of the subprocess to the parameters of the CPU meeting the preset conditions so as to enable the subprocess to run on the CPU.
10. The mobile communication terminal according to claim 9, wherein the second determining module is specifically configured to:
determining the number of loads running on each CPU, and determining the CPU with the number of the running loads smaller than a preset threshold as the CPU with the busy state meeting a preset condition; or,
and determining the number of loads running on each CPU, and determining the CPU with the minimum number of loads as the CPU meeting the preset condition.
CN201610323155.8A 2016-04-27 2016-05-16 Process creation method for mobile communication terminal and mobile communication terminal Pending CN106020957A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610268640 2016-04-27
CN201610268640X 2016-04-27

Publications (1)

Publication Number Publication Date
CN106020957A true CN106020957A (en) 2016-10-12

Family

ID=57098264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610323155.8A Pending CN106020957A (en) 2016-04-27 2016-05-16 Process creation method for mobile communication terminal and mobile communication terminal

Country Status (1)

Country Link
CN (1) CN106020957A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775975A (en) * 2016-12-08 2017-05-31 青岛海信移动通信技术股份有限公司 Process scheduling method and device
CN106909450A (en) * 2017-02-28 2017-06-30 深圳天珑无线科技有限公司 process management method, device and terminal
CN107025135A (en) * 2017-03-03 2017-08-08 网易(杭州)网络有限公司 Application process management method, device and medium in Docker containers
CN107608797A (en) * 2017-09-30 2018-01-19 广东欧珀移动通信有限公司 Document handling method, device, storage medium and electronic equipment
CN109254849A (en) * 2018-08-31 2019-01-22 北京小米移动软件有限公司 The operation method and device of application program
CN111190721A (en) * 2018-11-15 2020-05-22 青岛海信移动通信技术股份有限公司 Method for processing application program in mobile terminal and mobile terminal
CN112527403A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Application starting method and electronic equipment
CN113076179A (en) * 2020-01-06 2021-07-06 深圳市万普拉斯科技有限公司 Electrochromic module control method and device, mobile terminal and readable storage medium
CN113721933A (en) * 2020-05-25 2021-11-30 网神信息技术(北京)股份有限公司 Data processing method and device for application program, computing equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090187888A1 (en) * 2008-01-21 2009-07-23 International Business Machines Corporation Method for singleton process control
CN101770362A (en) * 2009-01-06 2010-07-07 中国科学院计算技术研究所 Distributed dynamic process generating unit meeting System C processor
CN103338135A (en) * 2013-07-05 2013-10-02 山东大学 Real-time monitoring method of cluster storage capacity
CN104536822A (en) * 2014-12-31 2015-04-22 中科创达软件股份有限公司 Process scheduling optimization method, process execution method and related device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090187888A1 (en) * 2008-01-21 2009-07-23 International Business Machines Corporation Method for singleton process control
US20160004560A1 (en) * 2008-01-21 2016-01-07 International Business Machines Corporation Method for singleton process control
CN101770362A (en) * 2009-01-06 2010-07-07 中国科学院计算技术研究所 Distributed dynamic process generating unit meeting System C processor
CN103338135A (en) * 2013-07-05 2013-10-02 山东大学 Real-time monitoring method of cluster storage capacity
CN104536822A (en) * 2014-12-31 2015-04-22 中科创达软件股份有限公司 Process scheduling optimization method, process execution method and related device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775975A (en) * 2016-12-08 2017-05-31 青岛海信移动通信技术股份有限公司 Process scheduling method and device
CN106909450A (en) * 2017-02-28 2017-06-30 深圳天珑无线科技有限公司 process management method, device and terminal
CN107025135B (en) * 2017-03-03 2020-02-21 网易(杭州)网络有限公司 Application process management method, device and medium in Docker container
CN107025135A (en) * 2017-03-03 2017-08-08 网易(杭州)网络有限公司 Application process management method, device and medium in Docker containers
CN107608797A (en) * 2017-09-30 2018-01-19 广东欧珀移动通信有限公司 Document handling method, device, storage medium and electronic equipment
CN109254849B (en) * 2018-08-31 2021-03-30 北京小米移动软件有限公司 Application program running method and device
CN109254849A (en) * 2018-08-31 2019-01-22 北京小米移动软件有限公司 The operation method and device of application program
CN111190721A (en) * 2018-11-15 2020-05-22 青岛海信移动通信技术股份有限公司 Method for processing application program in mobile terminal and mobile terminal
CN112527403A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Application starting method and electronic equipment
WO2021052437A1 (en) * 2019-09-19 2021-03-25 华为技术有限公司 Application start method and electronic device
US11947974B2 (en) 2019-09-19 2024-04-02 Honor Device Co., Ltd. Application start method and electronic device
CN113076179A (en) * 2020-01-06 2021-07-06 深圳市万普拉斯科技有限公司 Electrochromic module control method and device, mobile terminal and readable storage medium
CN113076179B (en) * 2020-01-06 2023-03-31 深圳市万普拉斯科技有限公司 Electrochromic module control method and device, mobile terminal and readable storage medium
CN113721933A (en) * 2020-05-25 2021-11-30 网神信息技术(北京)股份有限公司 Data processing method and device for application program, computing equipment and medium
CN113721933B (en) * 2020-05-25 2024-08-23 奇安信网神信息技术(北京)股份有限公司 Data processing method and device for application program, computing equipment and medium

Similar Documents

Publication Publication Date Title
CN106020957A (en) Process creation method for mobile communication terminal and mobile communication terminal
CN105228182B (en) Dual-card configuration method and device of multi-mode dual-card mobile terminal
CN110083444B (en) Task management method and device
JP5593404B2 (en) System and method for executing threads in a processor
CN105446776A (en) Application program closing method and device and electronic equipment
CN107577523B (en) Task execution method and device
CN105824664A (en) Start monitoring method and device of application program and terminal equipment
CN103838353A (en) Method and terminal for controlling processor operation
CN106528290A (en) Resource scheduling method for mobile terminal and mobile terminal
CN109445918B (en) Task scheduling method, device, terminal and storage medium
WO2014137958A1 (en) Adaptive data synchronization
CN112559176B (en) Instruction processing method and device
CN111338803B (en) Thread processing method and device
CN102215481A (en) Mobile terminal and resource downloading method
US20160321597A1 (en) Device, System, and Method for Team Formation
CN111708642A (en) Processor performance optimization method and device in VR system and VR equipment
CN106775975B (en) Process scheduling method and device
CN114244642B (en) Control method and device of equipment, computer readable storage medium and processor
CN114721742A (en) Application program starting optimization method and device, computer equipment and storage medium
CN104702534A (en) Method and device for processing data of multi-process sharing port
CN104750519A (en) Starting method for mobile terminal and mobile terminal
CN114629960A (en) Resource scheduling method, device, system, device, medium, and program product
CN106686627B (en) WiFi/hotspot starting method and device
CN112817428A (en) Task running method and device, mobile terminal and storage medium
CN114788357A (en) Method and apparatus for prioritized 5G NSA cell (re) selection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161012

RJ01 Rejection of invention patent application after publication