CN110096353B - Task scheduling method and device - Google Patents

Task scheduling method and device Download PDF

Info

Publication number
CN110096353B
CN110096353B CN201910397352.8A CN201910397352A CN110096353B CN 110096353 B CN110096353 B CN 110096353B CN 201910397352 A CN201910397352 A CN 201910397352A CN 110096353 B CN110096353 B CN 110096353B
Authority
CN
China
Prior art keywords
executed
queue
task
tasks
waiting 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.)
Active
Application number
CN201910397352.8A
Other languages
Chinese (zh)
Other versions
CN110096353A (en
Inventor
徐德珩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Meitu Home Technology Co ltd
Original Assignee
Xiamen Meitu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Meitu Technology Co Ltd filed Critical Xiamen Meitu Technology Co Ltd
Priority to CN201910397352.8A priority Critical patent/CN110096353B/en
Publication of CN110096353A publication Critical patent/CN110096353A/en
Application granted granted Critical
Publication of CN110096353B publication Critical patent/CN110096353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • 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 embodiment of the application provides a task scheduling method and a task scheduling device, which are applied to a mobile terminal comprising an execution queue and a task distribution component, wherein at least two waiting queues with different priorities exist in a buffer queue container of the mobile terminal. And the mobile terminal determines the waiting queues to which the received at least two tasks to be executed with the same priority belong according to the priority and adds the tasks to the determined waiting queues in batch. And then, sequencing the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed are sequentially arranged from the head to the tail of the waiting queue according to the sequence of the weights from large to small. And finally, when the current task amount in the execution queue is monitored to be reduced, scheduling the task amount to be executed from the head of the waiting queue with the highest priority to the execution queue through the task distributing component. Therefore, batch management operation on the tasks can be realized, and the processing speed can be increased under the condition of large task amount.

Description

Task scheduling method and device
Technical Field
The application relates to the technical field of computers, in particular to a task scheduling method and device.
Background
Among system resources provided by a mobile terminal system, some of the resources are required to be used by almost all mobile terminal applications in the system, such as network resources, Central Processing Unit (CPU) resources, and the like. The problem that follows is the task of very precisely controlling network access to ensure that resources are used in the most important aspects of the service.
However, the current task management schemes supported by the mobile platform have a relatively coarse management granularity, for example, GCD (multithreading optimization) and NSOperationQueue of the iOS system, schedule threadpoolexecutor of the Android system, and the like, which have only one-dimensional scheduling of priority, and are difficult to perform precise task control. Moreover, the mobile terminal system (e.g., a mobile phone system) usually allows to run as many tasks as possible at the same time by default, and there may be a large number of tasks that need to use corresponding system resources, such as network request tasks, which may cause communication congestion; also like CPU tasks, this can scatter the efficiency of the CPU, resulting in applications stuck.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a task scheduling method and apparatus, so as to at least partially improve the above problem.
In a first aspect, an embodiment of the present application provides a task scheduling method, which is applied to a mobile terminal including an execution queue and a task distribution component, where the mobile terminal further includes a buffer queue container, where at least two waiting queues with different priorities exist in the buffer queue container; the method comprises the following steps:
receiving the at least two tasks to be executed, wherein each task to be executed has a preset priority and a preset weight, and the priorities of the at least two tasks to be executed are the same but the weights of the at least two tasks to be executed are different;
determining a waiting queue to which the at least two tasks to be executed belong according to the priority, and adding the at least two tasks to be executed into the determined waiting queue in batch;
sequencing the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed in the determined waiting queue are sequentially arranged from the head to the tail of the waiting queue according to the sequence of the weights from large to small;
monitoring the current task quantity in the execution queue, and determining the reduced task quantity when the fact that the current task quantity in the execution queue is reduced is monitored;
and scheduling the tasks to be executed from the head of the waiting queue with the highest priority to the execution queue for execution by the task distributing component.
In a second aspect, an embodiment of the present application further provides a task scheduling apparatus, which is applied to a mobile terminal including an execution queue and a task distribution component, where the mobile terminal further includes a buffer queue container, and at least two waiting queues with different priorities exist in the buffer queue container; the device comprises:
the batch adding module is used for receiving at least two tasks to be executed, wherein each task to be executed has a preset priority and a preset weight, determining a waiting queue to which the two tasks to be executed belong according to the priority, and adding the at least two tasks to be executed into the determined waiting queue in batch; wherein the priorities of the at least two tasks to be executed are the same but the weights are different;
the sequencing module is used for sequencing the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed in the determined waiting queue are sequentially arranged from the head to the tail of the waiting queue according to the sequence of the weights from large to small;
the monitoring module is used for monitoring the current task number in the execution queue and determining the reduced task amount when the monitoring result shows that the current task number in the execution queue is reduced;
and the scheduling module is used for scheduling the tasks to be executed in the execution queue from the head of the waiting queue with the highest priority by the task distributing component.
In a third aspect, an embodiment of the present application further provides a mobile terminal, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and the machine-executable instructions, when executed, cause the processor to implement the task scheduling method provided in the first aspect of the embodiment of the present application.
Compared with the prior art, according to the task scheduling method and device provided by the embodiment of the application, at least two waiting queues with priorities are arranged in the buffer queue container, and each waiting queue can contain tasks to be executed with different weights, so that batch management operations such as batch addition and the like of the tasks to be executed can be supported, and the processing speed can be increased under the condition that a large number of tasks to be executed are available.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic block diagram of a mobile terminal according to an embodiment of the present disclosure;
fig. 2 is a schematic processing flow diagram of a task to be executed according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a task scheduling method according to an embodiment of the present application;
fig. 4 is a functional block diagram of a task scheduling device according to an embodiment of the present application.
Icon: 100-a mobile terminal; 110-a processor; 120-a machine-readable storage medium; 130-system bus; 121-execution queue; 122-a task distribution component; 123-buffer queue container; 124-serial queue; 400-a task scheduler; 410-batch adding module; 420-a sorting module; 430-a listening module; 440-a scheduling module; 450-serial asynchronous management module; 460-setup module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. In general, the components of the embodiments of the present application described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Other embodiments, which can be derived by one of ordinary skill in the art from the embodiments given herein without making any creative effort, shall fall within the scope of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Referring to fig. 1, fig. 1 is a block diagram of a mobile terminal 100 according to an embodiment of the present disclosure. The mobile terminal 100 includes a processor 110 and a machine-readable storage medium 120, the processor 110 and the machine-readable storage medium 120 may communicate via a system bus 130. The machine-readable storage medium 120 stores machine-executable instructions that, when invoked and executed, cause the processor 110 to implement the task scheduling methods described below in embodiments of the present application.
The machine-readable storage medium 120 may also store instructions corresponding to an execution queue 121, a task dispatch component 122, a buffer queue container 123, and a serial queue 124. Wherein, at least two waiting queues with different priorities exist in the buffer queue container 123.
For example, as shown in fig. 2, two waiting queues a and B in the buffer queue container 123 are exemplarily shown, wherein the waiting queue a has a high priority and the waiting queue B has a low priority. The waiting queue A comprises three tasks to be executed, namely taskAa with weight (weight) of 2, taskBa with weight of 0 and taskCa with weight of-1; the wait queue B includes three tasks to be executed, which are taskAb with weight 2, taskBb with weight 0, and taskCb with weight-1.
It should be noted that the architecture shown in fig. 1 is only an example, and the mobile terminal 100 may further include more or less components than those shown in fig. 1, or have a completely different configuration from that shown in fig. 1, which is not limited by the embodiment.
Referring to fig. 3, fig. 3 is a flowchart illustrating a task scheduling method according to this embodiment, where the method can be applied to the mobile terminal 100 shown in fig. 1. The individual steps of the method are explained below.
Step S31, obtaining at least two tasks to be executed, where each task to be executed has a preset priority and a preset weight, and the priorities of the at least two tasks to be executed are different, but the weights of the at least two tasks to be executed are different.
In this embodiment, the priority and weight of each task to be executed may be set in the following manner:
the method comprises the steps of obtaining the service type of a service module initiating a task to be executed, and setting the priority and the weight of the task to be executed according to the service type, the IT resources needed to be used by the task to be executed and the current use condition of the IT resources in the mobile terminal 100.
The IT resource may be a CPU resource, a network resource, a memory resource, a hard disk resource, or the like, and the usage condition refers to a current occupation proportion of the IT resource in the mobile terminal 100.
Step S32, determining a waiting queue to which the at least two tasks to be executed belong according to the priority, and adding the at least two tasks to be executed to the determined waiting queue in batch.
Taking the scenario shown in fig. 2 as an example, if the priorities of two to-be-executed tasks currently acquired are both high priorities, the two to-be-executed tasks are added to the waiting queue a in batch.
Step S33, sorting the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed in the determined waiting queue are sequentially arranged from the head to the tail of the waiting queue according to the size order of the weight.
After the obtained at least two tasks to be executed are added to the determined waiting queue in batch, the tasks to be executed in the determined waiting queue are reordered to ensure that the more important tasks to be executed are closer to the head of the determined waiting queue.
Optionally, the order of the weights may be set according to actual situations, for example, when the weights of the tasks to be executed and the importance degrees of the tasks to be executed are in a positive correlation relationship, the tasks to be executed may be sequentially arranged from the head to the tail of the determined waiting queue according to the order of the weights from large to small; for another example, in a case that the weight of the to-be-executed task is in a negative correlation with the importance degree of the to-be-executed task, the to-be-executed tasks may be sequentially arranged from the head to the tail of the determined waiting queue in an order from small to large of the weight.
In this way, the task to be executed with larger weight can be directly taken out from the head of the waiting queue to be executed in the subsequent process.
Compared with the prior art, the buffer queue container is used as a queue and only supports the priority ordering according to the tasks to be executed, so that the task ordering and the de-duplication operation are triggered when the task of each priority is added.
Of course, the task scheduling method provided in the embodiment of the present application also supports adding a single task to be executed to the buffer queue container, and the adding process is similar to the batch adding process, and is not described herein again.
Step S34, listening for the current task number in the execution queue 121, and determining the decreased task amount when it is listened that the current task number in the execution queue 121 decreases.
Step S35, scheduling the tasks to be executed from the head of the at least one waiting queue with the highest priority by the task distributing component 122 to the execution queue 121 for execution.
Referring again to fig. 2, in the related art, the concurrent queue control component of the mobile terminal generally includes a listener (listener), the execution queue 121 and the task dispatch component 122. In this embodiment, the listener may directly use the listener to listen to the execution condition of each task to be executed in the execution queue 121, and once it is monitored that the task to be executed is executed completely, the task distribution component 122 in the concurrent queue control component is triggered to schedule the task to be executed from the buffer queue container to the execution queue.
In detail, the same amount of tasks to be executed with the highest priority may be scheduled from the buffer queue container 123 into the execution queue 121 according to the amount of tasks that have been executed in the execution queue 121, that is, the decreased amount of tasks to be executed.
In the embodiment of the present application, since the tasks to be executed at the same priority level in the buffer queue container 123 are divided by weight, when there are multiple tasks to be executed at the same priority level in the buffer queue container 123 (e.g., multiple weighted tasks to be executed in one waiting queue), the tasks to be executed that need to be scheduled in the execution queue 121 may be selected according to the magnitude order of the weights.
In implementation, if the number of tasks to be executed in the waiting queue with the highest priority is less than the reduced task amount of the execution queue 121, a corresponding number of tasks to be executed may be scheduled from the waiting queue with the highest priority to the execution queue 121, so that the number of tasks to be executed finally scheduled to the execution queue 121 is exactly equal to the task amount.
Optionally, the task scheduling method provided in this embodiment may further include the following steps:
management operations for any waiting queue are added to the serial queue, and the management operations in the serial queue 124 are executed asynchronously.
The management operation may include adding a waiting queue, deleting the waiting queue, changing the priority of the waiting queue, adding a task to be executed in the waiting queue, deleting the task to be executed in the waiting queue, and changing the weight of the task to be executed in the waiting queue.
The serial queue 124 limits the ordering of management operations, thereby maintaining the ordering of the various wait queues in the buffer queue container 123. Since the service side will asynchronously add the task to be executed to the buffer queue container 123, some overhead is inevitably occupied for maintaining synchronization, and the serial queue 124 of the embodiment directly ensures the order of the task to be executed in the buffer queue container 123, so that frequent operations or other synchronization operations required for maintaining synchronization of the task to be executed in the buffer queue container 123 can be effectively reduced.
Optionally, the task scheduling method provided in this embodiment may further include the following steps:
in response to a priority conversion operation aiming at a first waiting queue, scheduling a task to be executed in the first waiting queue to a second waiting queue with a priority indicated by the priority conversion operation;
and sequencing the tasks to be executed in the second waiting queue according to the weight, so that the tasks to be executed in the second waiting queue are sequentially arranged from the head to the tail of the second waiting queue according to the magnitude order of the weight.
In the present embodiment, the priority conversion operation is an operation for adjusting the priority of a specific waiting queue from the current priority to a designated priority. The specific waiting queue is the first waiting queue, and the waiting queue corresponding to the designated priority is the second waiting queue.
Through the steps, the priority of a group of tasks to be executed can be changed in batch.
Similarly, a plurality of tasks with the same priority can be deleted in batch by the design of the embodiment. Correspondingly, the task scheduling method provided by this embodiment may further include the following steps:
and responding to a task clearing instruction aiming at any priority, and deleting the waiting queue corresponding to the priority from the buffer queue container.
Through the design of the embodiment, the problem that the service adaptability of the queue only supporting the priority is weak in the prior art is solved, and the batch management operation of the tasks to be executed can be supported, so that the processing speed can be increased under the condition of large task quantity.
In addition, by increasing the management granularity (priority and weight) of the tasks to be executed, the tasks to be executed can be managed more accurately.
Referring to fig. 4, fig. 4 is a functional block diagram of a task scheduling device 400 according to an embodiment of the present disclosure. The task scheduling device 400 includes at least one functional module that can be stored in the form of software in the machine-readable storage medium 120. Functionally, the task scheduling device 400 includes a batch adding module 410, a sorting module 420, a listening module 430, and a scheduling module 440.
The batch adding module 410 is configured to obtain at least two tasks to be executed, where each task to be executed has a preset priority and a preset weight, and the priorities of the at least two tasks to be executed are the same but the weights of the at least two tasks to be executed are different; and determining a waiting queue to which the at least two tasks to be executed belong according to the priority, and adding the at least two tasks to be executed into the determined waiting queue in batch.
The sorting module 420 is configured to sort the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed in the determined waiting queue are sequentially arranged from the head to the tail of the waiting queue according to the magnitude order of the weight.
The monitoring module 430 is configured to monitor the current number of tasks in the execution queue 121, and determine a reduced number of tasks when it is monitored that the current number of tasks in the execution queue 121 is reduced.
The scheduling module 440 is configured to schedule the task amount to be executed from the head of the at least one waiting queue with the highest priority to the execution queue 121 through the task distribution component 122.
Optionally, the task scheduler 400 may further include a serial asynchronous management module 450.
The serial asynchronous management module 450 is used to add management operations for any waiting queue to the serial queue 124, and asynchronously execute management operations in the serial queue 124.
Optionally, the serial asynchronous management module 450 may be specifically configured to respond to a priority conversion operation for a first waiting queue, and schedule a task to be executed in the first waiting queue to a second waiting queue having a priority indicated by the priority conversion operation; and sequencing the tasks to be executed in the second waiting queue according to the weight, so that the tasks to be executed in the second waiting queue are sequentially arranged from the head to the tail of the second waiting queue according to the sequence of the weights from large to small.
Optionally, the serial asynchronous management module 450 may be further configured to respond to a task clearing instruction for any priority, and delete the waiting queue corresponding to the priority from the buffer queue container 123.
Optionally, the task scheduling device 400 may further include a setting module 460.
The setting module 460 is configured to obtain a service type to which a service module initiating the task to be executed belongs; and setting the priority and the weight of the task to be executed according to the service type, the IT resources required to be used by the task to be executed and the current use condition of the IT resources in the mobile terminal.
Wherein, the usage condition refers to an occupation proportion of the IT resources in the mobile terminal.
The detailed description of the above functional modules may specifically refer to the foregoing description of the relevant steps.
In summary, according to the task scheduling method and device provided by the embodiment of the present application, at least two waiting queues with priorities are set in the buffer queue container, and each waiting queue may include tasks to be executed with different weights, so that batch management operations such as batch addition of the tasks to be executed can be supported, and thus the processing speed can be increased under the condition that there are many tasks to be executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection of the claims.

Claims (8)

1. A task scheduling method is applied to a mobile terminal comprising an execution queue, a task distribution component and a buffer queue container, and is characterized in that at least two waiting queues with different priorities exist in the buffer queue container; the method comprises the following steps:
the method comprises the steps of obtaining at least two tasks to be executed, wherein each task to be executed has a preset priority and a preset weight, and the priorities of the at least two tasks to be executed are the same but the weights of the at least two tasks to be executed are different;
determining a waiting queue to which the at least two tasks to be executed belong according to the priority, and adding the at least two tasks to be executed into the determined waiting queue in batch;
sequencing the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed in the determined waiting queue are sequentially arranged from the head to the tail of the waiting queue according to the size sequence of the weight;
monitoring the current task number in the execution queue, and determining the reduced task amount when the current task number in the execution queue is reduced;
scheduling the tasks to be executed from the head of at least one waiting queue with the highest priority to the execution queue for execution by the task distributing component;
the mobile terminal further comprises a serial queue, and the method further comprises:
adding management operation aiming at any waiting queue into the serial queue, and asynchronously executing the management operation in the serial queue, wherein the management operation comprises the steps of adding the waiting queue, deleting the waiting queue, changing the priority of the waiting queue, adding a task to be executed in the waiting queue, deleting the task to be executed in the waiting queue and changing the weight of the task to be executed in the waiting queue.
2. The method of claim 1, wherein the asynchronously performing the management operation in the serial queue comprises:
in response to a priority conversion operation aiming at a first waiting queue, scheduling a task to be executed in the first waiting queue to a second waiting queue with a priority indicated by the priority conversion operation;
and sequencing the tasks to be executed in the second waiting queue according to the weight, so that the tasks to be executed in the second waiting queue are sequentially arranged from the head to the tail of the second waiting queue according to the magnitude order of the weight.
3. The method of claim 2, wherein the asynchronously performing the management operation in the serial queue further comprises:
and responding to a task clearing instruction aiming at any priority, and deleting the waiting queue corresponding to the priority from the buffer queue container.
4. The method according to any one of claims 1-3, further comprising:
acquiring the service type of a service module initiating the task to be executed;
setting the priority and the weight of the task to be executed according to the service type, the IT resources needed to be used by the task to be executed and the current use condition of the IT resources in the mobile terminal;
wherein, the usage condition refers to an occupation proportion of the IT resources in the mobile terminal.
5. A task scheduling device is applied to a mobile terminal comprising an execution queue and a task distribution component, and is characterized in that the mobile terminal further comprises a buffer queue container, and at least two waiting queues with different priorities exist in the buffer queue container; the device comprises:
the batch adding module is used for acquiring at least two tasks to be executed, wherein each task to be executed has a preset priority and a preset weight, determining a waiting queue to which the at least two tasks to be executed belong according to the priority, and adding the at least two tasks to be executed into the determined waiting queue in batch; wherein the priorities of the at least two tasks to be executed are the same but the weights are different;
the sequencing module is used for sequencing the tasks to be executed in the determined waiting queue according to the weight, so that the tasks to be executed in the determined waiting queue are sequentially arranged from the head to the tail of the waiting queue according to the weight sequence;
the monitoring module is used for monitoring the current task number in the execution queue and determining the reduced task amount when the monitoring result shows that the current task number in the execution queue is reduced;
the scheduling module is used for scheduling the tasks to be executed from the head of at least one waiting queue with the highest priority to the execution queue for execution through the task distributing component;
the mobile terminal further comprises a serial queue, and the device further comprises:
and the serial asynchronous management module is used for adding management operation aiming at any waiting queue into the serial queue and asynchronously executing the management operation in the serial queue, wherein the management operation comprises the steps of increasing the waiting queue, deleting the waiting queue, changing the priority of the waiting queue, increasing the task to be executed in the waiting queue, deleting the task to be executed in the waiting queue and changing the weight of the task to be executed in the waiting queue.
6. The apparatus of claim 5, wherein the serial asynchronous management module is specifically configured to:
in response to a priority conversion operation aiming at a first waiting queue, scheduling a task to be executed in the first waiting queue to a second waiting queue with a priority indicated by the priority conversion operation;
and sequencing the tasks to be executed in the second waiting queue according to the weight, so that the tasks to be executed in the second waiting queue are sequentially arranged from the head to the tail of the second waiting queue according to the sequence of the weights from large to small.
7. The apparatus of claim 6, wherein the serial asynchronous management module is further configured to:
and responding to a task clearing instruction aiming at any priority, and deleting the waiting queue corresponding to the priority from the buffer container.
8. The apparatus of any one of claims 5-7, further comprising:
the setting module is used for acquiring the service type of the service module which initiates the task to be executed, and setting the priority and the weight of the task to be executed according to the service type, the IT resources which are needed to be used by the task to be executed and the current use condition of the IT resources in the mobile terminal;
wherein, the usage condition refers to an occupation proportion of the IT resources in the mobile terminal.
CN201910397352.8A 2019-05-14 2019-05-14 Task scheduling method and device Active CN110096353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910397352.8A CN110096353B (en) 2019-05-14 2019-05-14 Task scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910397352.8A CN110096353B (en) 2019-05-14 2019-05-14 Task scheduling method and device

Publications (2)

Publication Number Publication Date
CN110096353A CN110096353A (en) 2019-08-06
CN110096353B true CN110096353B (en) 2021-11-30

Family

ID=67447994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910397352.8A Active CN110096353B (en) 2019-05-14 2019-05-14 Task scheduling method and device

Country Status (1)

Country Link
CN (1) CN110096353B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780984B (en) * 2019-09-26 2022-07-05 苏州浪潮智能科技有限公司 Request scheduling method and device based on priority
CN112579281B (en) * 2019-09-27 2023-10-10 杭州海康威视数字技术股份有限公司 Resource allocation method, device, electronic equipment and storage medium
CN112579263A (en) * 2019-09-29 2021-03-30 北京国双科技有限公司 Task execution method and device, storage medium and electronic equipment
CN111143045B (en) * 2019-12-11 2024-03-22 青岛海尔科技有限公司 Task scheduling method and device of intelligent home operating system and storage medium
CN111382177A (en) * 2020-03-09 2020-07-07 中国邮政储蓄银行股份有限公司 Service data task processing method, device and system
CN111400005A (en) * 2020-03-13 2020-07-10 北京搜狐新媒体信息技术有限公司 Data processing method and device and electronic equipment
CN112463370A (en) * 2020-11-20 2021-03-09 深圳市雷鸟网络传媒有限公司 Task execution method, device and readable storage medium
CN112667376A (en) * 2020-12-23 2021-04-16 数字广东网络建设有限公司 Task scheduling processing method and device, computer equipment and storage medium
CN113177680A (en) * 2021-03-10 2021-07-27 广州明珞自动化有限公司 Task execution system, task execution method and production system
CN113590278A (en) * 2021-07-05 2021-11-02 杭州智家通科技有限公司 Method, device, equipment and storage medium for removing repeated execution task
CN113722067A (en) * 2021-08-24 2021-11-30 咪咕音乐有限公司 Information task scheduling method, device, equipment and storage medium
CN115601195B (en) * 2022-10-17 2023-09-08 桂林电子科技大学 Transaction bidirectional recommendation system and method based on real-time label of power user

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561768A (en) * 2008-04-18 2009-10-21 北京闻言科技有限公司 Universal multitask scheduling method
CN101719079A (en) * 2009-12-17 2010-06-02 中国电力科学研究院 Method and device for processing tasks
CN103942102A (en) * 2014-04-14 2014-07-23 桂林电子科技大学 Real-time task scheduling method based on dual priority
CN107423881A (en) * 2017-06-09 2017-12-01 中国邮政储蓄银行股份有限公司 task distribution method and device
CN107590588A (en) * 2017-08-24 2018-01-16 平安科技(深圳)有限公司 Method for allocating tasks, device and computer-readable recording medium
CN109218345A (en) * 2017-06-29 2019-01-15 武汉斗鱼网络科技有限公司 Obtain method, storage medium, electronic equipment and the system of target resource

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101658035B1 (en) * 2010-03-12 2016-10-04 삼성전자주식회사 Virtual machine monitor and scheduling method of virtual machine monitor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561768A (en) * 2008-04-18 2009-10-21 北京闻言科技有限公司 Universal multitask scheduling method
CN101719079A (en) * 2009-12-17 2010-06-02 中国电力科学研究院 Method and device for processing tasks
CN103942102A (en) * 2014-04-14 2014-07-23 桂林电子科技大学 Real-time task scheduling method based on dual priority
CN107423881A (en) * 2017-06-09 2017-12-01 中国邮政储蓄银行股份有限公司 task distribution method and device
CN109218345A (en) * 2017-06-29 2019-01-15 武汉斗鱼网络科技有限公司 Obtain method, storage medium, electronic equipment and the system of target resource
CN107590588A (en) * 2017-08-24 2018-01-16 平安科技(深圳)有限公司 Method for allocating tasks, device and computer-readable recording medium

Also Published As

Publication number Publication date
CN110096353A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
CN110096353B (en) Task scheduling method and device
US10558498B2 (en) Method for scheduling data flow task and apparatus
CN108762896B (en) Hadoop cluster-based task scheduling method and computer equipment
CA2785398C (en) Managing queries
US8424007B1 (en) Prioritizing tasks from virtual machines
CN109408215B (en) Task scheduling method and device for computing node
CN109799956B (en) Memory controller and IO request processing method
CN111061556A (en) Optimization method and device for executing priority task, computer equipment and medium
CN114327843A (en) Task scheduling method and device
CN113127171A (en) Techniques for behavioral pairing in a task distribution system
CN102541642A (en) Task management method for enhancing real-time performance
CN108304272B (en) Data IO request processing method and device
CN110968410B (en) Task failure retry method and device, computer equipment and storage medium
CN106775975B (en) Process scheduling method and device
CA2631255A1 (en) Scalable scheduling of tasks in heterogeneous systems
CN113157424A (en) Task scheduling method and device
CN113268331A (en) Robot calling method, robot calling device, management system and storage medium
CN111400241B (en) Data reconstruction method and device
CN106411971B (en) Load adjusting method and device
CN110825342B (en) Memory scheduling device and system, method and apparatus for processing information
CN110851245A (en) Distributed asynchronous task scheduling method and electronic equipment
CN115202842A (en) Task scheduling method and device
CN115766582A (en) Flow control method, device and system, medium and computer equipment
Khelghatdoust et al. Peacock: Probe-based scheduling of jobs by rotating between elastic queues
CN110073321B (en) Storage controller and IO request processing method

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220627

Address after: 100000 3-701, floor 7, No. 28, Chengfu Road, Haidian District, Beijing

Patentee after: BEIJING MEITU HOME TECHNOLOGY Co.,Ltd.

Address before: B1f-089, Zone C, Huaxun building, software park, torch high tech Zone, Xiamen City, Fujian Province

Patentee before: XIAMEN HOME MEITU TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right