Task scheduling method and device

A task scheduling and task technology, applied in the computer field, can solve the problems of inability to achieve transparent task management, inability to view task information in the scheduling scheme, and low efficiency of the task scheduling process, so as to achieve transparent management, improve scanning efficiency and task execution. Efficiency, downsizing effects

Active Publication Date: 2014-04-23
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
View PDF6 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0011] First, when the existing scheduling scheme uses Java scheduling components to implement task scheduling, it can only perform serial execution of tasks, but cannot perform parallel execution of tasks, which makes the task scheduling process inefficient;
[0012] Second, in the existing scheduling scheme, the task list must be re-scanned every time the scheduling is executed. In the case of a large number of tasks, it takes a long time to scan the scheduling list, which also makes the task scheduling process inefficient;
[0013] Third, the existing scheduling scheme cannot view the task information that needs to be executed at any time, and cannot realize the transparent management of task execution
[0014] Therefore, there is still room for further improvement in the existing scheduling scheme

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Task scheduling method and device
  • Task scheduling method and device
  • Task scheduling method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment a

[0071] Let the current time be 0, and then the current task list is the task list corresponding to the 0th time. The task execution cycle of the currently executing task is 1 day, that is, the execution cycle of the task is 24 hours. That is to say, the currently executing task The task is executed every 24 hours. The execution cycle of the task is expressed in seconds as 24×60×60=86400, and the unit cycle is expressed in seconds as 24×60×60=86400

[0072] Then, the next time to execute the task is:

[0073] y=(0+86400)mod86400=0

[0074] The task's initial task period ID is:

[0075] m=ceil(86400 / 86400)=1

[0076] Furthermore, the task list corresponding to the next execution time of the task is still the task list corresponding to the 0th time, and the task record and the corresponding initial task cycle identifier 1 are added back to the task list corresponding to the 0th time.

[0077] Then, in the next unit period, when the current moment enters the 0th moment, scan t...

Embodiment b

[0079] Let the current time be any time, for example, the current time is 68745, that is, the current time is 19:05:45, and then the current task list is the task list corresponding to the 68745th time, and the task execution cycle of the currently executing task is 1 day, that is, the execution period of the task is 24 hours, that is, the currently executing task is executed every 24 hours. The execution cycle of the task is expressed in seconds as 24×60×60=86400, and the unit cycle is expressed in seconds as 24×60×60=86400

[0080] Then, the next time to execute the task is:

[0081] y=(68745+86400)mod86400=68745

[0082] The task's initial task period ID is:

[0083] m=ceil(86400 / 86400)=1

[0084] Furthermore, the task list corresponding to the time when the task is executed next time is still the task list corresponding to the 68745th time, and the task record and the corresponding initial task cycle identifier 1 are added back to the task list corresponding to the 6874...

Embodiment c

[0088] Let the current time be 4800, that is, the current time is 1:20, and then the current task list is the task list corresponding to the 4800th time, and the task execution cycle of the currently executing task is 5 hours, that is, the currently executing task is every Execute every 5 hours. The execution cycle of the task is expressed in seconds as 5×60×60=18000, and the unit cycle is expressed in seconds as 24×60×60=86400

[0089] Then, the next time to execute the task is:

[0090] y=(4800+18000)mod86400=22800

[0091] The task's initial task period ID is:

[0092] m=ceil(18000 / 86400)=1

[0093] Then, the task list corresponding to the next execution time of the task is the task list at the 22800th moment (6:20), add this task record and the corresponding initial task cycle identifier 1 to the 22800th moment (6:20) task list.

[0094] Then, as time goes by, when the current moment enters the 22800th moment (6:20), scan the task list at the 22800th moment (6:20), at...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a task scheduling method and a device. The task scheduling method comprises the following steps: task lists of all times in unit periods are built; the task list of present time is scanned in each time of each unit period; task records scanned at present are taken out; task period identifiers of the task records are minus 1; if the task period identifiers minus 1 are greater than 0, the task records are put in the task list of the present time; if the task period identifiers minus 1 are equal to 0, tasks appointed by the task records are executed, and the time of executing the tasks at the next time and initial task period identifiers are determined; the task records and corresponding initial task period identifiers are added in the task list of the time of executing the tasks at the next time. The task scheduling method can automatically form the task scheduling plan to realize the transparent management of task execution and improve the task list scanning efficiency, and can form a more complex task scheduling mode by using task scheduling rules therein.

Description

technical field [0001] The invention relates to computer technology, in particular to a task scheduling method and device. Background technique [0002] Task scheduling is an important part of the operating system, and for real-time operating systems, task scheduling directly affects its real-time performance. In computer systems and various software systems, there are various task scheduling scenarios. Among them, in the task scheduling process, there are many scenarios based on time scheduling. In these scenarios, it is necessary to realize the function of running the task program at a specific time point or time interval. [0003] Such as figure 1 As shown, an existing task scheduling process includes: [0004] 1), in the current time period or at the current specific time point, the task scheduler scans the task list, and then enters step 2); [0005] 2), select the task to be performed in the task list, and then enter step 3); [0006] 3), start to execute the sele...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48
Inventor 马文金
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products