CN112783623A - Process scheduling method and device, electronic equipment and storage medium - Google Patents

Process scheduling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112783623A
CN112783623A CN202110057506.6A CN202110057506A CN112783623A CN 112783623 A CN112783623 A CN 112783623A CN 202110057506 A CN202110057506 A CN 202110057506A CN 112783623 A CN112783623 A CN 112783623A
Authority
CN
China
Prior art keywords
execution sequence
network communication
application program
priority
scheduling
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
CN202110057506.6A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110057506.6A priority Critical patent/CN112783623A/en
Publication of CN112783623A publication Critical patent/CN112783623A/en
Pending legal-status Critical Current

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/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

Abstract

The disclosure relates to a process scheduling method and device, electronic equipment and a storage medium. The method comprises the following steps: in the condition that the application program is in a foreground, scheduling a main process of the application program to a first execution sequence with higher priority than a default execution sequence from the default execution sequence; under the condition that the application program comprises a network communication process, scheduling the network communication process into a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence. The method can also schedule the network communication process corresponding to the application program to the execution sequence with higher priority under the condition that the application program is in the foreground, so that a user can quickly execute the service with higher requirement on network communication when the application program is operated by the foreground.

Description

Process scheduling method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a process scheduling method and apparatus, an electronic device, and a storage medium.
Background
Most applications in electronic devices need to interact with other devices through networking. At least one network communication process is usually required to be included in these applications to perform the above-mentioned interaction with other devices.
In the related art, network communication processes are regarded as a type of processes that have relatively low requirements for execution efficiency, and are therefore designed to be executed in an execution sequence with a low priority.
However, in practical applications, there are services that require high network communication in addition to services that require low network communication, such as sending messages. For example, for a red packet robbing service in a group, or a robbing order service by a forensics, a delay of the order of milliseconds may result in a failed execution of the service.
Disclosure of Invention
The present disclosure provides a process scheduling method and apparatus, an electronic device, and a storage medium, which can schedule a network communication process corresponding to an application program into an execution sequence with a higher priority, and then quickly execute a service with a higher requirement on network communication, when the application program is in a foreground.
According to a first aspect of the present disclosure, there is provided a process scheduling method, including:
in the condition that the application program is in a foreground, scheduling a main process of the application program to a first execution sequence with higher priority than a default execution sequence from the default execution sequence;
under the condition that the application program comprises a network communication process, scheduling the network communication process into a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
According to a second aspect of the present disclosure, there is provided a process scheduling apparatus, including:
the first process scheduling unit is used for scheduling the main process of the application program from a default execution sequence to a first execution sequence with higher priority than the default execution sequence under the condition that the application program is in a foreground;
the second process scheduling unit is used for scheduling the network communication process into a second execution sequence under the condition that the application program comprises the network communication process; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of the first aspect by executing the executable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the first aspect.
In the technical scheme of the disclosure, the process included in the application program can be scheduled based on the current state of the application program. Specifically, when the application is detected to be in the foreground, in addition to scheduling the main process of the application to the execution sequence with higher priority, the network communication process included in the application is further scheduled to the execution sequence with priority not lower than the execution sequence in which the main process is located.
It will be appreciated that where an application is in the foreground, meaning that the application is being operated or is about to be operated, it is necessary to enable the application to react quickly on the user's actions, and therefore the main process of the application is scheduled into a higher priority execution sequence to meet the above-described immediate reaction of the application to the user's actions. Accordingly, the application is being operated or about to be operated, meaning that the user is likely to need to interact with other devices through the application. In this case, the network communication process in the application program is also scheduled to the execution sequence with higher priority, so that the interaction efficiency with other devices can be greatly improved. Particularly, under the scene that the user has extremely high requirements on interaction efficiency, such as red packet robbing and order robbing, the success rate of the user in red packet robbing or order robbing can be greatly improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart diagram illustrating a method of process scheduling in an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart diagram illustrating another method of process scheduling in an exemplary embodiment of the present disclosure;
FIG. 3 is a block diagram of a process scheduling apparatus according to an exemplary embodiment of the present disclosure;
fig. 4 is a block diagram of another process scheduling apparatus according to an exemplary embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Most applications in electronic devices need to interact with other devices through networking. At least one network communication process is usually required to be included in these applications to perform the above-mentioned interaction with other devices.
In the related art, network communication processes are regarded as a type of processes that have relatively low requirements for execution efficiency, and are therefore designed to be executed in an execution sequence with a low priority.
However, in practical applications, there are services that require high network communication in addition to services that require low network communication, such as sending messages. For example, for a red packet robbing service in a group, or a robbing order service by a forensics, a delay of the order of milliseconds may result in a failed execution of the service.
It can be seen that when services such as robbing a red packet, robbing an order, etc. are executed, if the execution method in the related art is still adopted, it is likely that the network communication process is executed in the execution sequence with a lower priority, so that the red packet or the order cannot be robbed.
Therefore, the present disclosure provides a process scheduling method to avoid the problem in the related art that the execution success rate of a service requiring higher network communication is not high due to the fact that a network communication process is executed in a sequence with lower priority.
Fig. 1 is a flowchart illustrating a process scheduling method according to an exemplary embodiment of the present disclosure. As shown in fig. 1, the method may include the steps of:
and 102, under the condition that the application program is in the foreground, scheduling the main process of the application program to a first execution sequence with higher priority than the default execution sequence from the default execution sequence.
The execution subject of the technical solution of the present disclosure may be any type of electronic device, for example, the electronic device may be a mobile terminal such as a smart phone and a tablet Computer, or may also be a fixed terminal such as a smart television and a PC (Personal Computer). It should be understood that only electronic devices that can install an application program including a network communication process and enable the application program to be displayed in the foreground can be used as the electronic devices in the present disclosure, and specifically, which type of electronic device is used as the execution subject of the technical solution of the present disclosure can be determined by those skilled in the art according to actual needs, and the present disclosure is not limited thereto.
As is apparent from the above description, the network communication process is regarded as a process that is not highly required for network communication in the related art, and therefore, it is generally designed to be executed in an execution sequence with a lower priority. The reason why the requirement of the network communication process on the network communication is not high is that only the network communication process is considered to be used in the related technology: services like messaging, voice communication, etc. that are not particularly demanding for network communications, it should be appreciated that delays of milliseconds, or even seconds, for messaging, voice communication, etc. do not have a significant impact. However, with the increasing demand of user services, a great deal of services with extremely high requirements on network communication appear, for example, a red packet robbing service often appearing in a group of instant application programs, and millisecond-level delay affects the result of the red packet robbing; for another example, as the take-away industry becomes more competitive, the take-away personnel need to grab an order on the application to get the order task, and the same millisecond delay affects the order result.
Step 104, under the condition that the application program comprises a network communication process, scheduling the network communication process to a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
Based on the above reasons, the present disclosure does not simply place the network communication process of the application program in the execution sequence with a lower priority for execution, but schedules the execution sequence in which the network communication process is located according to the status of the application program, so as to improve the network communication quality in due time, and further improve the execution success rate of the service with a higher requirement for network communication.
Specifically, the present disclosure may monitor whether an application is in the foreground. In the case that the application program is determined to be in the foreground, on one hand, a main program of the application program can be dispatched to a first execution sequence with higher priority than the default execution sequence from the default execution sequence; on the other hand, if the application program includes a network communication process, the network communication process may be further adjusted to a second execution sequence having a priority not lower than the first execution sequence.
It should be understood that the application is not in the foreground, for example, running in the background, which means that the user does not operate the application, and the application does not need to react immediately based on the user operation, and at this time, the main process of the application is executed in the default execution sequence with a lower priority. And when the application program is in the foreground, the user needs to operate on the application program, and the application program needs to immediately react to the user operation, at this time, the main process of the application program can be scheduled from the default execution sequence to a first execution sequence with higher priority than the default execution sequence, so as to improve the reaction speed of the application program. It will be appreciated that the main program executed in the first execution sequence enables the application to react instantaneously to the user's operation, and is obviously a higher priority execution sequence. It is assumed that if the first execution sequence is not the execution sequence with higher priority, it is inevitably impossible to react to the user operation in real time, for example, when the user slides up and down a certain session page, if the priority of the first execution sequence is not high, the session page cannot be slid along with the finger stroke. It can be seen that the first execution sequence is necessarily a higher priority execution sequence (the speed of reaction of the application to user operations when the host process executes therein is typically in milliseconds). On the basis, the network communication process contained in the application program is further dispatched to a second execution sequence with the priority not lower than that of the first execution sequence, which means that the priority of the execution sequence in which the network communication process is positioned is consistent with or higher than that of the execution sequence in which the main process is positioned. In other words, the network communication quality can be greatly improved by executing the network communication process in the second sequence, so that the success rate of service execution can be improved in services such as red packet robbery.
In the present disclosure, scheduling a network communication process included in an application program into a second execution sequence having a priority not lower than that of the first execution sequence may be implemented by: an identifier of the network communication process is written to a file node for storing the processes in the second execution sequence.
In the present disclosure, the main process of the application program is used to make the application program normally run, and is mainly used to display the interactive interface of the application program so as to perform an instant reaction according to the operation of the user.
In the present disclosure, the type of process may be determined based on the name of the process. Specifically, the name of each process corresponding to the application program may be preferentially determined; and then judging whether the name of each process contains identification information related to network communication, and if the name of any process contains the identification information related to network communication, determining the process as the network communication process contained in the application program.
For example, assuming that the name of a process is com.tent.mm.push, the push included therein is identification information related to the network communication process, and at this time, the process may be determined as the network communication process, and then added to the second execution sequence.
In the present disclosure, the priority of execution sequences may be determined by different factors in different situations.
In one case, the priority of the execution sequence may be related to the called processor core, specifically, the performance of the processor core called by the execution sequence with a relatively higher priority is better than the performance of the processor core called by the execution sequence with a relatively lower priority, as exemplified by the default execution sequence, the first execution sequence and the second execution sequence (here, the priority of the second execution sequence is higher than the priority of the first execution sequence), and the performance of the processor core called by the second execution sequence is better than the performance of the processor core called by the first execution sequence; and the performance of the processor core called by the first execution sequence is better than that of the processor core called by the second execution sequence.
In another case, the priority of the execution sequence may be related to the execution order of the included processes, specifically, the processes in the execution sequence with relatively higher priority are executed earlier than the processes in the execution sequence with relatively lower priority, and still take the default execution sequence, the first execution sequence, and the second execution sequence as an example (for example, the priority of the second execution sequence is higher than the priority of the first execution sequence), when all of the processes exist in the three sequences, the processes included in the second execution sequence are preferentially executed, the processes included in the first execution sequence are executed again, and the processes included in the default execution sequence are executed finally.
In yet another case, the execution sequence of relatively higher priority not only calls the processor core better in performance than the processor core called by the execution sequence of relatively lower priority, but also contains processes that are executed earlier than the processes in the execution sequence of relatively lower priority.
Of course, the above examples are merely illustrative, and it should be understood that the priority of the execution sequence can be determined by those skilled in the art according to practical situations, and the present disclosure does not limit this.
It should be noted that the performance of the processor core executing the sequence call in the present disclosure may depend on the number of processor cores called by the execution sequence, and may also depend on the performance of the single processor core called. The above default execution sequence, the first execution sequence, and the second execution sequence are also exemplified (here, the priority of the second execution sequence is higher than that of the first execution sequence): if it depends on the performance of a single processor core, the processor core called by the second execution sequence may be the processor core with the best performance, such as a conventional oversized core; the processor core that the first execution sequence calls may be a medium performance processor core, such as a traditionally large core; the processor core that the default execution sequence calls may be a processor core with poor performance, such as a corelet in the traditional sense; if depending on the number of processor cores called, the processor core called by the first execution sequence may be 2 when the processor core called by the second execution sequence is 3, while the processor core called by the default execution sequence may be 1.
Of course, the performance of the processor core executing the sequence call may be related to the number of the called processor cores and the performance of the single processor core. For example, in practical applications, a top-app execution sequence is usually pre-constructed in a memory, and 1 supercore and 3 supercore can be called; and a foreground execution sequence and a background execution sequence are also constructed, wherein the foreground execution sequence can generally call 3 big cores, and the background execution sequence can only call 3 small cores.
In this disclosure, when it is determined that the application includes a network communication process, the processor or a core related to the second execution sequence in the processor may be switched to the performance enhancement mode, so as to improve execution efficiency of network communication, and further improve quality of service of the network communication. For example, the processor may be switched to the performance enhancement mode by modifying a value associated with the processor frequency in the node file storing the processor frequency to a higher value. A similar approach is also applicable to cores in a processor associated with a second execution sequence.
Since the purpose of scheduling the network communication process into the second execution sequence is to improve the network communication quality, the present disclosure may further determine whether the network communication process is used for executing the high communication requirement service in a case where it is determined that the network communication process is included in the application program. When it is determined that the network communication process is used to execute the high communication requirement service, the network communication process may be scheduled into the second execution sequence. Wherein, the high communication requirement service refers to: for services with high requirements on network communication quality, the execution success rate of the services is usually positively correlated with the network communication quality. For example, the high communication request service may be the red packet robbing service or the order robbing service.
Network communication quality in the present disclosure may be measured from multiple dimensions. For example, the network communication quality may only represent the network transmission speed, in which case the execution success rate of the high communication demand service is positively correlated with the network transmission speed; as another example, the network communication quality is also related to the stability of the network based on the network transmission speed.
It should be understood that the priority of different execution sequences is typically different. Therefore, when the second execution sequence coincides with the priority of the first execution sequence, the second execution sequence and the first execution sequence may be the same execution sequence. For example, taking the above example of the top-app execution sequence, if the main process of the application program is scheduled to the top-app execution sequence, then the network communication process of the application program may also be scheduled to the top-app execution sequence.
According to the technical scheme, the main process of the application program can be scheduled to the execution sequence with higher priority under the condition that the application program is in the foreground, so that the application program can immediately react to the operation of a user. When the application program further comprises a network communication process, the network communication process is further scheduled to an execution sequence with the priority not lower than that of the execution sequence in which the main process is positioned, so that the network communication process can also be executed in the execution sequence with higher priority. Obviously, since the network communication process is in the execution sequence with higher priority, the network communication quality of the application program is also greatly improved, and when a high communication requirement service exists in the application program and needs to be executed, the high communication requirement service can be executed quickly. For example, when the high communication request service is a red packet robbing service, an instruction for robbing the red packet can be quickly sent to the server, so as to improve the success rate of the red packet robbing.
Furthermore, the present disclosure may further determine whether the network communication process in the application is used for executing the high communication requirement service, and only when it is determined that the network communication process is used for executing the high communication requirement service, the network communication process is scheduled to the execution sequence with a higher priority, so as to effectively avoid a problem that the network communication process is still scheduled to the execution sequence with a higher priority and occupies a high performance processing resource when the network communication process is not used for executing the high communication requirement service.
The technical solution of the present disclosure is described below by way of specific examples.
Fig. 2 is a flowchart illustrating another process scheduling method according to an exemplary embodiment of the present disclosure. As shown in fig. 2, the method comprises the steps of:
in step 201, several execution sequences are created in the memory.
In this embodiment, several execution sequences may be created in the memory in advance. In particular, these execution sequences may be created at the time of startup of the electronic device.
By way of example, execution sequences A, B and C may be created.
In step 202, priorities are set for a number of execution sequences.
In this embodiment, priorities may be further set for the created execution sequences, for example, the priorities of the execution sequences A, B, C may be set to 1, 2, and 3.
It is assumed that the electronic device in this embodiment mounts an 8-core processor, which includes 1 super core, 3 large cores, and 4 small cores. Then, in this process, the processor cores that can be scheduled by each execution sequence need to be configured, for example, the execution sequence a may be configured as: 1 oversized core and 2 large cores can be scheduled; configuring the execution sequence B as: 1 big core and 2 little cores can be scheduled; configuring the execution sequence C as: 2 corelets can be scheduled. Obviously, in this configuration, the overall performance of the processor cores that can be called by the execution sequence a is better than that of the execution sequence B, and the overall performance of the processor cores that can be called by the execution sequence B is better than that of the execution sequence C.
In this step, the process included in any application program under different conditions may be further set in which execution sequence the process is respectively in. For example, for the main process of the instant communication application Y, it may be set to: if the instant communication application Y is in the foreground, scheduling the instant communication application Y to an execution sequence A; if the instant messaging application Y is in the background, it is scheduled into execution sequence B.
It is to be noted that steps 201 and 202 may be performed at any time before the application starts, for example, at the time of the electronic device starting as described above; for another example, the electronic device may be created and configured in memory before shipping.
Step 203, judging whether the application program is in the foreground; if so, go to step 204, otherwise, go to step 206.
In this embodiment, after any application is started, its host process may be scheduled to different execution sequences according to the situation of the application.
Still taking the instant messaging application Y as an example, if the instant messaging application Y is currently in the foreground, it may be scheduled to the execution sequence a; if instant messaging application Y is currently in the background, it may be scheduled into execution sequence B.
And step 204, scheduling the main process of the application program to a first execution sequence from a default execution sequence.
For example, for the instant messaging application Y, the execution sequence B is the default execution sequence, and the execution sequence a is the first execution sequence.
And step 205, scheduling the network communication process of the application program from the default execution sequence to the second execution sequence.
Taking the above example as a support, since there is no execution sequence with priority higher than that of the execution sequence a, the network process of the instant messaging application Y may also be scheduled into the execution sequence a, which is the case where the priorities of the first execution sequence and the second execution sequence are the same, in this case, the first execution sequence and the second execution sequence are the same.
It should be understood that if the current user robs the red packet in any group in the instant messaging application Y, since the network communication process of the instant messaging application Y is in the execution sequence with higher priority, it can interact with other devices more quickly, for example, a red packet robbing instruction can be sent to the remote server of the instant messaging application Y according to the user operation more quickly, so that the user is more likely to rob the red packet.
Step 206, the host process is scheduled into a default execution sequence.
According to the technical scheme, the network communication process of the application program can be scheduled to the execution sequence with higher priority under the condition that the application program is in the foreground, so that the method can interact with other equipment more quickly, and further improve the execution success rate of services with higher requirements on network communication quality, such as a red packet snatching.
Fig. 3 is a block diagram of a process scheduling apparatus according to an exemplary embodiment of the present disclosure. Referring to fig. 3, the apparatus includes a first process scheduling unit 301 and a second process scheduling unit 302.
A first process scheduling unit 301 configured to schedule a main process of an application program from a default execution sequence to a first execution sequence having a higher priority than the default execution sequence if the application program is in a foreground;
a second process scheduling unit 302, configured to, in a case where the application program includes a network communication process, schedule the network communication process into a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
Optionally, the host process is configured to display a user interaction interface of the application program.
Optionally, the second process execution unit 302 is further configured to:
under the condition that the application program comprises a network communication process and the network communication process is used for completing high communication requirement service, the network communication process is scheduled to a second execution sequence;
wherein the execution success rate of the high communication requirement service is positively correlated with the network communication quality.
Optionally, the high communication requirement service includes at least one of:
red packet issuing service and order robbery service.
Alternatively to this, the first and second parts may,
the performance of the processor core called by the execution sequence with relatively higher priority is better than that of the processor core called by the execution sequence with relatively lower priority; and/or the presence of a gas in the gas,
processes in an execution sequence having a relatively high priority are executed earlier than processes in an execution sequence having a relatively low priority.
As shown in fig. 4, fig. 4 is a block diagram of another process scheduling apparatus shown in an exemplary embodiment of the present disclosure, where the embodiment is based on the foregoing embodiment shown in fig. 3, and further includes: a determination unit 303 and a switching unit 304.
Optionally, the method further includes:
a determining unit 303 configured to determine names of respective processes corresponding to the application programs; and in the case that the name of any process is determined to contain identification information related to network communication, determining the process as a network communication process contained in the application program.
Alternatively to this, the first and second parts may,
a switching unit 304, configured to switch the processor or a core related to the second execution sequence in the processor to a performance enhancement mode if it is determined that the application program includes a network communication process.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Correspondingly, the present disclosure further provides a process scheduling apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the process scheduling method according to any of the above embodiments, for example, the method may include: in the condition that the application program is in a foreground, scheduling a main process of the application program to a first execution sequence with higher priority than a default execution sequence from the default execution sequence; under the condition that the application program comprises a network communication process, scheduling the network communication process into a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
Accordingly, the present disclosure also provides an electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and configured to be executed by one or more processors, the one or more programs including instructions for implementing the process scheduling method according to any of the above embodiments, such as the method may include: in the condition that the application program is in a foreground, scheduling a main process of the application program to a first execution sequence with higher priority than a default execution sequence from the default execution sequence; under the condition that the application program comprises a network communication process, scheduling the network communication process into a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
Fig. 5 is a block diagram illustrating an apparatus 500 for implementing a process scheduling method according to an example embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio), or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A process scheduling method, comprising:
in the condition that the application program is in a foreground, scheduling a main process of the application program to a first execution sequence with higher priority than a default execution sequence from the default execution sequence;
under the condition that the application program comprises a network communication process, scheduling the network communication process into a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
2. The method of claim 1, wherein the host process is configured to expose a user interaction interface of the application.
3. The method of claim 1, further comprising:
determining the name of each process corresponding to the application program;
and in the case that the name of any process is determined to contain identification information related to network communication, determining the process as a network communication process contained in the application program.
4. The method of claim 1, further comprising:
switching the processor or a core of the processor associated with the second execution sequence to a performance enhancement mode if it is determined that a network communication process is included in the application.
5. The method according to claim 1, wherein the scheduling the network communication process into a second execution sequence if the network communication process is determined to be included in the application program comprises:
under the condition that the application program comprises a network communication process and the network communication process is used for completing high communication requirement service, the network communication process is scheduled to a second execution sequence;
wherein the execution success rate of the high communication requirement service is positively correlated with the network communication quality.
6. The method of claim 5, wherein the high traffic demand service comprises at least one of:
red packet issuing service and order robbery service.
7. The method of claim 1,
the performance of the processor core called by the execution sequence with relatively higher priority is better than that of the processor core called by the execution sequence with relatively lower priority; and/or the presence of a gas in the gas,
processes in an execution sequence having a relatively high priority are executed earlier than processes in an execution sequence having a relatively low priority.
8. A process scheduling apparatus, comprising:
the first process scheduling unit is used for scheduling the main process of the application program from a default execution sequence to a first execution sequence with higher priority than the default execution sequence under the condition that the application program is in a foreground;
the second process scheduling unit is used for scheduling the network communication process into a second execution sequence under the condition that the application program comprises the network communication process; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1-7 by executing the executable instructions.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method according to any one of claims 1-7.
CN202110057506.6A 2021-01-15 2021-01-15 Process scheduling method and device, electronic equipment and storage medium Pending CN112783623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110057506.6A CN112783623A (en) 2021-01-15 2021-01-15 Process scheduling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110057506.6A CN112783623A (en) 2021-01-15 2021-01-15 Process scheduling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112783623A true CN112783623A (en) 2021-05-11

