CN105808335A - Dynamic scheduling method and device - Google Patents
Dynamic scheduling method and device Download PDFInfo
- Publication number
- CN105808335A CN105808335A CN201610125284.6A CN201610125284A CN105808335A CN 105808335 A CN105808335 A CN 105808335A CN 201610125284 A CN201610125284 A CN 201610125284A CN 105808335 A CN105808335 A CN 105808335A
- Authority
- CN
- China
- Prior art keywords
- waiting time
- job size
- dispatch weight
- size
- job
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a dynamic scheduling method and device. The method comprises the following steps: obtaining a plurality of operations to be scheduled; in a scheduling process, according to the operation size and the latency time of each operation, dynamically regulating the scheduling weight of each operation, wherein the latency time and the scheduling weight are in inverse proportion to the operation size; and according to the scheduling weight, dynamically scheduling the operation. Compared with the prior art, the scheme provided by the invention can solve the problem of big operation blockage in a FIFO (First In First Out) algorithm, also solves the problem of resource dispersion in a Fair algorithm, shortens average turnover time and improves scheduling efficiency.
Description
Technical field
The present invention relates to technical field of the computer network, be specifically related to a kind of dynamic dispatching method and device.
Background technology
Scheduling refers to a kind of resource distribution in an operating system, thus dispatching algorithm refers to: the resource allocation algorithm according to the resource allocation policy defined of system.For different systems and aims of systems, generally adopt different dispatching algorithms.Such as, in batch processing system, in order to look after plurality of little operation, the dispatching algorithm of little job priority should be adopted;And for example in time-sharing system, in order to ensure that system has rational response time, it should adopt rotation therapy to be scheduling.
In currently available technology, widely used one calls algorithm is FIFO (FirstInputFirstOutput, FIFO) algorithm, this algorithm has the advantage of justice, because each request can be processed, and is process according to the order received.But for the operation (existing big operation, have again little operation) of mixed size, the big operation first submitted to can constantly obtain resource, the little operation submitted to after obstruction, cause that in limiting time, response operation number is lower, and average response postpones higher, ultimately results in the average turnaround time longer.
In prior art, another kind of dispatching algorithm is Fair (justice) algorithm, the operation that this algorithm always priority scheduling is not responded, therefore its to respond operation number in limiting time significantly high, and average response postpones relatively low, but there is the scattered problem of resource, the deadline of All Jobs can be extended, the final elongation average turnaround time.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide a kind of dynamic dispatching method and device overcoming the problems referred to above or solving the problems referred to above at least in part.
According to an aspect of the invention, it is provided a kind of dynamic dispatching method, comprising:
Obtain multiple operation to be scheduled;
In scheduling process, according to the job size of each operation and waiting time, dynamically adjust the dispatch weight of each operation;Wherein, job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big;
According to described dispatch weight, described operation is carried out dynamic dispatching.
According to a further aspect in the invention, it is provided that a kind of dynamic scheduler, comprising:
Acquisition module, is suitable to obtain multiple operations to be scheduled;
Adjusting module, is suitable in scheduling process, according to the job size of each operation and waiting time, dynamically adjusts the dispatch weight of each operation;Wherein, job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big;
Scheduler module, is suitable to, according to described dispatch weight, described operation is carried out dynamic dispatching.
According to dynamic dispatching method provided by the invention and device, in scheduling process, job size according to each operation and waiting time dynamically adjust the dispatch weight of each operation, then according to this dispatch weight, each operation are carried out dynamic dispatching.Compared with prior art, the problem that the big operation obstruction that FIFO algorithm exists can be solved, also can solve the scattered problem of resource that Fair algorithm exists, shorten the average turnaround time, improve dispatching efficiency.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only for illustrating the purpose of preferred implementation, and is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical parts.In the accompanying drawings:
Fig. 1 illustrates the flow chart of dynamic dispatching method according to an embodiment of the invention;
Fig. 2 illustrates the flow chart of dynamic dispatching method in accordance with another embodiment of the present invention;
Fig. 3 illustrates the functional block diagram of dynamic scheduler according to an embodiment of the invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should do not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 1 illustrates the flow chart of dynamic dispatching method according to an embodiment of the invention.As it is shown in figure 1, the method comprises the steps:
Step S101, obtains multiple operation to be scheduled.
The major function of job scheduling is that can auditing system meet the resource requirement of user job according to the information in job control block, chooses some operation and calls in internal memory, and create the resource of process, distribution necessity for them from the pool queue of external memory.Generally, job storage to be scheduled is in pool queue, and the embodiment of the present invention can obtain these operations to be scheduled from pool queue, and obtains the relevant information of operation.The relevant information of operation comprises but is not limited only to: job size and waiting time.
The method that the embodiment of the present invention provides is preferably applied to the scheduling scenario of mixed size operation, namely operation to be scheduled had both comprised job size more than at least one operation of the first predetermined threshold value (hereinafter referred to as big operation), comprise again job size at least one operation (hereinafter referred to as little operation) less than the second predetermined threshold value, and big operation and little operation all have certain quantity.
Step S102, in scheduling process, according to the job size of each operation and waiting time, dynamically adjusts the dispatch weight of each operation.
In the embodiment of the present invention, in order to alleviate the situation that little operation is blocked by big operation, making little operation have bigger weight, the more little dispatch weight of job size is more big;But simultaneously in order to avoid big operation is died of hunger by a large amount of little operations, can adjusting the dispatch weight of operation with the waiting time, the waiting time, more big dispatch weight was more big.Therefore, adjustable strategies of the present invention is: job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big.
In actual scheduling process, the waiting time of each operation is dynamically change.In the embodiment of the present invention, the waiting time of operation may be defined as: from being submitted to the current waiting time;Or, obtained resource to the current waiting time from last time.Operation is referred to from original submission beginning with regard to the calculating time from being submitted to the current waiting time, until current time.Obtained resource from last time to refer to operation to the current waiting time and obtain resource from upper sub-distribution and start the clock, until current time.Select and can avoid obtaining resource every time and all will make zero the waiting time from being submitted to the current waiting time, the resource dispersion caused and the hungry problem of big operation.
Job size may be defined as: job size during original submission, or, the job size of current residual.Job size during original submission is fixed value, and the job size of current residual constantly can diminish along with Job execution.If selecting the job size of current residual, operation once execution, then has an opportunity to continue preempting resources until be finished, it is to avoid resource is too disperseed, it is also possible to avoid the dispatch weight hungry problem caused on the low side all the time of big operation.
Step S103, carries out dynamic dispatching according to dispatch weight to operation.
After the dispatch weight adjustment of each operation, according to the dispatch weight after adjusting, operation is carried out dynamic dispatching.If the dispatch weight of operation is big, then the chance of its preempting resources is bigger;If the dispatch weight of operation is little, then the chance of its preempting resources is less.The resource distribution of each operation is dynamically adjusted by dynamically adjusting dispatch weight.
According to the dynamic dispatching method that the present embodiment provides, in scheduling process, job size according to each operation and waiting time dynamically adjust the dispatch weight of each operation, then according to this dispatch weight, each operation are carried out dynamic dispatching.Compared with prior art, the problem that the big operation obstruction that FIFO algorithm exists can be solved, also can solve the scattered problem of resource that Fair algorithm exists, shorten the average turnaround time, improve dispatching efficiency.
Fig. 2 illustrates the flow chart of dynamic dispatching method in accordance with another embodiment of the present invention.As in figure 2 it is shown, the method comprises the steps:
Step S201, obtains multiple operation to be scheduled.
From pool queue, obtain multiple operation to be scheduled, and obtain the relevant information of operation.The relevant information of operation comprises but is not limited only to: job size and waiting time.Wherein, multiple operations to be scheduled had both comprised job size at least one big operation more than the first predetermined threshold value, comprised again job size at least one little operation less than the second predetermined threshold value.
Step S202, the size interval range belonging to job size, job size is mapped as the job size mapping value that described size interval range is corresponding.
In the present embodiment, job size is preferably defined as job size during original submission to.In order to improve controllability and the observability of scheduling, job size is carried out regular in advance by this method, and job size is mapped as the job size mapping value that size interval range is corresponding by the size interval range belonging to job size.
For example, if the distribution of job size is between 1 to 200000, it is necessary to this distribution to be divided into several size interval ranges, the corresponding job size mapping value of each size interval range.Owing to job size is more big, the punishment of its weight is more heavy, it should to avoid a large amount of Ordinary Work are divided into big operation.About job size mapping can referring to table 1, as follows:
Table 1. job size mapping table
Size interval range | Job size mapping value | |
Minimum operation | 1~400 | 1 |
Little operation | 400~2000 | 2 |
Middle operation | 2000~10000 | 4 |
Big operation | 10000~30000 | 8 |
Very big operation | More than 3000 | 16 |
Step S203, the time interval scope belonging to the waiting time, the waiting time is mapped as the waiting time mapping value that described time interval scope is corresponding.
In the present embodiment, the waiting time is preferably defined as from being submitted to the current waiting time.In order to improve controllability and the observability of scheduling, this method is also required to the waiting time carries out regular in advance, belonging to the waiting time time interval scope, and the waiting time is mapped as the waiting time mapping value that time interval scope is corresponding.
For example, if the distribution of waiting time is 1s to+∞, it is necessary to this distribution to be divided into several time interval scopes, the corresponding waiting time mapping value of each time interval scope.Owing to the waiting time is more big, the award of its weight is more high, it is possible to avoid operation to be died of hunger.About the waiting time mapping can referring to table 2, as follows:
Table 2. waiting time mapping table
Step S204, calculates the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtains the dispatch weight of each operation.
Job size and waiting time are carried out regular after, calculate the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtain the dispatch weight of each operation.According to the above-mentioned example, can obtaining following dispatch weight value 9 kinds possible, dispatch weight value is more big, and priority is more high.For identical priority, optional dispatch according to FIFO algorithm.
Table 3. dispatch weight computer chart
This step to realize code as follows:
Step S205, carries out dynamic dispatching according to dispatch weight to operation.
After the dispatch weight adjustment of each operation, according to the dispatch weight after adjusting, operation is carried out dynamic dispatching.If the dispatch weight of operation is big, then the chance of its preempting resources is bigger;If the dispatch weight of operation is little, then the chance of its preempting resources is less.The resource distribution of each operation is dynamically adjusted by dynamically adjusting dispatch weight.
Further, adopt the above-mentioned dispatching method that the present embodiment provides, the punishment of big operation is too heavy, it is possible to cause for big operation, even if its waiting time is very big, the lifting of its dispatch weight is also limited.In view of the situation, it is possible to suitable reduces the job size mapping value that above-mentioned very big operation is corresponding, for instance be adjusted to 10 by 16.
Or, in scheduling process, if job size more than waiting time of the operation of the first predetermined threshold value more than the 3rd predetermined threshold value, improve the dispatch weight of this operation.Such as, for very big operation, if its waiting time reaches starvation time (more than 2000s), can additionally improve the dispatch weight of this operation.It is adjusted obtaining table 4 according to this adjustable strategies his-and-hers watches 3.
Table 4. dispatch weight adjusts table
Above-mentioned adjustable strategies to realize code as follows:
Based on above-mentioned table 4, build scheduling simulated environment on line, obtain the inline system job logging of a day, waiting time and the job size of operation is generated according to truth, resource is dynamically returned to system after obtaining resource and running a period of time (assuming that the execution time of all tasks is equal) by operation, and system again allocates resources to other and waits operation.
Test scene 1 (little operation arrives first): first submit a collection of little operation to, then submit big operation to, totally 104 operations.Operation submission time the earliest is 01:01, and submission time is 02:01 the latest, and maximum job size is 189926, and minimum job size is 13, and average operation is sized to 7102.
Test scene 2 (big operation arrives first): first have submitted a collection of big operation, then submit a collection of little operation to, totally 105 operations.The submission time the earliest of operation is 00:50, and submission time is 02:00 the latest, and maximum job size is 163592, and minimum job size is 13, and average operation is sized to 6549
Test scene 3 (whole day operation): the operation (eliminating the operation less than 10 of a large amount of job size) that simulation whole day is submitted to, the submission time of operation and job size all generate according to real system, totally 1083 operations.The submission time the earliest of operation is 00:01, and submission time is 23:52 the latest, and maximum job size is 189926, and minimum job size is 11, and average operation is sized to 1720.
The present invention adopts following three kinds of modules that scheduling result is measured:
Response operation number: obtained the operation number of response within the set time (as in 24 hours), and be the bigger the better.System simulation runs 24 hours, under three scenes, adopts the operation number that method provided by the invention responds to compare FIFO algorithm and improves 6% respectively, and 1011%, 1009%, compare Fair algorithm and reduce 3% respectively, 5%, 55%.
Average response postpones: all operations being scheduled obtain the average latency of resource from being submitted to first time, and this value is the smaller the better.Whole operations meet with a response, and under three scenes, adopt the average response of method provided by the invention to postpone to compare FIFO algorithm and reduce 62% respectively, and 94%, 77%, compare Fair algorithm and be respectively increased 386%, 1518%, 3678%.
The average turnaround time: operation is from being submitted to the average latency exited, and this value is the smaller the better.Whole operations complete, and under three scenes, adopt the average turnaround time of method provided by the invention to compare and reduce 41% respectively with FIFO algorithm, and 91%, 76%, compare Fair algorithm and reduce 26% respectively, 25%, 32%.
According to the dynamic dispatching method that the present embodiment provides, in scheduling process, job size according to each operation and waiting time dynamically adjust the dispatch weight of each operation, then according to this dispatch weight, each operation are carried out dynamic dispatching.Compared with prior art, although response operation number and average operating lag are relative to Fair algorithm inferior position to some extent, but there is bigger improvement the average turnaround time relative to FIFO algorithm and Fair algorithm, the problem solving the big operation obstruction that FIFO algorithm exists, also can solve the scattered problem of resource that Fair algorithm exists, improve dispatching efficiency.
Fig. 3 illustrates the functional block diagram of dynamic scheduler according to an embodiment of the invention.As it is shown on figure 3, this device includes: acquisition module 301, adjusting module 302 and scheduler module 303.
Acquisition module 301, is suitable to obtain multiple operations to be scheduled.The major function of job scheduling is that can auditing system meet the resource requirement of user job according to the information in job control block, chooses some operation and calls in internal memory, and create the resource of process, distribution necessity for them from the pool queue of external memory.Generally, job storage to be scheduled is in pool queue, and acquisition module 301 can obtain these operations to be scheduled from pool queue, and obtains the relevant information of operation.The relevant information of operation comprises but is not limited only to: job size and waiting time.The device that the embodiment of the present invention provides is preferably applied to the scheduling scenario of mixed size operation, namely operation to be scheduled had both comprised job size at least one operation more than the first predetermined threshold value, comprise again job size at least one operation less than the second predetermined threshold value, and big operation and little operation all have certain quantity.
Adjusting module 302, is suitable in scheduling process, according to the job size of each operation and waiting time, dynamically adjusts the dispatch weight of each operation;In order to alleviate the situation that little operation is blocked by big operation, making little operation have bigger weight, the more little dispatch weight of job size is more big;But simultaneously in order to avoid big operation is died of hunger by a large amount of little operations, can adjusting the dispatch weight of operation with the waiting time, the waiting time, more big dispatch weight was more big.Therefore, the adjustable strategies that adjusting module 302 of the present invention adopts is: job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big.
In actual scheduling process, the waiting time of each operation is dynamically change.In the embodiment of the present invention, the waiting time of operation may be defined as: from being submitted to the current waiting time;Or, obtained resource to the current waiting time from last time.Operation is referred to from original submission beginning with regard to the calculating time from being submitted to the current waiting time, until current time.Obtained resource from last time to refer to operation to the current waiting time and obtain resource from upper sub-distribution and start the clock, until current time.Select and can avoid obtaining resource every time and all will make zero the waiting time from being submitted to the current waiting time, the resource dispersion caused and the hungry problem of big operation.
Job size may be defined as: job size during original submission, or, the job size of current residual.Job size during original submission is fixed value, and the job size of current residual constantly can diminish along with Job execution.If selecting the job size of current residual, operation once execution, then has an opportunity to continue preempting resources until be finished, it is to avoid resource is too disperseed, it is also possible to avoid the dispatch weight hungry problem caused on the low side all the time of big operation.
Adjusting module 302 farther includes: the first map unit 3021, the second map unit 3022 and adjustment unit 3023.
First map unit 3021, is suitable to the size interval range belonging to job size, job size is mapped as the job size mapping value that size interval range is corresponding, referring to table 1.
Second map unit 3022, is suitable to the time interval scope belonging to the waiting time, is mapped as the waiting time mapping value that time interval scope is corresponding, referring to table 2 waiting time.
Adjustment unit 3023, is suitable to the job size mapping value according to each operation and waiting time mapping value, dynamically adjusts the dispatch weight of each operation.Further, adjustment unit 3023 is suitable to: calculates the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtains the dispatch weight of each operation, referring to table 3.
Scheduler module 303, is suitable to, according to dispatch weight, operation is carried out dynamic dispatching.After the dispatch weight adjustment of each operation, according to the dispatch weight after adjusting, operation is carried out dynamic dispatching.If the dispatch weight of operation is big, then the chance of its preempting resources is bigger;If the dispatch weight of operation is little, then the chance of its preempting resources is less.The resource distribution of each operation is dynamically adjusted by dynamically adjusting dispatch weight.
Adjusting module 302 is further adapted for: in scheduling process, if job size more than waiting time of the operation of the first predetermined threshold value more than the 3rd predetermined threshold value, improve the dispatch weight of this operation, referring to table 4.
According to the dynamic scheduler that the present embodiment provides, in scheduling process, job size according to each operation and waiting time dynamically adjust the dispatch weight of each operation, then according to this dispatch weight, each operation are carried out dynamic dispatching.Compared with prior art, although response operation number and average operating lag are relative to Fair algorithm inferior position to some extent, but there is bigger improvement the average turnaround time relative to FIFO algorithm and Fair algorithm, the problem solving the big operation obstruction that FIFO algorithm exists, also can solve the scattered problem of resource that Fair algorithm exists, improve dispatching efficiency.
Not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant in algorithm and the display of this offer.Various general-purpose systems can also with use based on together with this teaching.As described above, the structure constructed required by this kind of system is apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to utilize various programming language to realize the content of invention described herein, and the description above language-specific done is the preferred forms in order to disclose the present invention.
In description mentioned herein, describe a large amount of detail.It is to be appreciated, however, that embodiments of the invention can be put into practice when not having these details.In some instances, known method, structure and technology it are not shown specifically, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify that the disclosure helping understands in each inventive aspect, herein above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes.But, the method for the disclosure should be construed to and reflect an intention that namely the present invention for required protection requires feature more more than the feature being expressly recited in each claim.More precisely, as the following claims reflect, inventive aspect is in that all features less than single embodiment disclosed above.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, wherein each claim itself as the independent embodiment of the present invention.
Those skilled in the art are appreciated that, it is possible to carry out the module in the equipment in embodiment adaptively changing and they being arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit excludes each other, it is possible to adopt any combination that all processes or the unit of all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment are combined.Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing purpose identical, equivalent or similar.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in dynamic scheduler according to embodiments of the present invention.The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store on a computer-readable medium, or can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not exclude the presence of the element or step not arranged in the claims.Word "a" or "an" before being positioned at element does not exclude the presence of multiple such element.The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer.In the unit claim listing some devices, several in these devices can be through same hardware branch and specifically embody.Word first, second and third use do not indicate that any order.Can be title by these word explanations.
The invention discloses:
A1, a kind of dynamic dispatching method, comprising:
Obtain multiple operation to be scheduled;
In scheduling process, according to the job size of each operation and waiting time, dynamically adjust the dispatch weight of each operation;Wherein, job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big;
According to described dispatch weight, described operation is carried out dynamic dispatching.
A2, dynamic dispatching method according to A1, wherein, the described job size according to each operation and waiting time, the dispatch weight dynamically adjusting each operation farther includes:
Size interval range belonging to job size, is mapped as the job size mapping value that described size interval range is corresponding by job size;
Time interval scope belonging to the waiting time, is mapped as the waiting time mapping value that described time interval scope is corresponding by the waiting time;
Job size mapping value according to each operation and waiting time mapping value, dynamically adjust the dispatch weight of each operation.
A3, dynamic dispatching method according to A2, wherein, the described job size mapping value according to each operation and waiting time mapping value, the dispatch weight dynamically adjusting each operation farther includes:
Calculate the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtain the dispatch weight of each operation.
A4, dynamic dispatching method according to any one of A1-A3, wherein, the job size of operation particularly as follows: job size during original submission, or, the job size of current residual.
A5, dynamic dispatching method according to any one of A1-A3, wherein, waiting time of operation particularly as follows: from being submitted to the current waiting time, or, obtained resource to the current waiting time from last time.
A6, dynamic dispatching method according to any one of A1-A5, wherein, the plurality of operation to be scheduled comprises job size more than at least one operation less than the second predetermined threshold value of at least one operation of the first predetermined threshold value and job size.
A7, dynamic dispatching method according to A6, wherein, also include: in scheduling process, if job size more than waiting time of the operation of the first predetermined threshold value more than the 3rd predetermined threshold value, improve the dispatch weight of this operation.
B8, a kind of dynamic scheduler, comprising:
Acquisition module, is suitable to obtain multiple operations to be scheduled;
Adjusting module, is suitable in scheduling process, according to the job size of each operation and waiting time, dynamically adjusts the dispatch weight of each operation;Wherein, job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big;
Scheduler module, is suitable to, according to described dispatch weight, described operation is carried out dynamic dispatching.
B9, dynamic scheduler according to B8, wherein, described adjusting module farther includes:
First map unit, is suitable to the size interval range belonging to job size, and job size is mapped as the job size mapping value that described size interval range is corresponding;
Second map unit, is suitable to the time interval scope belonging to the waiting time, and the waiting time is mapped as the waiting time mapping value that described time interval scope is corresponding;
Adjustment unit, is suitable to the job size mapping value according to each operation and waiting time mapping value, dynamically adjusts the dispatch weight of each operation.
B10, dynamic scheduler according to B9, wherein, described adjustment unit is further adapted for: calculates the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtains the dispatch weight of each operation.
B11, dynamic scheduler according to any one of B8-B10, wherein, the job size of operation particularly as follows: job size during original submission, or, the job size of current residual.
B12, dynamic scheduler according to any one of B8-B10, wherein, waiting time of operation particularly as follows: from being submitted to the current waiting time, or, obtained resource to the current waiting time from last time.
B13, dynamic scheduler according to any one of B8-B12, wherein, the plurality of operation to be scheduled comprises job size more than at least one operation less than the second predetermined threshold value of at least one operation of the first predetermined threshold value and job size.
B14, dynamic scheduler according to B13, wherein, described adjusting module is further adapted for: in scheduling process, if job size more than waiting time of the operation of the first predetermined threshold value more than the 3rd predetermined threshold value, improve the dispatch weight of this operation.
Claims (10)
1. a dynamic dispatching method, comprising:
Obtain multiple operation to be scheduled;
In scheduling process, according to the job size of each operation and waiting time, dynamically adjust the dispatch weight of each operation;Wherein, job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big;
According to described dispatch weight, described operation is carried out dynamic dispatching.
2. dynamic dispatching method according to claim 1, wherein, the described job size according to each operation and waiting time, the dispatch weight dynamically adjusting each operation farther includes:
Size interval range belonging to job size, is mapped as the job size mapping value that described size interval range is corresponding by job size;
Time interval scope belonging to the waiting time, is mapped as the waiting time mapping value that described time interval scope is corresponding by the waiting time;
Job size mapping value according to each operation and waiting time mapping value, dynamically adjust the dispatch weight of each operation.
3. dynamic dispatching method according to claim 2, wherein, the described job size mapping value according to each operation and waiting time mapping value, the dispatch weight dynamically adjusting each operation farther includes:
Calculate the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtain the dispatch weight of each operation.
4. the dynamic dispatching method according to any one of claim 1-3, wherein, the job size of operation particularly as follows: job size during original submission, or, the job size of current residual.
5. the dynamic dispatching method according to any one of claim 1-3, wherein, waiting time of operation particularly as follows: from being submitted to the current waiting time, or, obtained resource to the current waiting time from last time.
6. the dynamic dispatching method according to any one of claim 1-5, wherein, the plurality of operation to be scheduled comprises job size more than at least one operation less than the second predetermined threshold value of at least one operation of the first predetermined threshold value and job size.
7. dynamic dispatching method according to claim 6, wherein, also includes: in scheduling process, if job size more than waiting time of the operation of the first predetermined threshold value more than the 3rd predetermined threshold value, improve the dispatch weight of this operation.
8. a dynamic scheduler, comprising:
Acquisition module, is suitable to obtain multiple operations to be scheduled;
Adjusting module, is suitable in scheduling process, according to the job size of each operation and waiting time, dynamically adjusts the dispatch weight of each operation;Wherein, job size is more big, and the waiting time is more little, and dispatch weight is more little;Job size is more little, and the waiting time is more big, and dispatch weight is more big;
Scheduler module, is suitable to, according to described dispatch weight, described operation is carried out dynamic dispatching.
9. dynamic scheduler according to claim 8, wherein, described adjusting module farther includes:
First map unit, is suitable to the size interval range belonging to job size, and job size is mapped as the job size mapping value that described size interval range is corresponding;
Second map unit, is suitable to the time interval scope belonging to the waiting time, and the waiting time is mapped as the waiting time mapping value that described time interval scope is corresponding;
Adjustment unit, is suitable to the job size mapping value according to each operation and waiting time mapping value, dynamically adjusts the dispatch weight of each operation.
10. dynamic scheduler according to claim 9, wherein, described adjustment unit is further adapted for: calculates the result that the waiting time mapping value of each operation is divided by with job size mapping value, obtains the dispatch weight of each operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610125284.6A CN105808335A (en) | 2016-03-04 | 2016-03-04 | Dynamic scheduling method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610125284.6A CN105808335A (en) | 2016-03-04 | 2016-03-04 | Dynamic scheduling method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105808335A true CN105808335A (en) | 2016-07-27 |
Family
ID=56466698
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610125284.6A Pending CN105808335A (en) | 2016-03-04 | 2016-03-04 | Dynamic scheduling method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105808335A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106709628A (en) * | 2016-11-24 | 2017-05-24 | 广州赛意信息科技股份有限公司 | Production scheduling method and production scheduling system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110035749A1 (en) * | 2009-08-10 | 2011-02-10 | Avaya Inc. | Credit Scheduler for Ordering the Execution of Tasks |
CN102609312A (en) * | 2012-01-10 | 2012-07-25 | 中国科学技术大学苏州研究院 | Method for dispatching shortest-job-first memory requests on basis of fairness consideration |
CN103136056A (en) * | 2013-03-04 | 2013-06-05 | 浪潮电子信息产业股份有限公司 | Cloud computing platform scheduling method |
CN104239154A (en) * | 2014-10-09 | 2014-12-24 | 浪潮(北京)电子信息产业有限公司 | Job scheduling method in Hadoop cluster and job scheduler |
CN105069250A (en) * | 2015-08-24 | 2015-11-18 | 哈尔滨工程大学 | Task priority calculation method based on scheduling granularity |
-
2016
- 2016-03-04 CN CN201610125284.6A patent/CN105808335A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110035749A1 (en) * | 2009-08-10 | 2011-02-10 | Avaya Inc. | Credit Scheduler for Ordering the Execution of Tasks |
CN102609312A (en) * | 2012-01-10 | 2012-07-25 | 中国科学技术大学苏州研究院 | Method for dispatching shortest-job-first memory requests on basis of fairness consideration |
CN103136056A (en) * | 2013-03-04 | 2013-06-05 | 浪潮电子信息产业股份有限公司 | Cloud computing platform scheduling method |
CN104239154A (en) * | 2014-10-09 | 2014-12-24 | 浪潮(北京)电子信息产业有限公司 | Job scheduling method in Hadoop cluster and job scheduler |
CN105069250A (en) * | 2015-08-24 | 2015-11-18 | 哈尔滨工程大学 | Task priority calculation method based on scheduling granularity |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106709628A (en) * | 2016-11-24 | 2017-05-24 | 广州赛意信息科技股份有限公司 | Production scheduling method and production scheduling system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10558498B2 (en) | Method for scheduling data flow task and apparatus | |
US3648253A (en) | Program scheduler for processing systems | |
CN107748696B (en) | Task scheduling method and terminal equipment | |
KR101885211B1 (en) | Method and apparatus for resource allocation of gpu | |
US11093352B2 (en) | Fault management in NVMe systems | |
JP4185103B2 (en) | System and method for scheduling executable programs | |
US20180365055A1 (en) | Container workload scheduler and methods of scheduling container workloads | |
US10216530B2 (en) | Method for mapping between virtual CPU and physical CPU and electronic device | |
US9104482B2 (en) | Differentiated storage QoS | |
CN109086135B (en) | Resource scaling method and device, computer equipment and storage medium | |
CN109408215A (en) | A kind of method for scheduling task and device of calculate node | |
KR20080041047A (en) | Apparatus and method for load balancing in multi core processor system | |
CN103473120A (en) | Acceleration-factor-based multi-core real-time system task partitioning method | |
CN115237586A (en) | GPU resource configuration method for deep learning inference performance interference perception | |
CN112817722A (en) | Time-sharing scheduling method based on priority, terminal and storage medium | |
US11693708B2 (en) | Techniques for increasing the isolation of workloads within a multiprocessor instance | |
CN109542600A (en) | Distributed task dispatching system and method | |
CN113765949A (en) | Resource allocation method and device | |
CN116610422A (en) | Task scheduling method, device and system | |
US11983566B2 (en) | Hardware circuit for deep learning task scheduling | |
CN105808335A (en) | Dynamic scheduling method and device | |
CN115640113A (en) | Multi-plane flexible scheduling method | |
US9128757B2 (en) | Method and lightweight mechanism for mixed-critical applications | |
US11954518B2 (en) | User-defined metered priority queues | |
CN111258729B (en) | Redis-based task allocation method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160727 |