CN103077084A - Method and system for controlling tasks - Google Patents

Method and system for controlling tasks Download PDF

Info

Publication number
CN103077084A
CN103077084A CN2013100075357A CN201310007535A CN103077084A CN 103077084 A CN103077084 A CN 103077084A CN 2013100075357 A CN2013100075357 A CN 2013100075357A CN 201310007535 A CN201310007535 A CN 201310007535A CN 103077084 A CN103077084 A CN 103077084A
Authority
CN
China
Prior art keywords
task
dependence
controller
free time
comparisons
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
CN2013100075357A
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.)
SUZHOU YIBEI INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SUZHOU YIBEI INFORMATION 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 SUZHOU YIBEI INFORMATION TECHNOLOGY Co Ltd filed Critical SUZHOU YIBEI INFORMATION TECHNOLOGY Co Ltd
Priority to CN2013100075357A priority Critical patent/CN103077084A/en
Publication of CN103077084A publication Critical patent/CN103077084A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a system for controlling tasks. The method comprises the following steps that a client submits the tasks to a task processor; the task processor puts the tasks with relying relation into a task queue, establishes a task relying reference list according to the relying relation between the tasks and synchronizes the task relying reference list to a time slice distributor; the time slice distributor acquires the total idle time slice distribution number of each relied task according to the task relying reference list and a first policy and transmits the total idle time slice distribution number of each relied task to a task controller; the task controller determines the period corresponding to each relied task according to the task relying reference list, the total idle time slice distribution number of each relied task and a second policy; and the task controller processes the tasks with relying relation in the task queue according to the total idle time slice distribution number of each relied task and the period corresponding to each relied task.

Description

A kind of method and system of task control
Technical field
The invention belongs to field of computer technology, relate in particular to a kind of method and system of task control.
Background technology
At present, in field of computer technology, can run into the calculation task model of a complexity by a plurality of situations about being formed by the calculation task of dependence.Wherein, dependence task can only just can calculate after being finished by dependence task, but and the calculation task parallel computation that does not have dependence.For this task model, how task is carried out resource and distribute, to obtain the optimum task processing time, be an important problem.
Summary of the invention
The invention provides a kind of method and system of task control, to address the above problem.
The invention provides a kind of method of task control.Said method may further comprise the steps: client with job invocation to task controller; Task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the Task Dependent table of comparisons synchronously to the timeslice divider; The timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to task controller each free time sheet by dependence task according to the Task Dependent table of comparisons and the first strategy; Task controller distributes sum and the second strategy according to the Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task; Task controller distributes sum and each by cycle corresponding to dependence task according to each free time sheet by dependence task, has the task of dependence in the Processing tasks formation.
The present invention also provides a kind of system of task control, comprises client, task controller and timeslice divider.Client connects task controller, task controller tie-time sheet divider.Wherein, client with job invocation to task controller.Task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the Task Dependent table of comparisons synchronously to the timeslice divider.The timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to task controller each free time sheet by dependence task according to the Task Dependent table of comparisons and the first strategy.Task controller distributes sum and the second strategy according to the Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task.Task controller distributes sum and each by cycle corresponding to dependence task according to each the free time sheet by dependence task that receives, and has the task of dependence in the Processing tasks formation.
Compared to prior art, method and system according to task control provided by the invention, task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the Task Dependent table of comparisons synchronously to the timeslice divider.In addition, the timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to task controller each free time sheet by dependence task according to the Task Dependent table of comparisons and the first strategy; Task controller distributes sum and the second strategy according to the Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task.Task controller distributes sum and each by cycle corresponding to dependence task according to each free time sheet by dependence task, has the task of dependence in the Processing tasks formation.So, improve the allocation efficiency of resource of the task with dependence, obtained better execution so that have the task of dependence, improved efficient.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Figure 1 shows that the process flow diagram of the method for the task control that preferred embodiment according to the present invention provides;
Figure 2 shows that the schematic diagram of the system of the task control that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter also describe in conjunction with the embodiments the present invention in detail with reference to accompanying drawing.Need to prove, in the situation that do not conflict, embodiment and the feature among the embodiment among the application can make up mutually.
Figure 1 shows that the process flow diagram of the method for the task control that preferred embodiment according to the present invention provides.As shown in Figure 1, the method for the task control that provides of preferred embodiment of the present invention comprises step 101 ~ 105.
In step 101, client with job invocation to task controller.In this, task comprises task with dependence and separate task.Yet the present invention does not limit this.
In step 102, described task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the described Task Dependent table of comparisons synchronously to the timeslice divider.In this, the task in the task queue according to the dependence ordering, preferentially is performed by dependence task.
In the present embodiment, the Task Dependent table of comparisons example that task controller is set up is as shown in table 1.Yet the present invention does not limit this.
By dependence task Dependence task
Task 1 Task 4, task 5, task 6
Task 2 Task 5, task 6
Task 3 Task 6
Table 1
In step 103, described timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to described task controller each free time sheet by dependence task according to the described Task Dependent table of comparisons and the first strategy.
In this, described the first strategy is: described timeslice divider calculates respectively each by dependence task accounting corresponding to dependence task according to the described Task Dependent table of comparisons,, calculated and obtain each free time sheet by dependence task and distribute sum by the total amount of system's free time sheet of dependence task accounting corresponding to dependence task and current time according to each.Wherein, each is accordingly by dependence task number corresponding to dependence task and the ratio of total task number by dependence task accounting corresponding to dependence task.Each free time sheet distribution by dependence task adds up to accordingly by the product of system's free time sheet total amount of the dependence task accounting of dependence task and current time.
In the present embodiment, describe as an example of table 1 example, as shown in Table 1, current task adds up to 6.In addition, for example system's free time sheet total amount of current time is a, then by the dependence task accounting=3/6=0.5 of dependence task 1, and by the free time sheet distribution sum=0.5*a of dependence task 1; By the dependence task accounting=2/6=1/3 of dependence task 2, and by free time sheet distribution sum=(1/3) * a of dependence task 2; By the dependence task accounting of dependence task 3=1/6, and by free time sheet distribution sum=(1/6) * a of dependence task 3.In this, the timeslice divider obtains will be distributed sum be sent to task controller by the free time sheet of dependence task 1 ~ 3 correspondence by behind the free time sheet distribution sum of dependence task 1 ~ 3 correspondence.
In step 104, described task controller distributes sum and the second strategy according to the described Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task.
In this, described the second strategy is: each is distributed total by cycle corresponding to dependence task according to each free time sheet by dependence task and each is determined by dependence task number corresponding to dependence task.Particularly, each by cycle corresponding to dependence task equal corresponding free time sheet by dependence task distribute sum with corresponding by the ratio of dependence task number corresponding to dependence task.Yet the present invention does not limit this.In other embodiment, each can also be equaled the corresponding ratio that is distributed sum and default constant by the free time sheet of dependence task by cycle corresponding to dependence task.Wherein, the setting of described default constant can be set according to actual needs.
In the present embodiment, still the table 1 in the step 102 describes as example.Task controller according to the Task Dependent table of comparisons of storing (namely, table 1), and receive by the free time sheet distribution of dependence task 1 ~ 3 correspondence total from time distributior, with reference to the second strategy as can be known, by the cycle T 1=0.5*a/3=(1/6 of dependence task 1 correspondence) * a, by the cycle T 2=(1/3 of dependence task 2 correspondences) * a/2=(1/6) * a, by the cycle T 3=(1/6 of dependence task 3 correspondences) * a.
In step 105, described task controller distributes sum and each by cycle corresponding to dependence task according to each free time sheet by dependence task, processes the task of having dependence in the described task queue.
Particularly, task controller receives each free time sheet by dependence task from the timeslice divider and distributes sum, and calculating obtains each by cycle corresponding to dependence task.Task controller judges whether if can not process, then to continue dependence task in can the Processing tasks formation to wait for the result who is fed back by the dependence task next cycle according to the result who is fed back by the dependence task one-period, until till dependence task can process.
In the present embodiment, still the table 1 in the step 102 describes as example.In this, task controller judges whether can continue to process dependence task 4, dependence task 5 or dependence task 6 according to the result who is fed back by dependence task 1.If can not continue to process dependence task 4, dependence task 5 or dependence task 6, then task controller is deleted the result who is fed back by dependence task 1, and task controller judges according to by the result of dependence task 1 next cycle T1 feedback whether dependence task 4, dependence task 5 or dependence task 6 can be processed again.Said process is until till dependence task 4, dependence task 5 or dependence task 6 can process.If task controller for example judges that according to the result who is fed back by dependence task 1 obtaining dependence task 5 can process, then begin the section processes of dependence task 5, at this moment, the temporary result who is fed back by dependence task 2 who receives of task controller, and after the section processes of dependence task 5 is finished, judge that according to the result who is fed back by dependence task 2 can dependence task 5 continue to process, process if can continue, then task controller continues to process dependence task 5, if can not continue to process dependence task 5 according to result's judgement of being fed back by dependence task 2, then task controller is deleted the temporary result who is fed back by dependence task 2, wait is by the result of dependence task 2 next cycle T2 feedback, proceed again to judge, until till dependence task 5 can process.In addition, the processing procedure of dependence task 6 is with dependence task 5, therefore repeat no more in this.
For example: be updated data table a, b, c, d by dependence task 1; Be updated data table e, f, g, h by dependence task 2; Dependence task 5 is data query table a, g; If when first cycle T 1, finished the renewal of tables of data a by dependence task 1; By dependence task 2 when first cycle T 2, finish the renewal of tables of data e, then task controller is according to the result who is fed back by dependence task 1 (renewal of tables of data a), judges that dependence task 5 can process, and (the data query table a) then to begin the section processes of task 5; At this moment, the temporary result who is fed back by dependence task 2 (renewal of tables of data e) who receives of task controller.In the section processes of dependence task 5 (the data query table a) finish after, task controller is according to the result who is fed back by dependence task 2 (renewal of tables of data e), judge that dependence task 5 can not continue to process, then task controller is deleted the temporary result who is fed back by dependence task 2 (renewal of tables of data e), wait is by the result of dependence task 2 next cycle T2 feedback, proceed again to judge, until till dependence task 5 can process.
In addition, in the present embodiment, if arbitrary in the task queue finished by dependence task, then the task controller updating task relies on the table of comparisons, and the Task Dependent table of comparisons that upgrades is sent to the timeslice divider.Still the table 1 in the step 102 is as example, if finished by dependence task 3, then the task controller updating form 1, obtains example as shown in table 2.
By dependence task Dependence task
Task 1 Task 4, task 5, task 6
Task 2 Task 5, task 6
Table 2
At this moment, task controller with the Task Dependent table of comparisons (that is, table 2) that upgrades synchronously to the timeslice divider.The timeslice divider is according to table 2 and the first strategy, regain each free time sheet by dependence task and distribute sum, and send to task controller, task controller distributes sum and the second strategy according to table 2, each free time sheet by dependence task, regains each by cycle corresponding to dependence task.Task controller distributes sum and corresponding cycle according to each the free time sheet by dependence task that upgrades, and has the task of dependence in the Processing tasks formation, until the task in the task queue is all processed.
Figure 2 shows that the schematic diagram of the system of the task control that preferred embodiment according to the present invention provides.As shown in Figure 2, the system of the task control that provides of preferred embodiment of the present invention comprises client 10, task controller 12 and timeslice divider 13.Wherein, client 10 connects task controller 12,12 tie-time of task controller sheet divider 13.
In the present embodiment, client 10 with job invocation to task controller 12.Task controller 12 will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the Task Dependent table of comparisons synchronously to timeslice divider 13.Timeslice divider 13 obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to task controller 12 each free time sheet by dependence task according to the described Task Dependent table of comparisons and the first strategy.Task controller 12 distributes sum and the second strategy according to the Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task.Task controller 12 distributes sum and each by cycle corresponding to dependence task according to each the free time sheet by dependence task that receives, and has the task of dependence in the Processing tasks formation.Specific operation process about said system is described with above-mentioned method, therefore repeat no more in this.
In sum, the method and system of the task control that preferred embodiment provides according to the present invention, task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the Task Dependent table of comparisons synchronously to the timeslice divider.In addition, the timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to task controller each free time sheet by dependence task according to the Task Dependent table of comparisons and the first strategy; Task controller distributes sum and the second strategy according to the Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task.Task controller distributes sum and each by cycle corresponding to dependence task according to each free time sheet by dependence task, has the task of dependence in the Processing tasks formation.So, improve the allocation efficiency of resource of the task with dependence, obtained better execution so that have the task of dependence, improved efficient.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the method for a task control is characterized in that, may further comprise the steps:
Client with job invocation to task controller;
Described task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and with the described Task Dependent table of comparisons synchronously to the timeslice divider;
Described timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to described task controller each free time sheet by dependence task according to the described Task Dependent table of comparisons and the first strategy;
Described task controller distributes sum and the second strategy according to the described Task Dependent table of comparisons, each free time sheet by dependence task, determines that each is by cycle corresponding to dependence task;
Described task controller distributes sum and each by cycle corresponding to dependence task according to each free time sheet by dependence task, processes the task of having dependence in the described task queue.
2. method according to claim 1, it is characterized in that, described the first strategy is: described timeslice divider calculates respectively each by dependence task accounting corresponding to dependence task according to the described Task Dependent table of comparisons,, calculated and obtain each free time sheet by dependence task and distribute sum by the total amount of system's free time sheet of dependence task accounting corresponding to dependence task and current time according to each.
3. method according to claim 1 is characterized in that, described the second strategy is: each is distributed total by cycle corresponding to dependence task according to each free time sheet by dependence task and each is determined by dependence task number corresponding to dependence task.
4. method according to claim 1 is characterized in that, the task in the described task queue according to the dependence ordering, preferentially is performed by dependence task.
5. method according to claim 1, it is characterized in that, described task controller judges whether to process dependence task in the described task queue according to the result who is fed back by the dependence task one-period, if can not process, then continue to wait for the described result who is fed back by the dependence task next cycle, until till described dependence task can process.
6. method according to claim 1, it is characterized in that, if arbitrary in the described task queue finished by dependence task, then described task controller upgrades the described Task Dependent table of comparisons, and the described Task Dependent table of comparisons that will upgrade is sent to described timeslice divider.
7. the system of a task control is characterized in that, comprises client, task controller and timeslice divider, and described client connects described task controller, and described task controller connects described timeslice divider,
Wherein, described client with job invocation to described task controller,
Described task controller will have the task of dependence and put into task queue, and set up the Task Dependent table of comparisons according to the dependence between the task, and the described Task Dependent table of comparisons is synchronous to described timeslice divider,
Described timeslice divider obtains each free time sheet by dependence task and distributes sum, and distribute sum to be sent to described task controller each free time sheet by dependence task according to the described Task Dependent table of comparisons and the first strategy,
Described task controller distributes sum and the second strategy according to the described Task Dependent table of comparisons, each free time sheet by dependence task, determines each by cycle corresponding to dependence task,
Described task controller distributes sum and each by cycle corresponding to dependence task according to each the free time sheet by dependence task that receives, and processes the task of having dependence in the described task queue.
8. system according to claim 7, it is characterized in that, described the first strategy is: described timeslice divider calculates respectively each by dependence task accounting corresponding to dependence task according to the described Task Dependent table of comparisons,, calculated and obtain each free time sheet by dependence task and distribute sum by the total amount of system's free time sheet of dependence task accounting corresponding to dependence task and current time according to each.
9. system according to claim 7 is characterized in that, described the second strategy is: each is distributed total by cycle corresponding to dependence task according to each free time sheet by dependence task and each is determined by dependence task number corresponding to dependence task.
10. system according to claim 7 is characterized in that, the task in the described task queue according to the dependence ordering, preferentially is performed by dependence task.
CN2013100075357A 2013-01-09 2013-01-09 Method and system for controlling tasks Pending CN103077084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100075357A CN103077084A (en) 2013-01-09 2013-01-09 Method and system for controlling tasks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100075357A CN103077084A (en) 2013-01-09 2013-01-09 Method and system for controlling tasks

Publications (1)

Publication Number Publication Date
CN103077084A true CN103077084A (en) 2013-05-01

Family

ID=48153619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100075357A Pending CN103077084A (en) 2013-01-09 2013-01-09 Method and system for controlling tasks

Country Status (1)

Country Link
CN (1) CN103077084A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014108000A1 (en) * 2013-01-09 2014-07-17 苏州亿倍信息技术有限公司 Task allocation method and system
CN107885587A (en) * 2017-11-17 2018-04-06 清华大学 A kind of executive plan generation method of big data analysis process

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101743534A (en) * 2007-07-16 2010-06-16 微软公司 By increasing and shrinking resources allocation and dispatch
US20110099551A1 (en) * 2009-10-26 2011-04-28 Microsoft Corporation Opportunistically Scheduling and Adjusting Time Slices
CN102591712A (en) * 2011-12-30 2012-07-18 大连理工大学 Decoupling parallel scheduling method for rely tasks in cloud computing
US20120246659A1 (en) * 2011-03-25 2012-09-27 Microsoft Corporation Techniques to optimize upgrade tasks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101743534A (en) * 2007-07-16 2010-06-16 微软公司 By increasing and shrinking resources allocation and dispatch
US20110099551A1 (en) * 2009-10-26 2011-04-28 Microsoft Corporation Opportunistically Scheduling and Adjusting Time Slices
US20120246659A1 (en) * 2011-03-25 2012-09-27 Microsoft Corporation Techniques to optimize upgrade tasks
CN102591712A (en) * 2011-12-30 2012-07-18 大连理工大学 Decoupling parallel scheduling method for rely tasks in cloud computing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014108000A1 (en) * 2013-01-09 2014-07-17 苏州亿倍信息技术有限公司 Task allocation method and system
CN107885587A (en) * 2017-11-17 2018-04-06 清华大学 A kind of executive plan generation method of big data analysis process
CN107885587B (en) * 2017-11-17 2018-12-07 清华大学 A kind of executive plan generation method of big data analysis process

Similar Documents

Publication Publication Date Title
CN103064745B (en) A kind of method and system of task matching process
CN103077083A (en) Method and system for processing tasks
CN103077086A (en) Method and system for controlling task distribution
CN102902587B (en) Distributed task dispatching mthods, systems and devices
TWI547817B (en) Method, system and apparatus of planning resources for cluster computing architecture
WO2016169287A1 (en) Productivity allocation method for mixed production line
CN109582448B (en) Criticality and timeliness oriented edge calculation task scheduling method
CN104965755B (en) Cloud service workflow schedule method based on budgetary restraints
CN103838621B (en) Method and system for scheduling routine work and scheduling nodes
WO2012151054A1 (en) Scheduling in mapreduce-like systems for fast completion time
CN111381950A (en) Task scheduling method and system based on multiple copies for edge computing environment
CN103401939A (en) Load balancing method adopting mixing scheduling strategy
CN102915248A (en) Automatic deploying system and automatic deploying method of application system
Zhang et al. Asynchronous distributed semi-stochastic gradient optimization
CN104765640A (en) Intelligent service scheduling method
Penmatsa et al. Price-based user-optimal job allocation scheme for grid systems
CN103257896A (en) Max-D job scheduling method under cloud environment
CN102609316A (en) Management system and management method of network computing resource
CN103077084A (en) Method and system for controlling tasks
CN108415760A (en) A kind of online method for allocating tasks of gunz calculating based on mobile opportunistic network
CN115049201A (en) Job scheduling method and device, electronic equipment and storage medium
CN103077085A (en) Method and system for distributing tasks
CN108429784B (en) Energy efficiency priority cloud resource allocation and scheduling method
CN102056201B (en) Method and device for processing abnormal condition in service process
CN107526632B (en) Process pool expansion method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20160601

C20 Patent right or utility model deemed to be abandoned or is abandoned