A multi-task scheduling method and server
A scheduling method and multitasking technology, applied in the directions of multiprogramming device, resource allocation, etc., can solve the problems of inability to flexibly control task startup time, inability to control task type, inability to control task operation mode, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0059] figure 1 It is a schematic diagram of the implementation flow of a multi-task scheduling method in an embodiment of the present invention, as figure 1 As shown, the method includes:
[0060] Step S101: Obtain a current task among N tasks, where N is a natural number greater than 1;
[0061] Specifically, during the multi-task polling process, the server can randomly obtain a current task among the N tasks to be executed, or obtain a higher priority task among the N tasks to be executed in order of priority. task, as the current task. In practical applications, when there is no priority restriction among the N tasks, that is, the execution sequence among the tasks is random, the server randomly obtains a task from the N tasks as the current task; When a priority order is preset among the N tasks, the server may obtain a task with a higher priority from the N tasks according to the preset priority order as the current task.
[0062] Step S102: Detect the current state...
Embodiment 2
[0077] figure 2 It is a schematic diagram of the implementation flow of a multi-task scheduling method in an embodiment of the present invention, as figure 2 As shown, the method includes:
[0078] Step S201: Obtain a current task among N tasks, where N is a natural number greater than 1;
[0079] Specifically, during the multi-task polling process, the server can randomly obtain a current task among the N tasks to be executed, or obtain a higher priority task among the N tasks to be executed in order of priority. task, as the current task. In practical applications, when there is no priority restriction among the N tasks, that is, the execution sequence among the tasks is random, the server randomly obtains a task from the N tasks as the current task; When a priority order is preset among the N tasks, the server may obtain a task with a higher priority from the N tasks according to the preset priority order as the current task.
[0080] Step S202: Initialize the running...
Embodiment 3
[0101] image 3 It is a schematic diagram of the implementation flow of the third multi-task scheduling method in the embodiment of the present invention, such as image 3 As shown, the method includes:
[0102] Step S301: setting a task structure corresponding to N tasks;
[0103] Wherein, the structure instances in the task structure are in one-to-one correspondence with the N tasks, and the N is a natural number greater than 1.
[0104] Here, the structure instance in the task structure may include information such as the current state of the corresponding task, pre-configured configuration parameters of the corresponding task, and the scheduling mode of the task. Wherein, the configuration parameters may include the type of the task, the number of failed attempts or the number of schedulable times, etc.; the scheduling mode of the task may include parallel scheduling or serial scheduling.
[0105] Step S302: Obtain a current task among the N tasks;
[0106] Specificall...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


