A task scheduling method and device

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

Active Publication Date: 2017-01-11
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
View PDF6 Cites 0 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
  • A task scheduling method and device
  • A task scheduling method and device
  • A task scheduling method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment a

[0071] Suppose the current time is 0, and then the current task list is the task list corresponding to the 0th time. The task execution period of the current task is 1 day, that is, the task execution period is 24 hours, that is, the task is currently executing 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 the task is executed is:

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

[0074] The initial task period of this task is identified as:

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

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

[0077] Subsequently, in the next unit cycle, when the current time enters the 0th time, scan the task ...

Embodiment b

[0079] Suppose the current time is any time, for example, the current time is 68745, that is, the current time is 19:5:45, and the current task list is the task list corresponding to the 68745th time. The task execution period of the current task is 1 day, that is, the execution cycle of the task is 24 hours, that is, the task currently being executed 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 the task is executed is:

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

[0082] The initial task period of this task is identified as:

[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 period identifier 1 are added back to the task list corresponding to the 68745th ...

Embodiment c

[0088] Suppose the current time is 4800, that is, the current time is 1:20, and the current task list is the task list corresponding to the 4800th time. The task execution period of the current task is 5 hours, that is, the task currently being executed is every Execute once 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 the task is executed is:

[0090] y=(4800+18000)mod 86400=22800

[0091] The initial task period of this task is identified as:

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

[0093] Furthermore, the task list corresponding to the next time the task is executed is the task list at time 22800 (6:20), and the task record and the corresponding initial task cycle identifier 1 are added to the task list at time 22800 (6:20) task list.

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

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 present 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 implement 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 go to step 3); [0006] 3), start to execute the selected...

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 Patents(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