CN106598717B - A kind of method for scheduling task based on time slice - Google Patents

A kind of method for scheduling task based on time slice Download PDF

Info

Publication number
CN106598717B
CN106598717B CN201611113867.3A CN201611113867A CN106598717B CN 106598717 B CN106598717 B CN 106598717B CN 201611113867 A CN201611113867 A CN 201611113867A CN 106598717 B CN106598717 B CN 106598717B
Authority
CN
China
Prior art keywords
task
processor
time
coefficient
execution
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
CN201611113867.3A
Other languages
Chinese (zh)
Other versions
CN106598717A (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.)
Shaanxi Shang Shang Mdt Infotech Ltd
Original Assignee
Shaanxi Shang Shang Mdt Infotech 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 Shaanxi Shang Shang Mdt Infotech Ltd filed Critical Shaanxi Shang Shang Mdt Infotech Ltd
Priority to CN201611113867.3A priority Critical patent/CN106598717B/en
Publication of CN106598717A publication Critical patent/CN106598717A/en
Application granted granted Critical
Publication of CN106598717B publication Critical patent/CN106598717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/486Scheduler internals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

The invention discloses a kind of method for scheduling task based on time slice.Its implementation is: system detection reaches or at the end of having task to there is new task, the task parameters of all tasks are reinitialized immediately, then each task is split into and executes the reasonable subtask of time slice length, and it determines the execution sequence of these subtasks and executes the processor of these subtasks, final updating schedule of tasks, it is executed according to new schedule of tasks scheduler task, and timely feedback the ending message that task execution is completed to task parameters initialization section above-mentioned, promote it to generate new schedule of tasks.The present invention can be used for isomorphism multicomputer system.

Description

A kind of method for scheduling task based on time slice
Technical field
The invention belongs to operating system field more particularly to a kind of method for scheduling task based on time slice, can use In isomorphism multicomputer system.
Background technique
Method for scheduling task is the critical problem that must be taken into consideration when designing high performance multicomputer system.With complete How the aggravation of ball energy shortages reduces processor energy consumption and has caused more and more to pay close attention to.Therefore, a good task tune Degree method can make system while guaranteeing service quality, moreover it is possible to run under alap rated power, to reach section It can purpose.
Existing background technique generallys use open loop dispatching method as shown in Figure 1.Multiple tasks enter multiprocessor system When system, system can be that each task estimates an execution time according to the size of each task.When a task is in some processing When executing on device, this processor will be occupied always in estimation executes the time.It is all based in view of the estimation execution time the worst What situation provided, so actually usually the compared estimate execution time will fulfil ahead of schedule task, in remaining this period later, i.e., Make running on processor there is no task, running frequency operation when task is but still executed with front, at this moment, is not only remained Remaining this period is wasted, but also can generate unnecessary energy consumption.
The estimation execution time of task differs bigger with actual execution time, illustrates that the uncertainty of system environments is bigger, The energy consumption of system wastes is also bigger.It is then desired to a kind of method for scheduling task be found, to overcome the uncertainty of system environments Bring energy waste.
Summary of the invention
The present invention proposes a kind of method for scheduling task based on time slice, using the feedback information for the task that is completed come real When adjust system schedule of tasks, so that system is constantly in optimum Working, thus achieve the purpose that reduce total energy consumption.
To achieve the above object, technical solution of the present invention includes:
A kind of method for scheduling task based on time slice, comprising the following steps:
Step 1: whenever system monitoring to the task ginseng for thering is new task to reach or at the end of having task execution, in system Number is initialized;
Step 2: splitting task, and determines task execution time segment;
Step 3: it determines the sequence that executes of task, and exports schedule of tasks;
Step 4: system real-time update schedule of tasks successively controls each processor according to the sequencing of time slice Execution task.
Further according to the method for scheduling task based on time slice, whenever system monitoring is to there is new post in step 1 At the end of business reaches or has task execution, the task parameters in system are initialized;
Total task number in system is N, the task in system is numbered with 1,2 ..., N, the set of number composition It is expressed as I, I={ 1,2 ..., N }, then the set of all tasks can be expressed as T, T={ T in systemi|i∈I};biIt indicates to appoint The arrival time of business, xiThe estimation of expression task at least executes time, diThe execution time limit of expression task, then any in set T Be engaged in TiUse Ti=(bi,xi,di) indicate;If task TiIn biMoment reaches, then it must be in next diIt is completed in time, i.e., Cut-off time is bi+di
xiRequired time when executing the task in the worst cases for processor with maximum frequency, so the reality of task It is minimum to execute time yiThan xiIt is small, if γiFor actual execution time estimation coefficient, then there is yiixi, 0 < γi≤ 1, γiMore Small, the uncertainty of task parameters is bigger in system.
Further according to the method for scheduling task based on time slice, task is split in step 2, and determine and appoint The time slice that business executes;
To all tasks in task-set T, successively make to map as follows to n-th task since first task: the 1st Task T1Arrival time b1It is mapped to time instant τ0, cut-off time b1+d1It is mapped to time instant τ1, meet τ10=d1;2nd task T2Arrival time b2It is mapped to time instant τ1, cut-off time b2+d2It is mapped to time instant τ2, meet τ21=d2;…;N-th task TNArrival time bNIt is mapped to time instant τN-1, cut-off time bN+dNIt is mapped to time instant τN, meet τNN-1=dN;t1,t2Meet t10< τ1< ... < τN=t2, then time interval [t1,t2] just by τ01,...,τNIt is divided into the timeslice of many segments Section;Above-mentioned { τ is identified with μ01,...,τNIn element, μ ∈ U, U={ 0,1 ..., N-1 }, [t1,t2] in one when Between segment can be used [τμμ+1] indicate, it is ensured that at least need 1 processor can be in [t1,t2] time interior completion task-set T In all task;
Include m identical processors, the running frequency f of each processor in system1,f2,...,fmax(f1< f2 < ... < fmax), it is indicated with running frequency class set Q={ 1,2 ..., l }, wherein 1 corresponding the smallest running frequency f1, L corresponds to maximum running frequency fmax;The voltage/frequency of the processor adjusts DVFS technology by dynamic voltage frequency respectively It is independently adjusted, multiple processors can execute different tasks respectively simultaneously with different speed grades;
Individual task in the task-set T can split into multiple subtasks to execute step by step, then determine that subtask will In which execution time slice, and execute duration and running frequency grade;
Indicate a running frequency grade of processor with q, q ∈ Q,Referred to as load distribution coefficient, expression processing Device will be in time interval [τμμ+1] on it is a certain when it is a length ofTime interval in held with running frequency grade q Row task Ti,Task T1Load distribution coefficient sets be Indicate that processor will could execute the task totally 3 times on 2 time slices;In time slice [τ01] on, once with fortune Line frequency grade 1 executes [τ01] in wherein 0.4 (τ10) second, [τ is once executed with running frequency grade 201] in Wherein 0.2 (τ10) second, and this is executed twice must be ordered into execution, i.e., before equal it is primary execute after the completion of could execute under It once, cannot be to execute while carrying out twice;In time slice [τ12] on, [τ is executed with running frequency grade 112] in Wherein 0.3 (τ21) second, it is current execute complete after, then illustrate entire task T1It completes;
There is following constraint condition:
(1) task can only once be assigned on a processor and be performed, and then have μ∈U;
(2) each processor is in [τμμ+1] in the maximum load that can handle be 1, i.e., in [τμμ+1] in the processor On there is task executing always, and system includes m processor, therefore system is in [τμμ+1] in the maximum load that can handle As m then has
Relationship between the standardization operating rate s and running frequency f of processor is s=f/fmax,f∈[f1,fmax],s ∈ [0,1], corresponding power is by P (s at this timeq) provide, then in time interval [t1,t2] interior system total energy consumption
Method is equivalent to a purpose variable and constrains the controllable finite dimensional linear planning of conditional number amount in the step 2 Problem finds out load distribution coefficient of all tasks in each time sliceSo that system is in entire time interval [t1,t2] in total energy consumption E (t1,t2) reach minimum;
To obtain load distribution coefficient setsIndicate that a certain processor will be in the time It is spaced [τμμ+1] in it is a certain when it is a length ofTime interval in running frequency grade q execute task Ti
Further according to the method for scheduling task based on time slice, task is determined in step 3 executes sequence, And export schedule of tasks;
All processors are numbered with 1,2 ..., m, the set expression of number composition is K, K={ 1,2 ..., m }; I ∈ I indicates mission number;K ∈ K indicates processor number;Q ∈ Q indicates frequency Operation class;In time interval [t1,t2] Interior sometime segmentIn, use starting coefficientsIndicate that processor k existsMoment Start q in mode and runs task Ti, with cut-off coefficientIt indicatesMoment terminates the task This is executed, and is specifically executed as follows:
(3-1) sets 0 to starting coefficients of all tasks in all time slices and cut-off coefficient, to system application one A processor is used to execute task, claims the processor to be in and enlivens state, and other processors not being applied temporarily are known as Idle state, Being now in and enlivening the processor maximum number of state is k=1;
The sequence that (3-2) is incremented by according to mission number i, since the 1st task, each task for being followed successively by task-set T Determine starting coefficients and cut-off coefficient;To the 1st task, end coefficientIt is assigned a value ofSince the 2nd task Until n-th task, using the cut-off coefficient of previous task as the starting coefficients of this task;
It is k that (3-3), which is now in and enlivens the processor maximum number of state, if the cut-off coefficient of previous task is plus this The sum of load distribution coefficient of business is not more than processor maximum number k, then to all execution frequency level q, this task is being located The starting coefficients that cut-off coefficient when on reason device k with speed grade q execution is set as this task add the sum of load distribution coefficient, This task is assigned, then return step 3-2, starts next task distribution;
It is numbered if the cut-off coefficient of previous task is greater than processor maximum plus the sum of load distribution coefficient of this task K then sets 1 for cut-off coefficient of this task when on processor k with speed grade q execution, illustrates allocated processor Full load is had reached, therefore again to one processor of system application;Rule for application are as follows: processor its number of the 1st application is The processor number of 1, the 2nd application is 2 ... ..., and the processor number of the m times application is m;If the number of application is more than task The maximum quantity of processor, then illustrate system fault in execution module, this task schedule terminates, and is now in the place for enlivening state Managing device maximum number is k=k+1;The load distribution coefficient of this task is subtracted into this task on processor k-1 with speed grade q The difference of cut-off coefficient and starting coefficients when execution, as cut-off system of this task when on processor k with speed grade q execution Number;Return step 3-2 starts next task distribution;
After (3-4) all tasks are assigned, output includes the starting coefficients of all tasksWith cut-off coefficientOne setThe collection is combined into schedule of tasks.
Further according to the method for scheduling task based on time slice, system real-time update task schedule in step 4 Table, according to time slice such as [τ01], [τ12] ... ..., [τN-1N] sequencing, successively control each processor and execute and appoint Business;In time slice [τμμ+1] in, according toWithValue, task execution module control processor k inMoment starts execution task T with running frequency grade qi, and in Moment terminates the execution of this subtask;
Each task TiAt the end of, the ending message of the task is timely fed back to the input started by task execution module End, when task executions all in system finish, this task schedule terminates.
Compared with the prior art, the invention has the following advantages:
1. in the present invention, being accelerated using the method for feedback by the information Real-time Feedback for the task that is completed to input terminal Effective update of the system to schedule of tasks, the uncertain bring that can greatly reduce system environments influence, and system makes The processing speed that the utilization rate and system of processor are total is promoted.
2. in the present invention, since task fulfils the remaining time ahead of schedule, can be recycled, to execute other Business, this is all advantageous the total energy consumption for improving system performance and reduction system.
Detailed description of the invention
Fig. 1 is the realization frame diagram of the method for the invention;
Fig. 2 is the implementation flow chart of the method for the invention;
Fig. 3 is the exemplary diagram that individual task is split into multiple subtasks;
Fig. 4 is the exemplary diagram being mapped to multiple tasks by the task execution time limit on time shaft.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, below in conjunction with attached drawing, to of the present invention Scheme and effect are described in further detail.
A kind of method for scheduling task based on time slice of the present invention, as depicted in figs. 1 and 2, specific implementation step It is as follows:
Step 1: whenever system monitoring to the task ginseng for thering is new task to reach or at the end of having task execution, in system Number is initialized.
Total task number in system is N, the task in system is numbered with 1,2 ..., N, the set of number composition It is expressed as I, I={ 1,2 ..., N }, then the set of all tasks can be expressed as T, T={ T in systemi|i∈I}.Use biIt indicates The arrival time of task, xiThe estimation of expression task at least executes time, diIt is the execution time limit of expression task, then any in set T Task TiUse Ti=(bi,xi,di) indicate.If task TiIn biMoment reaches, then it must be in next diIt is completed in time, I.e. cut-off time is bi+di
xiRequired time when executing the task in the worst cases for processor with maximum frequency, so the reality of task It is minimum to execute time yiThan xiIt is small, if γiFor actual execution time estimation coefficient, then there is yiixi, 0 < γi≤1。γiMore Small, the uncertainty of task parameters is bigger in system.
Step 2: splitting task, and determines the time slice of task execution.
To all tasks in task-set T, successively make to map as follows to n-th task since first task: the 1st Task T1Arrival time b1It is mapped to time instant τ0, cut-off time b1+d1It is mapped to time instant τ1, meet τ10=d1;2nd task T2Arrival time b2It is mapped to time instant τ1, cut-off time b2+d2It is mapped to time instant τ2, meet τ21=d2;…;N-th task TNArrival time bNIt is mapped to time instant τN-1, cut-off time bN+dNIt is mapped to time instant τN, meet τNN-1=dN.As shown in figure 3, If t1,t2Meet t10< τ1< ... < τN=t2, then time interval [t1,t2] just by τ01,...,τNIt is divided into many The time slice of segment.Above-mentioned { τ is identified with μ01,...,τNIn element, μ ∈ U, U={ 0,1 ..., N-1 }.[t1, t2] in a time slice can be used [τμ, τμ+1] indicate, it is ensured that at least need 1 processor can be in [t1,t2] time It is interior to complete task all in task-set T.
Include m identical processors, the running frequency f of each processor in system1,f2,...,fmax(f1< f2 < ... < fmax), it is indicated with running frequency class set Q={ 1,2 ..., l }, wherein 1 corresponding the smallest running frequency f1, L corresponds to maximum running frequency fmax.It is independent that the voltage/frequency of processor adjusts DVFS technology by dynamic voltage frequency respectively Ground is adjusted, and multiple processors can execute different tasks respectively simultaneously with different speed grades.
As shown in figure 4, the individual task in task-set T can split into multiple subtasks to execute step by step, then determine son Which task execute time slice at, and executes duration and running frequency grade.
Indicate a running frequency grade of processor with q, q ∈ Q,Referred to as load distribution coefficient, expression processing Device will be in time interval [τμμ+1] on it is a certain when it is a length ofTime interval in running frequency grade q Execution task Ti,Task T1Load distribution coefficient sets beIndicate that processor will could execute this totally 3 times on 2 time slices Business.In time slice [τ01] on, [τ is once executed with running frequency grade 101] in wherein 0.4 (τ10) second, one It is secondary that [τ is executed with running frequency grade 201] in wherein 0.2 (τ10) second, and this executes to be ordered into twice and hold Row could execute next time after the completion of primary execution before waiting, and cannot execute while carrying out twice.In time slice [τ1, τ2] on, [τ is executed with running frequency grade 112] in wherein 0.3 (τ21) second, it is current execute complete after, then say Bright entire task T1It completes.
And it is rightThere is following constraint condition:
(1) task can only once be assigned on a processor and be performed, and then have μ∈U。
(2) each processor is in [τμμ+1] in the maximum load that can handle be 1, i.e., in [τμμ+1] in the processor On there is task executing always, and system includes m processor, therefore system is in [τμμ+1] in the maximum load that can handle As m then has
Relationship between the standardization operating rate s and running frequency f of processor is s=f/fmax,f∈[f1,fmax],s ∈ [0,1], corresponding power is by P (s at this timeq) provide, then in time interval [t1,t2] interior system total energy consumption
Method is equivalent to a purpose variable and constrains the controllable finite dimensional linear planning of conditional number amount in the step 2 Problem seeks load distribution coefficient of all tasks in each time sliceSo that system is in entire time interval [t1, t2] in total energy consumption E (t1,t2) reach minimum.
And then obtain load distribution coefficient setsIndicate that a certain processor will be in the time It is spaced [τμμ+1] in it is a certain when it is a length ofTime interval in running frequency grade q execute task Ti
Step 3: it determines the sequence that executes of task, and exports schedule of tasks.
All processors are numbered with 1,2 ..., m, the set expression of number composition is K, K={ 1,2 ..., m }. I ∈ I indicates mission number;K ∈ K indicates processor number;Q ∈ Q indicates frequency Operation class.In time interval [t1,t2] Interior sometime segment [τμμ+1] in, use starting coefficientsIndicate that processor k existsMoment Start q in mode and runs task Ti, with cut-off coefficientIt indicatesMoment terminates the task This is executed.It executes as follows:
(3-1) sets 0 to starting coefficients of all tasks in all time slices and cut-off coefficient, to system application one A processor claims the processor to be in and enlivens state, other processors not being applied temporarily are known as Idle state for executing task. Being now in and enlivening the processor maximum number of state is k=1.
The sequence that (3-2) is incremented by according to mission number i, since the 1st task, each task for being followed successively by task-set T Determine starting coefficients and cut-off coefficient.To the 1st task, end coefficientIt is assigned a value ofSince the 2nd task Until n-th task, using the cut-off coefficient of previous task as the starting coefficients of this task.
It is k that (3-3), which is now in and enlivens the processor maximum number of state, if the cut-off coefficient of previous task is plus this The sum of load distribution coefficient of business is not more than processor maximum number k, then to all execution frequency level q, this task is being located The starting coefficients that cut-off coefficient when on reason device k with speed grade q execution is set as this task add the sum of load distribution coefficient. This task is assigned, return step 3-2, is started as the distribution of next task;
It is numbered if the cut-off coefficient of previous task is greater than processor maximum plus the sum of load distribution coefficient of this task K then sets 1 for cut-off coefficient of this task when on processor k with speed grade q execution, illustrates allocated processor Full load is had reached, therefore again to one processor of system application.Rule for application are as follows: processor its number of the 1st application is The processor number of 1, the 2nd application is 2 ... ..., and the processor number of the m times application is m.If the number of application is more than task The maximum quantity of processor, then illustrate system fault in execution module, this task schedule terminates, and is now in the place for enlivening state Managing device maximum number is k=k+1.The load distribution coefficient of this task is subtracted into this task on processor k-1 with speed grade q The difference of cut-off coefficient and starting coefficients when execution, as cut-off system of this task when on processor k with speed grade q execution Number.Return step 3-2 starts as the distribution of next task.
After (3-4) all tasks are assigned, output includes the starting coefficients of all tasksWith cut-off coefficientOne setFor schedule of tasks.
Step 4: system real-time update schedule of tasks, according to time slice such as [τ01], [τ12] ..., [τN-1N] Sequencing, successively control each processor and execute task.In time sliceIt is interior, according toWith's Value, task execution module control processor k inMoment starts to execute with running frequency grade q appoints Be engaged in Ti, and inMoment terminates the execution of this subtask.
Each task TiAt the end of, the ending message of the task is timely fed back to the input started by task execution module End.When task executions all in system finish, this task schedule terminates.
Above-mentioned is only to clearly illustrate example of the present invention, not limit the embodiments.For affiliated For the those of ordinary skill in field, other various forms of variations or variation can also be made on the basis of the above description. There is no necessity and possibility to exhaust all the enbodiments, and thus changes and variations that derived from are still Among protection scope of the present invention.

Claims (2)

1. a kind of method for scheduling task based on time slice, which comprises the following steps:
Step 1: whenever system monitoring is to having new task to reach or at the end of having task execution, the task parameters in system into Row initialization;
Step 2: splitting task, and determines task execution time segment;
Step 3: it determines the sequence that executes of task, and exports schedule of tasks;
Step 4: system real-time update schedule of tasks successively controls each processor and executes according to the sequencing of time slice Task;
Wherein, whenever system monitoring is to there is new task to reach or task at the end of having task execution, in system in step 1 Parameter is initialized;Total task number in system is N, and the task in system is numbered with 1,2 ..., N, number composition Set expression be I, I={ 1,2 ..., N }, then the set of all tasks can be expressed as T, T={ T in systemi|i∈I};bi The arrival time of expression task, xiThe estimation of expression task at least executes time, diThe execution time limit of expression task, then in set T Any task TiUse Ti=(bi,xi,di) indicate;If task TiIn biMoment reaches, then it must be in next diIt is complete in time At i.e. cut-off time is bi+di
xiRequired time when executing the task in the worst cases for processor with maximum frequency, so task is practical minimum Execute time yiThan xiIt is small, if γiFor actual execution time estimation coefficient, then there is yiixi, 0 < γi≤ 1, γiIt is smaller, The uncertainty of task parameters is bigger in system;
Task is split in step 2, and determines the time slice of task execution;To all tasks in task-set T, from first A task starts to n-th task successively to make to map as follows: the 1st task T1Arrival time b1It is mapped to time instant τ0, when cut-off Carve b1+d1It is mapped to time instant τ1, meet τ10=d1;2nd task T2Arrival time b2It is mapped to time instant τ1, cut-off time b2 +d2It is mapped to time instant τ2, meet τ21=d2;…;N-th task TNArrival time bNIt is mapped to time instant τN-1, cut-off time bN +dNIt is mapped to time instant τN, meet τNN-1=dN;t1,t2Meet t10< τ1< ... < τN=t2, then time interval [t1, t2] just by τ01,...,τNIt is divided into the time slice of many segments;{ τ is identified with μ01,...,τNIn element, μ ∈ U, U={ 0,1 ..., N-1 }, [t1,t2] in a time slice can be used [τμμ+1] indicate, it is ensured that it at least needs at 1 Managing device can be in [t1,t2] task all in task-set T is completed in the time;
Include m identical processors, the running frequency f of each processor in system1,f2,...,fmax(f1< f2< ... < fmax), it is indicated with running frequency class set Q={ 1,2 ..., l }, wherein 1 corresponding the smallest running frequency f1, l correspondence Maximum running frequency fmax;The voltage/frequency of the processor adjusts DVFS technology independently by dynamic voltage frequency respectively It is adjusted, multiple processors can execute different tasks respectively simultaneously with different running frequency grades;
Individual task in the task-set T can split into multiple subtasks to execute step by step, then determine subtask will be at which A execution time slice, and execute duration and running frequency grade;
Indicate a running frequency grade of processor with q, q ∈ Q,Referred to as load distribution coefficient indicates that processor will In time interval [τμμ+1] on it is a certain when it is a length ofTime interval in running frequency grade q execution Task Ti,
There is following constraint condition:
(1) task can only once be assigned on a processor and be performed, and then have
(2) each processor is in [τμμ+1] in the maximum load that can handle be 1, i.e., in [τμμ+1] in one on the processor Directly there is task executing, and system includes m processor, therefore system is in [τμμ+1] in the maximum load that can handle be M then has
Relationship between the standardization operating rate s and running frequency f of processor is s=f/fmax,f∈[f1,fmax],s∈[0, 1], at this time corresponding power by P (sq) provide, then in time interval [t1,t2] interior system total energy consumption
Method is equivalent to a purpose variable and constrains the controllable finite dimensional linear planning problem of conditional number amount in the step 2, Find out load distribution coefficient of all tasks in each time sliceSo that system is in entire time interval [t1,t2] Interior total energy consumption E (t1,t2) reach minimum;
To obtain load distribution coefficient setsIndicate that a certain processor will be in time interval [τμμ+1] in it is a certain when it is a length ofTime interval in running frequency grade q execute task Ti
Task is determined in step 3 executes sequence, and exports schedule of tasks;With 1,2 ..., m compiles all processors Number, the set expression of number composition is K, K={ 1,2 ..., m };I ∈ I indicates mission number;K ∈ K indicates that processor is compiled Number;Q ∈ Q indicates running frequency grade;In time interval [t1,t2] in sometime segmentIn, it is with starting NumberIndicate that processor k existsMoment starts q in mode and runs task Ti, with cut-off coefficientIt indicatesMoment terminates this execution of the task, specifically executes as follows:
(3-1) sets 0 to starting coefficients of all tasks in all time slices and cut-off coefficient, at system application one Reason device claims the processor to be in and enlivens state, other processors not being applied temporarily are known as Idle state, at this time for executing task Numbering in the processor maximum for enlivening state is k=1;
The sequence that (3-2) is incremented by according to mission number i, since the 1st task, each task being followed successively by task-set T is determined Starting coefficients and cut-off coefficient;To the 1st task, end coefficientIt is assigned a value ofSince the 2nd task always To n-th task, using the cut-off coefficient of previous task as the starting coefficients of this task;
It is k that (3-3), which is now in and enlivens the processor maximum number of state, if the cut-off coefficient of previous task is plus this task The sum of load distribution coefficient is not more than processor maximum number k, then to all running frequency grade q, this task is in processor k On with running frequency grade q execution when cut-off coefficient be set as the starting coefficients of this task plus the sum of load distribution coefficient, This task is assigned, then return step 3-2, starts next task distribution;
If the cut-off coefficient of previous task is greater than processor maximum number k plus the sum of load distribution coefficient of this task, 1 is set by cut-off coefficient of this task when on processor k with running frequency grade q execution, illustrates allocated processor Full load is had reached, therefore again to one processor of system application;Rule for application are as follows: processor its number of the 1st application is The processor number of 1, the 2nd application is 2 ... ..., and the processor number of the m times application is m;If the number of application is more than task The maximum quantity of processor, then illustrate system fault in execution module, this task schedule terminates, and is now in the place for enlivening state Managing device maximum number is k=k+1;The load distribution coefficient of this task is subtracted into this task on processor k-1 with running frequency The difference of cut-off coefficient and starting coefficients when grade q is executed, as this task with running frequency grade q execution on processor k When cut-off coefficient;Return step 3-2 starts next task distribution;
After (3-4) all tasks are assigned, output includes the starting coefficients of all tasksWith cut-off coefficient's One setThe collection is combined into schedule of tasks.
2. according to claim 1 based on the method for scheduling task of time slice, which is characterized in that system is real-time in step 4 Schedule of tasks is updated, according to time slice such as [τ01], [τ12] ... ..., [τN-1N] sequencing, successively control is each Processor executes task;In time slice [τμμ+1] in, according toWithValue, task execution module control processing Device k inMoment starts execution task T with running frequency grade qi, and inMoment terminates the execution of this subtask;
Each task TiAt the end of, the ending message of the task is timely fed back to the input terminal started by task execution module, when being When all task executions finish in system, this task schedule terminates.
CN201611113867.3A 2016-12-07 2016-12-07 A kind of method for scheduling task based on time slice Active CN106598717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611113867.3A CN106598717B (en) 2016-12-07 2016-12-07 A kind of method for scheduling task based on time slice

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611113867.3A CN106598717B (en) 2016-12-07 2016-12-07 A kind of method for scheduling task based on time slice

Publications (2)

Publication Number Publication Date
CN106598717A CN106598717A (en) 2017-04-26
CN106598717B true CN106598717B (en) 2019-06-11

Family

ID=58595325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611113867.3A Active CN106598717B (en) 2016-12-07 2016-12-07 A kind of method for scheduling task based on time slice

Country Status (1)

Country Link
CN (1) CN106598717B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090153B (en) * 2017-12-11 2020-04-14 深圳云天励飞技术有限公司 Searching method, searching device, electronic equipment and storage medium
CN109002377A (en) * 2018-07-26 2018-12-14 郑州云海信息技术有限公司 A kind of processor detection method, processor detection device and computer equipment
WO2020073938A1 (en) * 2018-10-10 2020-04-16 上海寒武纪信息科技有限公司 Task scheduler, task processing system, and task processing method
CN109871394B (en) * 2019-01-17 2022-11-11 苏宁易购集团股份有限公司 Full-distributed high-concurrency calculation method and device
CN110213075B (en) * 2019-04-04 2020-01-31 特斯联(北京)科技有限公司 multi-network node configuration method, device, terminal equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1910553A (en) * 2004-01-08 2007-02-07 皇家飞利浦电子股份有限公司 Method and apparatus for scheduling task in multi-processor system based on memory requirements
CN101075694A (en) * 2007-06-08 2007-11-21 清华大学 Method for allocating task and elongating cell usage time to multi-state monoprocessor
CN101226421A (en) * 2008-01-16 2008-07-23 浙江大学 MSR method for real time embedded system EDF low-power consumption scheduling
CN103944997A (en) * 2014-04-29 2014-07-23 上海交通大学 Load balancing method with combination of random sampling and virtualization technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1910553A (en) * 2004-01-08 2007-02-07 皇家飞利浦电子股份有限公司 Method and apparatus for scheduling task in multi-processor system based on memory requirements
CN101075694A (en) * 2007-06-08 2007-11-21 清华大学 Method for allocating task and elongating cell usage time to multi-state monoprocessor
CN101226421A (en) * 2008-01-16 2008-07-23 浙江大学 MSR method for real time embedded system EDF low-power consumption scheduling
CN103944997A (en) * 2014-04-29 2014-07-23 上海交通大学 Load balancing method with combination of random sampling and virtualization technology

Also Published As

Publication number Publication date
CN106598717A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106598717B (en) A kind of method for scheduling task based on time slice
Van Tilborg et al. Foundations of real-time computing: Scheduling and resource management
CN101620550B (en) Embedded real-time scheduling method based on fuzzy multiple features of task
CN101923487A (en) Comprehensive embedded type real-time period task scheduling method
CN106773711B (en) A kind of the hybrid tasks scheduling method and model of railway locomotive operation steerable system
CN108154317B (en) Workflow group scheduling method based on example self-adaptive distribution integration in multi-cloud environment
CN106775932B (en) Real-time workflow scheduling method triggered by random event in cloud computing system
Ströhle et al. Online mechanism design for scheduling non-preemptive jobs under uncertain supply and demand
CN111738446A (en) Scheduling method, device, equipment and medium of deep learning inference engine
CN111861412B (en) Completion time optimization-oriented scientific workflow scheduling method and system
CN111026519B (en) Distributed task priority scheduling method and system and storage medium
CN103745225A (en) Method and system for training distributed CTR (Click To Rate) prediction model
CN101237469A (en) Method for optimizing multi-QoS grid workflow based on ant group algorithm
CN108536530B (en) Multithreading task scheduling method and device
CN104915253A (en) Work scheduling method and work processor
CN113138860B (en) Message queue management method and device
Mittal et al. Integrated dynamic scheduling of hard and QoS degradable real-time tasks in multiprocessor systems
Anand et al. Meeting deadlines: How much speed suffices?
CN101996105A (en) Static software/hardware task dividing and dispatching method for reconfigurable computing platform
CN103314357B (en) Perform for using multiple stage in the microprocessor and the method and apparatus dispatched is issued to instruction
CN109308216A (en) A kind of monokaryon system real time task dispatching method for imprecise computation
CN113076181A (en) Data processing flow optimization method, system and storage medium
Liu et al. On-line scheduling of real-time services with profit and penalty
CN104484160A (en) Instruction scheduling and register allocation method on optimized clustered VLIW (Very Long Instruction Word) processor
Minh et al. Modeling green-aware job scheduling problem in decentralized data centers

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