Family

ID=75757139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110057506.6A Pending CN112783623A (en) 2021-01-15 2021-01-15 Process scheduling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112783623A (en)

Similar Documents

Publication Publication Date Title
EP3188066B1 (en) A method and an apparatus for managing an application
US9667774B2 (en) Methods and devices for sending virtual information card
EP3276976A1 (en) Method, apparatus, host terminal, server and system for processing live broadcasting information
CN107370772B (en) account login method and device and computer readable storage medium
CN110231901B (en) Application interface display method and device
CN107888965B (en) Image gift display method and device, terminal, system and storage medium
CN109254849B (en) Application program running method and device
EP3731088B1 (en) Method and device for displaying information and storage medium
CN112019893A (en) Screen projection method and screen projection device of terminal
EP3236355B1 (en) Method and apparatus for managing task of instant messaging application
CN113032030A (en) Camera starting method and device, terminal equipment and storage medium
CN105912204B (en) Method and device for starting application interface
EP4054198A1 (en) Live broadcast method and apparatus, electronic device, and storage medium
CN112291631A (en) Information acquisition method, device, terminal and storage medium
US20220159336A1 (en) Method and system for displaying screen
CN109062625B (en) Application program loading method and device and readable storage medium
CN109491655B (en) Input event processing method and device
CN112783623A (en) Process scheduling method and device, electronic equipment and storage medium
CN110417987B (en) Operation response method, device, equipment and readable storage medium
CN112035246A (en) Method, device and system for acquiring virtual resources, electronic equipment and storage medium
CN107360315B (en) Information display method and device
CN109362244B (en) Data scheduling method and device
CN105893146B (en) Memory processing method and device
CN112769681B (en) Session display method and device, electronic equipment and storage medium
EP2940981A2 (en) Method and device for synchronizing photographs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination