CN118051313A - Process scheduling method and device, computer readable storage medium and terminal - Google Patents

Process scheduling method and device, computer readable storage medium and terminal Download PDF

Info

Publication number
CN118051313A
CN118051313A CN202410302021.2A CN202410302021A CN118051313A CN 118051313 A CN118051313 A CN 118051313A CN 202410302021 A CN202410302021 A CN 202410302021A CN 118051313 A CN118051313 A CN 118051313A
Authority
CN
China
Prior art keywords
group
processes
process group
executed
queue
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
CN202410302021.2A
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.)
Spreadtrum Communications Tianjin Co Ltd
Original Assignee
Spreadtrum Communications Tianjin 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 Spreadtrum Communications Tianjin Co Ltd filed Critical Spreadtrum Communications Tianjin Co Ltd
Priority to CN202410302021.2A priority Critical patent/CN118051313A/en
Publication of CN118051313A publication Critical patent/CN118051313A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A process scheduling method and device, a computer readable storage medium and a terminal, wherein the method comprises the following steps: acquiring a process queue to be executed, wherein the process queue to be executed comprises a first process group and a second process group, the IO priority of a process in the first process group is higher than that of a process in the second process group, and the association degree of the process in the first process group and the system running smoothness is higher than that of the process in the second process group; and preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration. By adopting the scheme, the smoothness of the system operation can be improved, and the conditions of blocking, screen blacking, no response and the like during the system operation are relieved and even avoided, so that the user experience is influenced.

Description

Process scheduling method and device, computer readable storage medium and terminal
Technical Field
The present invention relates to the field of computers, and in particular, to a process scheduling method and apparatus, a computer readable storage medium, and a terminal.
Background
Computer systems typically include hardware such as a CPU (Central Processing Unit ), memory and storage devices, and software such as an operating system, application programs, and the like. The operating system is responsible for managing the work of resource allocation, scheduling and the like of the computer.
In modern computer systems, a process is a basic unit of execution, and a program when loaded into memory creates a process that can execute independently and has its own address space, sharing the system resources with other processes. When multiple processes compete for resources in the system at the same time, in order to ensure the normal operation of the whole system, the processes need to be managed reasonably and orderly.
Taking a mobile phone as an example, with the development of technology, the mobile phone has become an electronic device for people to live more and more. The existing smart phone can help the user to realize various functions, such as mobile payment, wireless internet surfing, and the like. The implementation of each function requires the execution of multiple processes to mobilize the required hardware, while it is more common that there are multiple processes waiting to execute. Requests (requests) for these processes are typically queued in an IO (Input/Output) scheduler, and the original process needs to be waited for, and the new process issued from the IO scheduler can be received after the location is released. If the processor processes the processes slowly, for example, EMMC (Embedded multimedia card) materials are not processed timely, the processes may be accumulated in the IO scheduler, and the processes may include some processes with high association degree with the smoothness of system operation, such as system processes or processes that can be directly perceived by a user, and when the system processes cannot be processed timely, the situations of user interface blocking, no response or even crash of the system processes occur, which affect the user experience.
Disclosure of Invention
The invention solves the technical problem of providing a process scheduling method and device, a computer readable storage medium and a terminal capable of improving the running smoothness of a system.
In order to solve the above technical problems, an embodiment of the present invention provides a process scheduling method, where the method includes: acquiring a process queue to be executed, wherein the process queue to be executed comprises a first process group and a second process group, the IO priority of a process in the first process group is higher than that of a process in the second process group, and the association degree of the process in the first process group and the system running smoothness is higher than that of the process in the second process group; and preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration.
Optionally, the dividing of the first process group and the second process group is implemented by a control group function.
Optionally, the method further comprises: and responding to the completion of the execution of the processes in the first process group, and sequentially executing the processes in the second process group according to the sequence of the expiration of the processes.
Optionally, the actions of the processes in the first process group are sequentially executed according to the sequence of the process expiration.
Optionally, the actions of the processes in the second process group are sequentially executed according to the sequence of the process expiration, and are implemented through a deadline scheduler.
Optionally, during execution of a process in the second process group, the method further comprises: in response to receiving a new process belonging to the first process group, suspending a process of the second process group currently being executed, and executing the new process.
Optionally, in the process queue to be executed, the processes in the first process group and the second process group are arranged according to the arriving sequence, each process is respectively associated with a group tag, and the group tag is used for identifying the process group to which the process belongs.
Optionally, the preferentially executing the processes in the first process group sequentially according to the sequence of the process expiration includes: retrieving the process with the group tag of the first process group in the process queue to be executed; and executing the retrieved processes with the group labels of the first process group in sequence according to the sequence of the process expiration.
Optionally, the processes of the first process group at least include: and the processes in the process queue to be executed can be directly perceived by the user.
Optionally, the processes of the first process group at least include: the user uses the highest frequency of the previous preset number of processes.
Optionally, the means capable of being directly perceived by the user is at least selected from: can be perceived by a user visually, can be perceived by a user audibly, and can interact directly with the user.
Optionally, the method further comprises: monitoring the abnormal times of a system when processes which do not belong to the first process group in the process queue to be executed are executed; and in response to the abnormal times of the system exceeding a preset threshold, adjusting the process to a process group with IO priority higher than the process group to which the process currently belongs.
In order to solve the above technical problem, an embodiment of the present invention further provides a process scheduling device, including: the system comprises a queue acquisition module, a processing module and a processing module, wherein the queue acquisition module is used for acquiring a process queue to be executed, the process queue to be executed comprises a first process group and a second process group, wherein IO priority of processes in the first process group is higher than IO priority of processes in the second process group, and the association degree of processes in the first process group and the smoothness of system operation is higher than the association degree of processes in the second process group and the smoothness of system operation; and the process execution module is used for preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration.
Optionally, the process execution module includes a deadline scheduler.
To solve the above technical problem, an embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium is a non-volatile storage medium or a non-transitory storage medium, and a computer program is stored on the computer readable storage medium, where the computer program is executed by a processor to perform the steps of the above method.
In order to solve the above technical problem, an embodiment of the present invention further provides a terminal, including a memory and a processor, where the memory stores a computer program that can be run on the processor, and the method is characterized in that the processor executes the steps of the above method when running the computer program.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
The embodiment of the invention provides a process scheduling method, which comprises the following steps: acquiring a process queue to be executed, wherein the process queue to be executed comprises a first process group and a second process group, the IO priority of a process in the first process group is higher than that of a process in the second process group, and the association degree of the process in the first process group and the system running smoothness is higher than that of the process in the second process group; and preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration.
In the embodiment of the invention, the first process group and the second process group are distinguished according to the association degree of the processes and the system operation smoothness, and the processes in the first process group are executed in preference to the processes in the second process group. Therefore, the process with high relation degree with the system running smoothness can be preferentially executed, and the problem that the system is abnormal and user experience is affected due to unreasonably delayed processing of the process (for example, due to late arrival queue time) is avoided.
Further, for the processes in each of the first process group and the second process group, the processes are executed according to the sequence of the expiration of the processes, so that the situation that the system is blocked and even the equipment is halted due to the delay response of the system is avoided.
Further, IO priority of the process is adjusted by monitoring the number of system exceptions when processes which do not belong to the first process group in the process queue to be executed are executed. Therefore, the IO priority of different processes can be adjusted in a targeted manner according to the use habits of different users, and the user satisfaction can be effectively improved.
Drawings
FIG. 1 is a flow chart of a process scheduling method according to an embodiment of the present invention;
FIG. 2 is a flow chart of one embodiment of step S12 of FIG. 1;
FIG. 3 is a flow chart of IO priority adjustment in accordance with an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a process scheduling apparatus according to an embodiment of the present invention.
Detailed Description
As described in the background art, the existing process scheduling method easily causes that a process with a high degree of relevance to the smoothness of system operation is delayed to be executed, so that the system is blocked, unresponsive, and the like.
Specifically, the existing general process scheduling method ranks all processes at the same time according to the same standard judgment priority (or IO priority). It is possible that some unimportant processes (e.g., processes with a low degree of association with system smoothness) will be prioritized under the unified criteria (e.g., higher priority than expired earlier) over important processes (e.g., processes with a high degree of association with system smoothness), resulting in the important processes being delayed.
The most direct embodiment of the situation on the user side is that the terminal equipment is blocked, black screen, even changed into brick, and the like, so that the user experience is seriously affected, and the user experience is poor.
In order to solve the above technical problems, an embodiment of the present invention provides a process scheduling method, where the method includes: acquiring a process queue to be executed, wherein the process queue to be executed comprises a first process group and a second process group, the IO (Input/Output) priority of the processes in the first process group is higher than the IO priority of the processes in the second process group, and the association degree of the processes in the first process group and the system running smoothness is higher than the association degree of the processes in the second process group and the system running smoothness; and preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration.
In the embodiment of the invention, the first process group and the second process group are distinguished according to the association degree of the processes and the system operation smoothness, and the processes in the first process group are executed in preference to the processes in the second process group. Therefore, the process with high degree of relevance to the smoothness of system operation can be preferentially executed, and the problem that the system is abnormal and user experience is affected due to the fact that the process is delayed is avoided.
Further, for the processes in each of the first process group and the second process group, the processes are executed according to the sequence of the expiration of the processes, so that the situation that the system is blocked and even the equipment is halted due to the delay response of the system is avoided.
In order to make the above objects, features and advantages of the present invention more comprehensible, embodiments accompanied with figures are described in detail below.
FIG. 1 is a flow chart of a process scheduling method according to an embodiment of the present invention.
The embodiment can be applied to terminal equipment with an intelligent operating system. The intelligent operating system may be, for example, an Android (Android) system or the like. The terminal equipment can be intelligent equipment capable of realizing man-machine interaction, such as a mobile phone, an intelligent television, a tablet personal computer, a notebook computer and the like.
Specifically, referring to fig. 1, the process scheduling method according to the present embodiment may include the following steps:
step S11, a process queue to be executed is obtained, wherein the process queue to be executed comprises a first process group and a second process group, IO priority of processes in the first process group is higher than IO priority of processes in the second process group, and association degree of processes in the first process group and system operation smoothness is higher than association degree of processes in the second process group and system operation smoothness.
More specifically, when a user operates on a terminal device to run a program, the operating system creates one or more processes for the program. These processes are responsible for executing the code of the program and interacting with the operating system to accomplish various tasks. The process to be executed queue may be considered as a list containing a plurality of processes that have not yet been executed. Further, after the process is generated, in order to implement the corresponding function, the process issues IO (Input/Output) requests (requests), and the operating system processes the IO requests to implement the corresponding function. The IO priority essentially refers to the priority of IO requests.
In some embodiments, the process queue to be executed may be obtained in response to the previous process being executed, or may be added in response to a new process.
Further, the processes in the process queue to be executed are divided into a first process group and a second process group according to the degree of correlation with the smoothness of system operation. The processes in the first process group have a higher degree of association with the smoothness of system operation, and can also be considered to have a greater influence on the system performance. Thus, a process in the first process group may have a higher IO priority than a process of the second process group. The IO priority of a process determines the access priority of the process to hardware resources (such as a central processing unit (Central Processing Unit, CPU), memory, disk, etc.). In other words, in the case of limited resources, for example, in the case of a mobile phone having a continuous large number of IO requests, such as filling data (data) space, transmitting a large file, downloading a large application, etc., the processes of the first process group will obtain resources for CPU processing and input/output operations more preferentially than those of the second process group.
In a variation, the process queue to be executed may further include a third process group, where the IO priority of the process in the third process group is lower than the IO priority of the process in the first process group and the second process group. In other words, in the case of resource priority, when the processes in the first process group and the second process group are all executed, the process in the third process group is executed.
In some embodiments, the processes of the first process group include at least: and the processes in the process queue to be executed can be directly perceived by the user.
Further, the means capable of being perceived directly by the user is at least selected from: can be perceived by a user visually, can be perceived by a user audibly, and can interact directly with the user. In some embodiments, the means capable of being directly perceived by the user further includes means of multi-sensory combination.
In a typical application scenario, a process that can be perceived directly by a user may for example include:
1. Processes associated with user interface rendering that are responsible for drawing and updating content on the cell phone screen, such as application icons, interface elements, text, etc.;
2. Audio and video playing processes, when a user plays music, video or performs voice call, the related processes need to process audio and video data in real time so as to ensure smooth playing and call experience;
3. And a touch event processing process, wherein when a user touches the mobile phone screen, the system generates a touch event and processes the touch event by the corresponding process. These processes are responsible for identifying the user's operational intent (e.g., swipe, click, long press, etc.) and triggering a corresponding action or response.
Since the above processes directly affect the interactive experience of the user using the terminal device, they need to be preferentially handled.
In some embodiments, the processes in the first process group may further include: key system service processes for implementing key system services such as input method services, notification services, etc. Such processes are responsible for handling user input, displaying system notifications, etc. tasks, and are critical to maintaining the normal operation and user experience of the system.
In some embodiments, the processes of the first process group may further include: the user uses the highest frequency of the previous preset number of processes. The frequency of use of a user is an important indicator reflecting the importance of a process (or a process for implementing or associated with an application). If a process is frequently used by a user, it is likely to have a significant impact on the user's daily operations and experience. Therefore, the processes used at high frequency are classified into the first process group, and are given higher IO priority, so that the processes can be ensured to be processed quickly when needed, and the overall satisfaction of users is improved.
In one possible scheme, a machine learning model may be preset on a terminal device or apparatus to which the method is applied, where the machine learning model may obtain a usage habit (specifically, a frequency of a certain process being used) of a user, and determine or adjust an IO priority of the certain process according to the usage habit. Therefore, the process scheduling can be more personalized, the use habit of a single user on the terminal equipment or the device is more met, and the use experience of the user can be further improved.
Further, the preset number may be, for example, 10 to 50. Thus, it can be ensured that the first process group is not too large, thereby avoiding excessive concentration or waste of resources.
In some embodiments, the specific value of the preset number may be dynamically adjusted according to the performance of the system, the resource status, and the user requirement. For example, on a higher performing handset, a relatively large number may be set to accommodate more high frequency use processes; on a weaker device, a smaller number may need to be set to ensure that the critical process gets enough resources.
Further, the method further includes step S12, where the processes in the first process group are executed in sequence preferentially according to the sequence of the process expiration.
Specifically, each process will have a predetermined expiration time when it is created, i.e., the process needs to complete execution before a certain time. The expiration time may be determined based on a variety of factors, such as the urgency of the process, the impact on system performance, and the like. Therefore, the processes are executed according to the sequence of the process expiration, each process can be ensured to be executed before the expiration, and the situation that the system is blocked and even the equipment is halted due to the delay response of the system is avoided.
In some embodiments, the partitioning of the first process group and the second process group is accomplished by a control group function (also commonly referred to as cgroup, control groups). The control group function provides a mechanism by which task sets (e.g., including processes, threads, and all future sub-levels thereof) can be aggregated and partitioned into a hierarchy group with specialized behavior. The hierarchical set may be, for example, a first process set and a second process set.
Further, the method further comprises: and responding to the completion of the execution of the processes in the first process group, and sequentially executing the processes in the second process group according to the sequence of the expiration of the processes.
In a typical application scenario, the processes in the first process group are all executed and the processes in the second process group have begun to be executed. If a new process is created at this time, the process queue to be executed needs to be updated. If the new process falls into the first process group, the new process is still preferentially executed. At this time, the processes in the second process group are in a blocking state.
In some embodiments, the act of sequentially executing the processes in the first process group in order of process expiration may be implemented by a deadline scheduler (deadline scheduler). In some embodiments, the deadline scheduler may be implemented based on deadline programs deployed at the terminal device.
In some embodiments, the actions of sequentially executing the processes in the second process group in the order of the process expiration may also be implemented by a deadline scheduler.
In some embodiments, during execution of a process in the second set of processes, the method further comprises: in response to receiving a new process belonging to the first process group, suspending a process of the second process group currently being executed, and executing the new process.
In particular, the suspension (suspend) may be considered an operation at the operating system level, meaning that execution of a process (e.g., a process in the second process group) is temporarily interrupted, put into a waiting state, but not completely terminated. This is done to free up the CPU or other resources occupied by the process so that these resources can be used by other processes, such as processes in the first process group. In other words, the process of the second process group currently executing may be suspended to make resources available to the new process of the first process group.
In a typical application scenario, the background of the user's handset is performing processes such as data synchronization and application update, and at this time the handset receives a new instruction from the user about opening an application, and accordingly, a plurality of processes related to the application are created. At this time, the processes such as data synchronization and application update can be temporarily suspended, and the processes related to the application software are preferentially processed or executed, so that the smoothness of the user side is ensured, and the user experience is improved.
In some embodiments, the processes in the first process group and the second process group are arranged according to the arrival sequence, and each process is respectively associated with a group tag, where the group tag is used to identify the process group to which the process belongs. Thus, the processes of the different process groups can be clearly distinguished and managed to facilitate intelligent scheduling and allocation according to their IO priorities and resource requirements. This helps to improve the overall performance and user experience of the system, ensuring that critical processes are prioritized while maintaining the stability and reliability of the system.
It should be appreciated that when multiple processes are created, in a queue of processes to be executed, the multiple processes may be arranged according to the order in which they are created (or arrive at the queue), and then the order in which they are executed may be determined according to the order in which they are due, without the ordering of the two processes contradicting each other.
Further, the group tag may be a label or identifier. Specific implementations of the associated group tag may be, for example, tagging an add field in a process descriptor (otherwise referred to as a process control block, process Control Block, PCB), establishing a mapping table between a process and a group tag, storing a group tag in metadata of a process, etc.
Fig. 2 is a flowchart of one embodiment of step S12 in fig. 1.
Referring to fig. 2, step S12 may further include:
step S121, retrieving a process with a group tag of the first process group in the process queue to be executed; and
Step S122, the retrieved processes with the group labels of the first process group are sequentially executed according to the sequence of the process expiration.
Specifically, when step S121 is performed, the process queue to be performed may be traversed, and it is checked whether each process is tagged with the group tag of the first process group. This process is similar to a screening operation in that it excludes processes that do not belong to the first process group, and only those processes that have the first process group label are retained as objects to be executed.
Further, when at least one process with a group tag of the first process group is retrieved, the order of execution of the processes may be determined based on the expiration time of each process. The execution mode ensures that key processes or emergency processes (i.e. processes with strict time requirements) can be processed in time, thereby improving the response speed and efficiency of the system.
From the above, through the above two steps (step S121 and step S122), the processes in the first process group can be intelligently managed, ensuring that they are executed in order of expiration time. The method is beneficial to optimizing the resource allocation and process scheduling of the system, and particularly when processes with time sensitivity are processed, the smoothness and user experience of the system can be obviously improved.
Fig. 3 is a flowchart of IO priority adjustment according to an embodiment of the present invention.
Referring to fig. 3, the process scheduling method may further include:
Step S13, monitoring the abnormal times of the system when processes which do not belong to the first process group in the process queue to be executed are executed; and
And step S14, in response to the abnormal times of the system exceeding a preset threshold, adjusting the process to a process group with IO priority higher than the process group to which the process currently belongs.
In particular, the execution of processes that do not belong to the first process group (i.e., have a relatively low priority) is continuously monitored. The monitoring behavior can be realized by means of logging, performance counters, exception capture mechanisms and the like.
Further, when the foregoing process is executed, if an abnormal event occurs in the system (such as a crash, a jam, a resource deficiency, etc., which affects the stability and smoothness of the system), the abnormal event of the system may be recorded. And, as the monitoring actions continue, the number of system anomalies gradually accumulates.
When the number of system anomalies exceeds a preset threshold, this means that the current system stability or smoothness has been greatly affected. The preset threshold may be, for example, 1-5 times.
Further, processes causing the number of system exceptions exceeding a preset threshold may be adjusted to a process group having an IO priority higher than the process group to which they currently belong when formed next time. For example, if the process originally belongs to the second process group, the process is adjusted to the first process group at this time, and the group tag of the second process group is cleared and the group tag of the first process group is associated with the second process group.
By adjusting the processes to the process group with higher IO priority, the processes can be ensured to be executed preferentially, more resources and better execution environments can be obtained, the occurrence of system abnormality is reduced, the smoothness of the system is improved, and the execution efficiency of the processes is improved.
From the above, in the embodiment of the present invention, the first process group and the second process group are distinguished according to the association degree of the process and the system operation smoothness, and the process in the first process group is executed in preference to the process in the second process group. Therefore, the process with high relation degree with the system running smoothness can be preferentially executed, and the problem that the system is abnormal and user experience is affected due to unreasonably delayed processing of the process (for example, due to late arrival queue time) is avoided.
Further, for the processes in each of the first process group and the second process group, the processes are executed according to the sequence of the expiration of the processes, so that the situation that the system is blocked and even the equipment is halted due to the delay response of the system is avoided.
Further, IO priority of the process is adjusted by monitoring the number of system exceptions when processes which do not belong to the first process group in the process queue to be executed are executed. Therefore, the IO priority of different processes can be adjusted in a targeted manner according to the use habits of different users, and the user satisfaction can be effectively improved.
Fig. 4 is a schematic structural diagram of a process scheduling apparatus 2 according to an embodiment of the present invention. It will be appreciated by those skilled in the art that the process scheduling apparatus 2 of the present embodiment may be used to implement the technical solutions of the methods described in the embodiments of fig. 1 to 3.
Referring to fig. 4, the process scheduling apparatus 2 includes:
A queue obtaining module 21, configured to obtain a process queue to be executed, where the process queue to be executed includes a first process group and a second process group, and the IO priority of a process in the first process group is higher than the IO priority of a process in the second process group, and the association degree of a process in the first process group with the smoothness of system operation is higher than the association degree of a process in the second process group with the smoothness of system operation;
And the process execution module 22 is configured to execute the processes in the first process group sequentially in the order of the process expiration.
For more details of the working principle and the working manner of the process scheduling apparatus 2, reference may be made to the related descriptions in fig. 1 to 3, which are not repeated here.
In some embodiments, the process execution module 22 further includes a deadline scheduler (not shown) that may be configured to: and sequentially executing the actions of the processes in the first process group according to the sequence of the process expiration, and sequentially executing the actions of the processes in the second process group according to the sequence of the process expiration.
The embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method described in the embodiments shown in fig. 1 to 3 above. The storage medium may include ROM, RAM, magnetic or optical disks, and the like. The storage medium may also include a non-volatile memory (non-volatile) or a non-transitory memory (non-transitory) or the like.
The embodiment of the application also provides a terminal, which comprises a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor executes the steps of the method in the embodiment shown in the figures 1 to 3 when running the computer program. The terminal includes, but is not limited to, a terminal device such as a television, a projector, etc.
It should be appreciated that in the embodiment of the present application, the processor may be a central processing unit (central processing unit, abbreviated as CPU), and the processor may also be other general purpose processors, digital signal processors (digital signalprocessor, abbreviated as DSP), application SPECIFIC INTEGRATED Circuits (ASIC), off-the-shelf programmable gate arrays (fieldprogrammable GATE ARRAY, abbreviated as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It should also be appreciated that the memory in embodiments of the present application may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an erasable programmable ROM (erasable PROM EPROM), an electrically erasable programmable ROM (ELECTRICALLY EPROM, EEPROM), or a flash memory. The volatile memory may be a random access memory (random access memory, RAM for short) which acts as an external cache. By way of example, and not limitation, many forms of random access memory (random access memory, abbreviated as RAM) are available, such as static random access memory (STATIC RAM, abbreviated as SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (doubledatarate SDRAM, abbreviated as DDR SDRAM), enhanced synchronous dynamic random access memory (ENHANCED SDRAM, abbreviated as ESDRAM), synchronous link dynamic random access memory (SYNCHLINK DRAM, abbreviated as SLDRAM), and direct memory bus random access memory (direct rambus RAM, abbreviated as DR RAM).
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer program may be stored in or transmitted from one computer readable storage medium to another, for example, by wired or wireless means from one website, computer, server, or data center.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus and system may be implemented in other manners. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only one logic function division, and other division modes can be adopted in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. The units described as separate units may or may not be physically separate, and units shown 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may be physically included separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units. For example, for each device or product applied to or integrated on a chip, each module/unit included in the device or product may be implemented in hardware such as a circuit, or at least some modules/units may be implemented in software program, where the software program runs on a processor integrated inside the chip, and the remaining (if any) part of modules/units may be implemented in hardware such as a circuit; for each device and product applied to or integrated in the chip module, each module/unit contained in the device and product can be realized in a hardware manner such as a circuit, different modules/units can be located in the same component (such as a chip, a circuit module and the like) or different components of the chip module, or at least part of the modules/units can be realized in a software program, the software program runs on a processor integrated in the chip module, and the rest (if any) of the modules/units can be realized in a hardware manner such as a circuit; for each device, product, or application to or integrated with the terminal, each module/unit included in the device, product, or application may be implemented in hardware such as a circuit, where different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components in the terminal, or at least some modules/units may be implemented in a software program, where the software program runs on a processor integrated within the terminal, and the remaining (if any) some modules/units may be implemented in hardware such as a circuit.
It should be understood that the term "and/or" is merely an association relationship describing the associated object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In this context, the character "/" indicates that the front and rear associated objects are an "or" relationship.
The term "plurality" as used in the embodiments of the present application means two or more. The first, second, etc. descriptions in the embodiments of the present application are only used for illustrating and distinguishing the description objects, and no order is used, nor is the number of the devices in the embodiments of the present application limited, and no limitation on the embodiments of the present application should be construed.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be made by one skilled in the art without departing from the spirit and scope of the invention, and the scope of the invention should be assessed accordingly to that of the appended claims.

Claims (14)

1. A method of scheduling a process, the method comprising:
Acquiring a process queue to be executed, wherein the process queue to be executed comprises a first process group and a second process group, the IO priority of a process in the first process group is higher than that of a process in the second process group, and the association degree of the process in the first process group and the system running smoothness is higher than that of the process in the second process group;
And preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration.
2. The method of claim 1, wherein the partitioning of the first process group and the second process group is accomplished by a control group function.
3. The method as recited in claim 1, further comprising:
and responding to the completion of the execution of the processes in the first process group, and sequentially executing the processes in the second process group according to the sequence of the expiration of the processes.
4. A method according to claim 3, wherein the actions of the processes in the first process group are performed sequentially in the order of the process expiration and/or the actions of the processes in the second process group are performed sequentially in the order of the process expiration, by means of a deadline scheduler.
5. A method according to claim 3, wherein during execution of a process in the second set of processes, the method further comprises:
In response to receiving a new process belonging to the first process group, suspending a process of the second process group currently being executed, and executing the new process.
6. The method of claim 1, wherein in the process to be executed queue, processes in the first process group and the second process group are arranged according to arrival order, each process is respectively associated with a group tag, and the group tag is used for identifying a process group to which the process belongs.
7. The method of claim 6, wherein the preferentially executing the processes in the first process group in order of the process expiration comprises:
Retrieving the process with the group tag of the first process group in the process queue to be executed;
and executing the retrieved processes with the group labels of the first process group in sequence according to the sequence of the process expiration.
8. The method of claim 1, wherein the processes of the first process group comprise at least: and the processes which can be directly perceived by the user and/or the processes with the highest use frequency are preset in the process queue to be executed.
9. The method according to claim 8, characterized in that said means that can be perceived directly by the user are selected at least from: can be perceived by a user visually, can be perceived by a user audibly, and can interact directly with the user.
10. The method as recited in claim 1, further comprising:
Monitoring the abnormal times of a system when processes which do not belong to the first process group in the process queue to be executed are executed;
And in response to the abnormal times of the system exceeding a preset threshold, adjusting the process to a process group with IO priority higher than the process group to which the process currently belongs.
11. A process scheduling apparatus, comprising:
The system comprises a queue acquisition module, a processing module and a processing module, wherein the queue acquisition module is used for acquiring a process queue to be executed, the process queue to be executed comprises a first process group and a second process group, wherein IO priority of processes in the first process group is higher than IO priority of processes in the second process group, and the association degree of processes in the first process group and the smoothness of system operation is higher than the association degree of processes in the second process group and the smoothness of system operation;
and the process execution module is used for preferentially executing the processes in the first process group in sequence according to the sequence of the process expiration.
12. The apparatus of claim 11, wherein the process execution module comprises a deadline scheduler.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium is a non-volatile storage medium or a non-transitory storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, performs the steps of the method according to any one of claims 1 to 10.
14. A terminal comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor executes the steps of the method according to any of claims 1 to 10 when the computer program is executed.
CN202410302021.2A 2024-03-15 2024-03-15 Process scheduling method and device, computer readable storage medium and terminal Pending CN118051313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410302021.2A CN118051313A (en) 2024-03-15 2024-03-15 Process scheduling method and device, computer readable storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410302021.2A CN118051313A (en) 2024-03-15 2024-03-15 Process scheduling method and device, computer readable storage medium and terminal

Publications (1)

Publication Number Publication Date
CN118051313A true CN118051313A (en) 2024-05-17

Family

ID=91051743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410302021.2A Pending CN118051313A (en) 2024-03-15 2024-03-15 Process scheduling method and device, computer readable storage medium and terminal

Country Status (1)

Country Link
CN (1) CN118051313A (en)

Similar Documents

Publication Publication Date Title
US10628216B2 (en) I/O request scheduling method and apparatus by adjusting queue depth associated with storage device based on hige or low priority status
US10908954B2 (en) Quality of service classes
CN112199194B (en) Resource scheduling method, device, equipment and storage medium based on container cluster
KR100972723B1 (en) Methods and mechanisms for proactive memory management
US10437639B2 (en) Scheduler and CPU performance controller cooperation
US8959515B2 (en) Task scheduling policy for limited memory systems
US9135059B2 (en) Opportunistic multitasking
KR20200060421A (en) Resource management method and terminal device
US20120060083A1 (en) Method for Use in Association With A Multi-Tab Interpretation and Rendering Function
US9367211B1 (en) Interface tab generation
CN111597042A (en) Service thread running method and device, storage medium and electronic equipment
CN111897637B (en) Job scheduling method, device, host and storage medium
CN114968567A (en) Method, apparatus and medium for allocating computing resources of a compute node
CN113986107A (en) Touch processing method and device based on graphic display system, electronic equipment and storage medium
CN109740098B (en) Application processing method based on multi-page window and electronic equipment
CN108733536A (en) Monitoring management system and method
WO2022252986A1 (en) Interrupt scheduling method, electronic device, and storage medium
CN118051313A (en) Process scheduling method and device, computer readable storage medium and terminal
CN109960572B (en) Equipment resource management method and device and intelligent terminal
CN107480071B (en) Cache data migration method and device
US20090288089A1 (en) Method for prioritized event processing in an event dispatching system
CN111831409B (en) Thread scheduling method and device, storage medium and electronic equipment
CN109062706B (en) Electronic device, method for limiting inter-process communication thereof and storage medium
CN106484536B (en) IO scheduling method, device and equipment
CN114816032B (en) Data processing method and device, electronic equipment and storage medium

Legal Events

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