WO2017167025A1 - 一种实现任务调度的方法、装置及计算机存储介质 - Google Patents
一种实现任务调度的方法、装置及计算机存储介质 Download PDFInfo
- Publication number
- WO2017167025A1 WO2017167025A1 PCT/CN2017/076934 CN2017076934W WO2017167025A1 WO 2017167025 A1 WO2017167025 A1 WO 2017167025A1 CN 2017076934 W CN2017076934 W CN 2017076934W WO 2017167025 A1 WO2017167025 A1 WO 2017167025A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- utility
- utility function
- priority
- resource node
- Prior art date
Links
Images
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/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- 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/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
Definitions
- This document relates to, but is not limited to, the field of information processing, and more particularly to a method, device and computer storage medium for implementing task scheduling.
- Cloud computing is an important trend in the development of information technology. It has the advantages of high reliability, processing capacity of large amounts of data, strong scalability, and high resource utilization of equipment. It has become a research hotspot in the field of information processing; cloud computing can meet the next generation data center. For data computing and storage needs, and with strong application services as a support, data centers have already played an important role in cloud computing. For data centers, real-time and reliability are the main considerations, when there are large-scale When a task accesses the system at the same time, the task request of the data center may increase rapidly in a short period of time, which may degrade the quality of the user's service and may cause the data center to be unstable.
- the basic requirement of cloud computing data center task scheduling is to enable the task submitted by the user to achieve optimal scheduling and maximize the throughput of the cloud environment.
- the task scheduling method in the related art is to minimize the task execution time.
- Such as greedy algorithm, A star (A* algorithm), Min-min algorithm, Max-min algorithm and genetic algorithm these task scheduling methods generally only consider the completion time of the task submitted by the user.
- Ignore cloud computing data The other needs of the heart user for different tasks and the load balancing of the system affect the performance of the cloud computing data center.
- Embodiments of the present invention provide a method, a device, and a computer storage medium for implementing task scheduling, which can perform task scheduling in combination with a user's related requirements for different tasks, and improve the performance of the computing task.
- An embodiment of the present invention provides a method for implementing task scheduling, including:
- the traversal calculation calculates the maximum value of the total utility function corresponding to the task, and when the total utility function takes the largest value, the virtual machine to which the task is to be assigned is used as the virtual machine of the operation task.
- the method before the constructing the total utility function corresponding to each task according to at least one of the plurality of functions established in advance, the method further includes:
- the utility function of establishing a corresponding time utility for each task includes:
- the utility function for establishing a corresponding reliability utility of each resource node includes:
- the utility functions for establishing a corresponding security utility for each resource node include:
- All resource nodes are divided into two or more security levels according to a preset level policy; a security level is randomly assigned from the divided two or more security levels for the current resource node;
- the level coefficient is used to distinguish the priority of the task corresponding to each type of data
- the reliability coefficient is a number greater than 0 and less than 1.
- the utility function of the reliability utility constructed includes:
- r a is a random number uniformly distributed in the interval [0, 1].
- the dividing all resource nodes into two or more security levels according to a preset level policy includes:
- the utility function of establishing a security utility proportional to the security level of the current resource node includes:
- the setting the priority of the current task according to the type of data included in the current task includes:
- a level coefficient of the first priority level to be smaller than a level factor of the second priority
- a level coefficient of the second priority is smaller than a level coefficient of the third priority
- the first The rank factor of the priority level, the rank factor of the second priority, and the magnitude of the rank factor of the third priority are used to distinguish the priority level of the task corresponding to each category of data.
- the value of the total utility function of the task when the traversal calculation task is to be allocated to the virtual machine includes:
- each time in combination Select a value for all values of each type of utility function when calculating the total utility function;
- the values of the utility functions of each of the selected ones are respectively accumulated to obtain the value of the total utility function.
- the method before accumulating the value of the selected utility function, the method further includes:
- a utility function for establishing a corresponding time utility for each task included in the total utility function, and/or a utility function for a corresponding reliability utility of each resource node, and/or a corresponding security utility for each resource node
- the utility function, and/or the utility function of the corresponding priority utility for each task respectively sets the corresponding weights according to the preset weighting strategy.
- the method before the determining the traversal to calculate the maximum value of the total utility function corresponding to the task, the method further includes:
- All tasks submitted by the user are sorted according to the order of priority of the tasks, and the total utility function of the tasks is calculated in descending order of task priorities.
- the method further includes:
- the virtual machine that computes the user-submitted task is sorted in ascending order of the size of the MIPS (Million Instructions Per Second).
- the method when the task assigned to the virtual machine does not complete the operation within the running threshold duration, the method further includes:
- the task of the stop operation ranked at the end of the priority level sorting operation is performed.
- the greedy algorithm is used to perform the traversal calculation of the total utility function corresponding to each task.
- the method further includes:
- the operation threshold time is used as the resource estimation unit, and the size of each task submitted by the user is divided by the quotient obtained by the resource estimation unit as the estimated resource required for the task;
- the method further comprises: monitoring port traffic, and/or number of connections of all of the resource nodes, for port traffic, and/or number of connections for each resource node according to a preset policy. Make adjustments.
- An embodiment of the present invention further provides an apparatus for implementing task scheduling, including: a total utility function unit, a traversal calculation unit, and a task allocation unit; wherein
- the total utility function unit is configured to construct a total utility function corresponding to each task according to at least one of a plurality of functions established in advance; wherein the plurality of functions include: a utility function of a time utility corresponding to each task a utility function of the corresponding reliability utility of each resource node, a utility function of the corresponding security utility of each resource node, and a utility function of the corresponding priority utility of each task;
- the traversal calculation unit is configured to: for each task submitted by the user, traverse the value of the total utility function of the task when the calculation task is to be allocated to the virtual machine;
- the task assignment unit is configured to determine, for each task, a maximum value of the total utility function corresponding to the traversal calculation, and use the virtual machine to which the task is to be assigned as the virtual machine of the operation task when the total utility function takes the largest value.
- the total utility function unit is configured to calculate a preset expected running time and task submission of the current task before constructing a total utility function corresponding to each task according to at least one of the plurality of functions established in advance.
- the time difference of time, the time difference obtained by the calculation is taken as the task execution time;
- the utility function of the time utility is determined to be 1 when the task is completed within the task execution time limit; and the determination task is not completed when the task execution time limit is not completed.
- the utility function of the time utility takes a value of 0;
- the total utility function unit is configured to determine the number of tasks assigned to the resource node n T and the virtual node included in the resource node before constructing a total utility function corresponding to each task according to at least one of a plurality of functions established in advance Number of machines n M ; using a preset reliability coefficient as a utility function of the reliability utility as a base, determining the number of tasks assigned to the resource node n T and the number of virtual machines n M included in the resource node as an index parameter, Constructing a utility function of the reliability utility;
- the total utility function unit is configured to divide all resource nodes into two or more security levels according to a preset level policy before constructing a total utility function corresponding to each task according to at least one of a plurality of functions established in advance. Randomly assigning a security level to the current resource node from the divided two or more security levels;
- the total utility function unit is configured to set a priority of the current task according to the type of data included in the current task before constructing a total utility function corresponding to each task according to at least one of the plurality of functions established in advance; a priority level of the current task, setting a corresponding level coefficient for each priority level, and using the set level coefficient as a utility function of the priority utility of the current task;
- the level coefficient is configured to distinguish the priority of the task corresponding to each type of data
- the reliability coefficient is a number greater than 0 and less than 1.
- the traversal calculation unit is configured to
- each time in combination Select a value for all values of each type of utility function when calculating the total utility function;
- the values of the utility functions of each of the selected ones are respectively accumulated to obtain the value of the total utility function.
- the apparatus further includes a setting weight unit configured to accumulate values of each of the selected utility functions,
- a utility function for establishing a corresponding time utility for each task included in the total utility function, and/or a utility function for a corresponding reliability utility of each resource node, and/or a corresponding security utility for each resource node
- the utility function, and/or the utility function of the corresponding priority utility for each task respectively sets the corresponding weights according to the preset weighting strategy.
- the apparatus further includes a task sorting unit configured to determine, before traversing the maximum value of the total utility function corresponding to the task, sorting all the tasks submitted by the user according to the priority level of the task.
- the total utility function of the task is calculated in descending order of task priorities.
- the apparatus further includes a virtual machine sorting unit configured to arrange the virtual machines of the tasks submitted by the user to be in ascending order according to the size of the single-word long-point instruction MIPS.
- the apparatus further includes an operation adjustment unit configured to stop the virtual machine from continuing to calculate the unfinished operation within the running threshold duration when the task assigned to the virtual machine does not complete the operation within the running threshold duration a task, and loading the task of stopping the operation to the end of the priority level sorting; completing the operation of the other tasks of the task other than the stop operation, and then performing the stop operation task at the end of the priority level sorting Perform the operation.
- an operation adjustment unit configured to stop the virtual machine from continuing to calculate the unfinished operation within the running threshold duration when the task assigned to the virtual machine does not complete the operation within the running threshold duration a task, and loading the task of stopping the operation to the end of the priority level sorting; completing the operation of the other tasks of the task other than the stop operation, and then performing the stop operation task at the end of the priority level sorting Perform the operation.
- the apparatus further includes: acquiring the resource unit, configured to use the running threshold duration as the resource estimating unit, and dividing the size of each task submitted by the user by the quotient obtained by the resource estimating unit, as the task corresponding to the task Estimated resource requirements;
- the apparatus further includes a monitoring unit configured to monitor port traffic, and/or number of connections of all of the resource nodes, configured to configure port traffic for each resource node according to a preset policy, and / or the number of connections to adjust.
- a monitoring unit configured to monitor port traffic, and/or number of connections of all of the resource nodes, configured to configure port traffic for each resource node according to a preset policy, and / or the number of connections to adjust.
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing task scheduling according to the embodiment of the invention.
- the technical solution of the embodiment of the present invention includes: constructing a total utility function corresponding to each task according to at least one of a plurality of functions established in advance; wherein the multiple functions include: a utility function of a time utility corresponding to each task The utility function of the corresponding reliability utility of each resource node, the utility function of the corresponding security utility of each resource node, and the utility function of the corresponding priority utility of each task; traversing the calculation task for each task submitted by the user The value of the total utility function of the task when it is to be assigned to the virtual machine; for each task, determine the maximum value of the total utility function corresponding to the traversal calculation, and the virtual task to be assigned when the total utility function takes the largest value.
- the machine acts as a virtual machine for computing tasks.
- the technical solution of the embodiment of the present invention implements task scheduling according to time effects, reliability effects, security effects, etc., and considers user requirements for time, reliability, security, etc., and implements the system. Load balancing improves the performance of computing tasks
- FIG. 1 is a flowchart of a method for implementing task scheduling according to an embodiment of the present invention
- FIG. 2 is a structural block diagram of an apparatus for implementing task scheduling according to an embodiment of the present invention
- FIG. 3 is a flow chart of a method for applying an example of the present invention.
- FIG. 1 is a flowchart of a method for implementing task scheduling according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
- Step 100 Construct a total utility function corresponding to each task according to at least one of a plurality of functions established in advance; wherein, the utility function of the corresponding time utility of each task, and the corresponding reliability utility of each resource node The utility function, the utility function of the corresponding security utility for each resource node, and the utility function of the corresponding priority utility for each task.
- the method further includes: establishing a utility function of a time utility corresponding to each task; and /or,
- the utility function of establishing a corresponding time utility for each task includes:
- the preset expected running time of the current task may be determined by receiving an external command after the user submits the task; the task submission time may be obtained by reading the task log or reading system information, which is a common technique of those skilled in the art. means.
- the utility function for establishing a corresponding reliability utility of each resource node includes:
- a utility function of the reliability utility is constructed as an exponential parameter with the number of virtual machines n M included in the resource node.
- the utility functions for establishing a corresponding security utility for each resource node include:
- a utility function that establishes a security utility of the current resource node proportional to the security level based on the security level randomly assigned to the current resource node.
- the level coefficient is used to distinguish the priority of the task corresponding to each type of data
- the reliability coefficient is a number greater than 0 and less than 1.
- the utility functions of the constructed reliability utility include:
- r a is a random number uniformly distributed in the interval [0, 1].
- the reliability coefficient may be adjusted according to an actual situation, and the reliability coefficient is used to determine whether the resource node is reliable or not.
- the reliability coefficient of the method in the embodiment of the present invention is only an embodiment obtained according to empirical analysis;
- the utility function of the reliability utility can also be adjusted as long as the task number n T of the resource node and the number of virtual machines n M included in the resource node can be expressed for the purpose of calculation of the utility function.
- the dividing all resource nodes into two or more security levels according to a preset level policy includes:
- the utility function of establishing a security utility proportional to the security level of the current resource node includes:
- the method for dividing the four security levels according to the method of the present invention is obtained according to experience, and the security level can be adjusted according to the actual application.
- the setting the priority of the current task according to the type of data included in the current task includes:
- the priority level of the task of the data of the action record type data is the second priority;
- the priority level of the task of setting the data included as the device account and the integrated information type data is the third priority;
- the set priority coefficient of the first priority level is smaller than the level coefficient of the second priority, the level coefficient of the second priority is smaller than the level coefficient of the third priority, and the set level coefficient and the second priority of the first priority level are set.
- the numerical value of the level coefficient of the level and the level coefficient of the third priority are used to distinguish the priority level of the task corresponding to each type of data.
- the priority level division manner of the task is an optional one of the division manners, and may be correspondingly divided according to different definitions of the priority levels.
- Step 101 For each task submitted by the user, traverse the value of the total utility function of the task when the computing task is to be allocated to the virtual machine.
- the value of the total utility function of the task when the traversal calculation task is to be allocated to the virtual machine includes:
- the values of the utility functions of each of the selected ones are respectively accumulated to obtain the value of the total utility function.
- the accumulation includes: adding the values of the utility functions of each of the selected ones.
- the method before accumulating the value of the selected utility function, the method further includes:
- weight values of the utility functions included in the total utility function may be added to a value of 1.
- the setting weight is mainly used to consider the factors referenced in task scheduling.
- the weight of the utility function of time utility is larger than other utility functions; similarly, if the user is reliable If the sexual requirements are high, the weight of the utility function of the reliability utility is larger than that of the other utility functions.
- a greedy algorithm is used to perform traversal calculation of the total utility function corresponding to each task.
- the greedy algorithm is only an optional embodiment of the embodiment of the present invention. If the algorithm is improved, other algorithms can implement fast traversal calculation, and other algorithms can also be applied to the embodiment of the present invention.
- Step 102 For each task, determine a traversal calculation to calculate a maximum value of the total utility function corresponding to the task, and when the total utility function takes the largest value, the virtual machine to which the task is to be assigned is used as the virtual task of the operation task. Planned.
- the method before the determining the traversal to calculate the maximum value of the total utility function corresponding to the task, the method further includes:
- All tasks submitted by the user are sorted according to the priority level of the task, and the total utility function of the task is calculated in descending order of task priority.
- the method of the embodiment of the present invention further includes:
- the virtual machine that computes the task submitted by the user is arranged in ascending order according to the size of the single-word long-point command MIPS.
- the MIPS is sorted in ascending order of the size of the virtual machine.
- the MIPS is a measure of the performance of the virtual machine's central processing unit (CPU). It is used to measure the performance of the virtual machine.
- the virtual machine in the last column has the best performance; when the task is to be assigned to the virtual machine, the quasi-allocation is started from the best-performing virtual machine according to the sorting, and the value of the total utility function of the task is calculated on this basis.
- the method of the embodiment of the present invention further includes:
- the task of the stop operation at the end of the priority level sorting operation is performed.
- the running threshold duration is the length of time required by a general task calculation determined by a technician according to an empirical analysis. If the running threshold duration task is not completed, the task is a long task, and the operation of the task is continued. Will affect the timely completion of follow-up tasks.
- the method of the embodiment of the present invention further includes: using a running threshold duration as a resource estimation unit,
- the size of each task can be determined by the number of virtual central processing units (VCPUs) required by the computing tasks, the size of the memory, and the like.
- VCPUs virtual central processing units
- the method of the embodiment of the present invention further includes: monitoring port traffic, and/or number of connections of all resource nodes, for port traffic, and/or connection to each resource node according to a preset policy. The number is adjusted.
- the port traffic of the resource node and/or the number of connections are adjusted by the resource manager. Therefore, the port traffic and/or the number of connections of the resource node monitored by the method in this embodiment of the present invention can be fed back to the task manager. on.
- the method of the embodiment of the present invention can be implemented by a device for performing task scheduling in the related art, for example, a task manager.
- a device for performing task scheduling for example, a task manager.
- the traversal calculation of the utility function, the assignment of tasks to a virtual machine, etc., by a central processor of the device that performs task scheduling, the related information may be stored in a storage medium.
- the tasks submitted by the user are scheduled according to time effects, reliability effects, security effects, etc., and the requirements of time, reliability, security, etc. are considered, and the load balancing of the system is realized. , improve the performance of the computing task.
- FIG. 2 is a structural block diagram of an apparatus for implementing task scheduling according to an embodiment of the present invention. As shown in FIG. 2, the method includes: a total utility function unit 21, a traversal calculation unit 22, and a task assignment unit 23;
- the total utility function unit 21 is configured to construct a total utility function corresponding to each task according to at least one of a plurality of functions established in advance; wherein the plurality of functions include: a utility of a time utility corresponding to each task a function, and/or a utility function of the corresponding reliability utility of each resource node, and/or a utility function of the corresponding security utility of each resource node, and/or a utility function of the corresponding priority utility of each task;
- the traversal calculation unit 22 is configured to traverse the calculation task for each task submitted by the user The value of the total utility function for this task when it is intended to be assigned to a virtual machine;
- the task assignment unit 23 is configured to determine, for each task, a maximum value of the total utility function corresponding to the traversal calculation, and use the virtual machine to which the task is to be assigned as the virtual machine of the operation task when the total utility function takes the largest value. .
- the total utility function unit 21 is configured to calculate a preset expected running time and task of the current task before constructing a total utility function corresponding to each task according to at least one of a plurality of functions established in advance.
- the time difference of the submission time, the calculated time difference is taken as the task execution time;
- the utility function of the time utility is determined to be 1 when the task is completed within the task execution time limit;
- the utility function of the time utility is determined when the task is not completed within the task execution time limit The value is 0;
- the total utility function unit 21 is configured to determine the number of tasks assigned to the resource node n T and the virtual machine included in the resource node before constructing the total utility function corresponding to each task according to at least one of the plurality of functions established in advance.
- the number n M is determined by using a preset reliability coefficient as a utility function of the reliability utility as a base, and determining the number of tasks assigned to the resource node n T and the number of virtual machines included in the resource node n M as an index parameter, and constructing Utility function for reliability utility;
- the total utility function unit 21 is configured to divide all resource nodes into two or more security according to a preset level policy before constructing a total utility function corresponding to each task according to at least one of a plurality of functions established in advance. Level; randomly assigns a security level from the divided two or more security levels for the current resource node;
- the total utility function unit 21 is configured to set a priority of the current task according to the type of data included in the current task before constructing a total utility function corresponding to each task according to at least one of the plurality of functions established in advance; The priority level of the current task, the corresponding level coefficient of each priority level is set, and the set level coefficient is used as the priority effect of the current task. Utility function used;
- the level coefficient is used to distinguish the priority of the task corresponding to each type of data
- the reliability coefficient is a number greater than 0 and less than 1.
- the traversal calculation unit 22 is configured to
- the values of the utility functions of each of the selected ones are respectively accumulated to obtain the value of the total utility function.
- the apparatus of the embodiment of the present invention further includes a setting weight unit 24 configured to accumulate values of each of the selected utility functions.
- a utility function for establishing a time utility for each task included in the total utility function, and/or a utility function for the corresponding reliability utility of each resource node, and/or a utility function for the corresponding security utility of each resource node And/or the utility function of the corresponding priority utility of each task sets the corresponding weight according to the preset weighting strategy.
- the apparatus of the embodiment of the present invention further includes a task sorting unit 25 configured to determine, according to the priority level of the task, all tasks submitted by the user before determining the maximum value of the total utility function corresponding to the task. The order is sorted, and the total utility function of the task is calculated in descending order of task priority.
- the apparatus of the embodiment of the present invention further includes a virtual machine sorting unit 26 configured to arrange the virtual machines of the tasks submitted by the user in ascending order according to the size of the single-word long-point instruction MIPS.
- the apparatus of the embodiment of the present invention further includes an operation adjustment unit 27 configured to stop the virtual machine from continuing to operate the operation threshold for an unfinished operation time when the task assigned to the virtual machine does not complete the operation within the operation threshold duration.
- the task loads the task that stops the operation to the end of the priority level sorting; after completing the operations of the other tasks of the task that stops the operation, the task of the stop operation at the end of the priority level sorting operation is performed.
- the apparatus of the embodiment of the present invention further includes an acquiring resource unit 28 configured to use the running threshold duration as a resource estimating unit, and divide the size of each task submitted by the user by the quotient obtained by the resource estimating unit.
- the estimated resource required for the task is accumulated; the estimated required resources corresponding to all the tasks submitted by the user are accumulated, and the computer resources required for creating the virtual machine submitted by the computing user are obtained.
- the apparatus of the embodiment of the present invention further includes a monitoring unit 29 configured to monitor port traffic and/or the number of connections of all resource nodes for port traffic of each resource node according to a preset policy. And/or the number of connections to adjust.
- the resource unit 28 and the monitoring unit 29 can be used by a CPU, a digital signal processor (DSP), a micro control unit (MCU) or a programmable gate array in the device. (FPGA, Field-Programmable Gate Array) implementation.
- FIG. 3 is a flowchart of a method for applying an example of the present invention, as shown in FIG. 3, including:
- Step 300 Generate a task queue according to the task submitted by the user.
- Step 301 Determine a computer resource required for computing a virtual machine that the user submits the task.
- the operation threshold time is used as the resource estimation unit, and the size of each task submitted by the user is divided by the quotient obtained by the resource estimation unit as the estimated resource required for the task; the estimated resource corresponding to all tasks is estimated. Perform the accumulation to get the computer resources needed to create a virtual machine that computes the user's submitted tasks.
- the size of the task can be determined by computer hardware resources such as the number of VCPUs and memory size required for the computing task;
- the computer resource Y required to calculate the virtual machine submitted by the user to the task can be calculated by the following formula:
- Q i represents the size of the i-th task
- n T is the number of tasks submitted by the user.
- Step 302 Create a virtual machine according to the determined computer resource required by the computing user to submit the virtual machine of the task.
- creating a virtual machine is a common technical means for those skilled in the art.
- Step 303 The virtual machine that computes the task submitted by the user is arranged in ascending order according to the size of the single-word long-point command MIPS.
- Step 304 Sort all tasks submitted by the user according to the order of priority of the tasks.
- Step 305 Calculate the total utility function of the task according to the order of priority of the task from high to low.
- the total utility function of the computing task needs to allocate the task to the virtual machine, and determine the utility function and task allocation of the reliability utility of the resource node where the virtual machine to which the task is to be assigned through the virtual machine to be allocated.
- the value of the total utility function of the task when the traversal computing task is to be allocated to the virtual machine includes:
- the values of the utility functions of each of the selected ones are respectively accumulated to obtain the value of the total utility function.
- the accumulation includes: adding the values of the utility functions of each of the selected ones.
- Each utility function included in the total utility function takes the calculated value once each time, and traverses in a combined manner, and all the values that the total utility function may obtain.
- Step 306 For each task, determine a traversal calculation to calculate a maximum value of the total utility function corresponding to the task, and use the virtual machine to which the task is to be assigned as the virtual machine of the operation task when the total utility function takes the largest value.
- Step 307 When the task assigned to the virtual machine does not complete the operation within the running threshold duration, stop the virtual machine to continue the operation of the task that does not complete the operation within the running threshold duration, and load the task that stops the operation to the end of the priority level sorting.
- Step 308 After completing the operation of the other tasks of the task that stops the operation, the task of stopping the operation at the end of the priority level sorting operation is performed.
- Step 309 When the operation of the task submitted by the user is completed, the virtual machine is released.
- the application example further includes: monitoring port traffic, and/or number of connections of all resource nodes, for port traffic of each resource node according to a preset policy, And / or the number of connections to adjust.
- the port traffic of the resource node and/or the number of connections are adjusted by the resource manager. Therefore, the port traffic and/or the number of connections of the resource node monitored by the method in this embodiment of the present invention can be fed back to the task manager. on.
- the disclosed method and apparatus may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the modules is only a logical function division.
- there may be another division manner for example, multiple modules or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
- the communication connections between the various components shown or discussed may be indirect coupling or communication connections through some interfaces, devices or modules, and may be electrical, mechanical or otherwise.
- the modules described above as separate components may or may not be physically separated.
- the components displayed as modules may or may not be physical modules, that is, may be located in one place or distributed to multiple network modules; Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may be separately used as one module, or two or more modules may be integrated into one module;
- the module can be implemented in the form of hardware or in the form of hardware plus software function modules.
- the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a removable storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and the like, which can store program codes.
- ROM read-only memory
- the above integrated module of the embodiment of the present invention is implemented in the form of a software function module. And when sold or used as a stand-alone product, it can also be stored on a computer readable storage medium.
- the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
- a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a magnetic disk, or an optical disk.
- the technical solution of the embodiment of the present invention performs task scheduling according to the time effect, the reliability effect, the security effect, and the like, and considers the user's requirements on time, reliability, security, etc., and realizes the load of the system. Equilibrium improves the performance of computing tasks.
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
本发明实施例公开了一种实现任务调度的方法、装置及计算机存储介质,所述方法包括:根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述多个函数包括:每一任务相应的时间效用的效用函数、和/或优先级效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数;对每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值;确定遍历计算每一任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
Description
本文涉及但不限于信息处理领域,尤指一种实现任务调度的方法、装置及计算机存储介质。
目前,数据中心面临着越来越多的问题和瓶颈,例如硬件水平普遍很高,但是资源利用率相对较低;各个省网公司与直属单位分别按照自身需求与特点来建设自己的数据中心,业务***差异性较大;部署的应用相对分散,数据安全与集群***管理维护困难;电力、制冷、网络、机房空间等需求不断扩大,这些问题影响这里数据中心的和谐和绿色发展,也无法满足未来海量数据的处理。
云计算是信息技术发展的重要趋势,具有可靠性高、海量数据的处理能力、扩展性强以及设备的资源利用率高等优点,已经成为信息处理领域的研究热点;云计算可以满足下一代数据中心对数据计算与存储的需求,并有强大的应用服务作为支持,数据中心在云计算中已经占有重要地位,对数据中心来说,实时性和可靠性是主要考虑的因素,当有大规模的任务同时访问***时,可能在很短的时间内,数据中心的任务请求就会快速增长,使得用户的服务质量降低,并可能导致数据中心不稳定。
云计算数据中心任务调度的基本要求是使用户提交的任务能够实现最优的调度,并最大限度的提高云环境的吞吐量;相关技术中的任务调度方法是以最小化任务执行时间为目的,如贪心算法、A星(A*算法)、最小-最小(Min-min)算法、最大-最小(Max-min)算法和遗传算法等,这些任务调度方法一般只考虑用户提交的任务的完成时间,忽略了云计算数据中
心用户对不同任务的其他需求以及***的负载均衡,影响了云计算数据中心的工作性能。
发明内容
本发明实施例提供一种实现任务调度的方法、装置及计算机存储介质,能够结合用户对不同任务的相关需求进行任务调度,提升运算任务的工作性能。
本发明实施例提供了一种实现任务调度的方法,包括:
根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,每一任务相应的时间效用的效用函数、每一资源节点相应的可靠性效用的效用函数、每一资源节点相应的安全性效用的效用函数、每一任务相应的优先级效用的效用函数;
对用户提交的每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值;
对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
在一实施例中,所述根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,所述方法还包括:
建立每一任务相应的时间效用的效用函数;
和/或,建立每一资源节点相应的可靠性效用的效用函数;
和/或,建立每一资源节点相应的安全性效用的效用函数;
和/或,建立每一任务相应的优先级效用的效用函数;
所述建立每一任务相应的时间效用的效用函数,包括:
计算当前任务的预设期望运行时间与任务提交时间的时间差,将计算获得的时间差作为任务执行期限;确定任务在所述任务执行期限内完成时所述时间效用的效用函数取值为1;确定任务在所述任务执行期限内未完成
时所述时间效用的效用函数取值为0;
所述建立每一资源节点相应的可靠性效用的效用函数包括:
确定分配到资源节点的任务数nT和所述资源节点包含的虚拟机数nM;以预先设置的可靠性系数作为可靠性效用的效用函数作为底数,以确定的分配到资源节点的任务数nT与资源节点包含的虚拟机数nM的上作为指数参数,构建所述可靠性效用的效用函数;
所述建立每一资源节点相应的安全性效用的效用函数包括:
按照预设等级策略划分所有资源节点为两个或两个以上安全等级;为当前资源节点从划分的两个或两个以上安全等级中随机分配一个安全等级;
根据为当前资源节点随机分配的安全等级建立当前资源节点的与安全等级成正比的安全性效用的效用函数;
所述建立每一任务相应的优先级效用的效用函数包括:
根据当前任务包含的数据种类设定当前任务的优先级;根据设定的当前任务的优先级等级,设置每一优先级等级相应的等级系数,以设置的等级系数作为当前任务的所述优先级效用的效用函数;
所述等级系数用于区分每一种类数据对应的任务的优先级;
所述可靠性系数为大于0而小于1的数。
在一实施例中,所述可靠性系数为ri=0.9+0.1ra;
其中,ra为均匀分布在[0,1]区间的随机数。
在一实施例中,所述按照预设等级策略划分所有资源节点为两个或两个以上安全等级包括:
将资源节点按照预设等级策略划分安全等级为si={1,2,3,4}的四个
安全等级;
所述建立当前资源节点的与安全等级成正比的安全性效用的效用函数包括:
为当前资源节点随机分配所述四个安全等级中的一个安全等级si;根据随机分配的当前资源节点的安全等级建立与安全等级成正比的安全性效用的效用函数包括:Ui(si)=0.25si。
在一实施例中,所述根据当前任务包含的数据种类设定当前任务的优先级包括:
将任务包含的数据划分为时间采用类数据、动作记录类数据和设备台账及综合信息类数据;设置包含的数据为时间采用类数据的任务的优先级等级为第一优先级;设置包含的数据为动作记录类数据的任务的优先级等级为第二优先级;设置包含的数据为设备台账及综合信息类数据的任务的优先级等级为第三优先级;
设置的所述第一优先级等级的等级系数小于所述第二优先级的等级系数,所述第二优先级的等级系数小于所述第三优先级的等级系数,且设置的所述第一优先级等级的等级系数、所述第二优先级的等级系数、和所述第三优先级的等级系数的数值大小用于区分每一种类数据对应的任务的优先级等级高低。
在一实施例中,所述遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值包括:
对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;
对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计
算总效用函数时选择每一种类的效用函数的所有取值的一个取值;
对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函数的取值进行累加,获得总效用函数的取值。
在一实施例中,对选择的效用函数的取值进行累加之前,该方法还包括:
为所述建立总效用函数中包含的每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数按照预设权重策略分别设置相应的权重。
在一实施例中,所述确定遍历计算该任务对应的总效用函数的最大取值之前,所述方法还包括:
将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序,按照任务优先级由高到低的顺序计算任务的所述总效用函数。
在一实施例中,该方法还包括:
将运算用户提交的任务的虚拟机按照单字长定点指令平均执行速度(MIPS,Million Instructions Per Second)的大小升序排列。
在一实施例中,当分配到虚拟机的任务在运行阈值时长内未完成运算时,所述方法还包括:
停止所述虚拟机继续运算所述运行阈值时长内未完成运算的任务,并将停止运算的所述任务加载到优先级等级排序的末端;
完成除停止运算的任务的其他任务的运算后,再对排在所述优先级等级排序末端的所述停止运算的任务进行运算。
在一实施例中,采用贪心算法进行每一任务对应的所述总效用函数的遍历计算。
在一实施例中,所述方法还包括:
以运行阈值时长作为资源预估单位,将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任务对应的预估所需资源;
将用户提交所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
在一实施例中,该方法还包括:对所有所述资源节点的端口流量、和/或连接数进行监测,以用于根据预设策略对每一资源节点的端口流量、和/或连接数进行调整。
本发明实施例还提供一种实现任务调度的装置,包括:总效用函数单元、遍历计算单元和任务分配单元;其中,
所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述多个函数包括:每一任务相应的时间效用的效用函数、每一资源节点相应的可靠性效用的效用函数、每一资源节点相应的安全性效用的效用函数、每一任务相应的优先级效用的效用函数;
所述遍历计算单元配置为,对用户提交的每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值;
所述任务分配单元配置为,对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
在一实施例中,所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,计算当前任务的预设期望运行时间与任务提交时间的时间差,将计算获得的时间差作为任务执行期限;确定任务在所述任务执行期限内完成时所述时间效用的效用函数取值为1;确定任务在所述任务执行期限内未完成时所述时间效用的效用函数取值为0;
所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,确定分配到资源节点的任务数nT和所述资源节点包含的虚拟机数nM;以预先设置的可靠性系数作为可靠性效用的效用函数作为底数,以确定的分配到资源节点的任务数nT与资源节点包含的虚拟机数nM的上作为指数参数,构建所述可靠性效用的效用函数;
所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,按照预设等级策略划分所有资源节点为两个或两个以上安全等级;为当前资源节点从划分的两个或两个以上安全等级中随机分配一个安全等级;
根据为当前资源节点随机分配的安全等级建立当前资源节点的与安全等级成正比的安全性效用的效用函数;
所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,根据当前任务包含的数据种类设定当前任务的优先级;根据设定的当前任务的优先级等级,设置每一优先级等级相应的等级系数,以设置的等级系数作为当前任务的所述优先级效用的效用函数;
所述等级系数配置为区分每一种类数据对应的任务的优先级;
所述可靠性系数为大于0而小于1的数。
在一实施例中,所述遍历计算单元配置为,
对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;
对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计
算总效用函数时选择每一种类的效用函数的所有取值的一个取值;
对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函数的取值进行累加,获得总效用函数的取值。
在一实施例中,该装置还包括设置权重单元,配置为对选择的每一效用函数的取值进行累加之前,
为所述建立总效用函数中包含的每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数按照预设权重策略分别设置相应的权重。
在一实施例中,该装置还包括任务排序单元,配置为确定遍历计算该任务对应的总效用函数的最大取值之前,将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序,按照任务优先级由高到低的顺序计算任务的所述总效用函数。
在一实施例中,该装置还包括虚拟机排序单元,配置为将运算用户提交的任务的虚拟机按照单字长定点指令MIPS的大小升序排列。
在一实施例中,该装置还包括运算调整单元,配置为当分配到虚拟机的任务在运行阈值时长内未完成运算时,停止所述虚拟机继续运算所述运行阈值时长内未完成运算的任务,并将停止运算的所述任务加载到优先级等级排序的末端;完成除停止运算的任务的其他任务的运算后,再对排在所述优先级等级排序末端的所述停止运算的任务进行运算。
在一实施例中,该装置还包括获取资源单元,配置为以运行阈值时长作为资源预估单位,将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任务对应的预估所需资源;
将用户提交所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
在一实施例中,该装置还包括监测单元,配置为对所有所述资源节点的端口流量、和/或连接数进行监测,以配置为根据预设策略对每一资源节点的端口流量、和/或连接数进行调整。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的实现任务调度的方法。
本发明实施例的技术方案包括:根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述多个函数包括:每一任务相应的时间效用的效用函数、每一资源节点相应的可靠性效用的效用函数、每一资源节点相应的安全性效用的效用函数、每一任务相应的优先级效用的效用函数;对用户提交的每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值;对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。本发明实施例的技术方案,通过对用户提交的任务根据时间效应、可靠性效应、安全性效应等进行任务调度,考虑了用户对时间、可靠性、安全性等方面的需求,实现了***的负载均衡,提升了运算任务的工作性能。
图1本发明实施例实现任务调度的方法的流程图;
图2本发明实施例实现任务调度的装置的结构框图;
图3为本发明应用示例的方法流程图。
为使本发明实施例的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情
况下,本申请中的实施例及实施例中的特征可以相互任意组合。
图1本发明实施例实现任务调度的方法的流程图,如图1所示,所述方法包括:
步骤100、根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述每一任务相应的时间效用的效用函数、每一资源节点相应的可靠性效用的效用函数、每一资源节点相应的安全性效用的效用函数、每一任务相应的优先级效用的效用函数。
作为一种实施方式,所述根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,所述方法还包括:建立每一任务相应的时间效用的效用函数;和/或,
所述建立每一任务相应的时间效用的效用函数,包括:
计算当前任务的预设期望运行时间与任务提交时间的时间差,将计算获得的时间差作为任务执行期限;确定任务在任务执行期限内完成时时间效用的效用函数取值为1;确定任务在任务执行期限内未完成时时间效用的效用函数取值为0。
需要说明的是,当前任务的预设期望运行时间可以在用户提交任务后,通过接收外部指令确定;任务提交时间可以通过读取任务日志或读取***信息获得,属于本领域技术人员的惯用技术手段。
所述建立每一资源节点相应的可靠性效用的效用函数包括:
确定分配到资源节点的任务数nT和资源节点包含的虚拟机数nM;以预先设置的可靠性系数作为可靠性效用的效用函数作为底数,以确定的分配到资源节点的任务数nT与资源节点包含的虚拟机数nM的上作为指数参数,构建可靠性效用的效用函数。
所述建立每一资源节点相应的安全性效用的效用函数包括:
按照预设等级策略划分所有资源节点为两个或两个以上安全等级;为
当前资源节点从划分的两个或两个以上安全等级中随机分配一个安全等级;
根据为当前资源节点随机分配的安全等级建立当前资源节点的与安全等级成正比的安全性效用的效用函数。
所述建立每一任务相应的优先级效用的效用函数包括:
根据当前任务包含的数据种类设定当前任务的优先级;根据设定的当前任务的优先级等级,设置每一优先级等级相应的等级系数,以设置的等级系数作为当前任务的优先级效用的效用函数;
所述等级系数用于区分每一种类数据对应的任务的优先级;
所述可靠性系数为大于0而小于1的数。
作为一种实施方式,所述可靠性系数为ri=0.9+0.1ra;
其中,ra为均匀分布在[0,1]区间的随机数。
需要说明的是,所述可靠性系数可以根据实际情况进行调整,可靠性系数用于为资源节点赋值是否可靠的概率信息,本发明实施例方法可靠性系数只是根据经验分析获得的一个实施例;另外,可靠性效用的效用函数也可以进行调整,只要可以表示出资源节点的任务数nT和资源节点包含的虚拟机数nM对效用函数的计算目的即可。
作为一种实施方式,所述按照预设等级策略划分所有资源节点为两个或两个以上安全等级包括:
将资源节点按照预设等级策略划分安全等级为si={1,2,3,4}的四个安全等级;
所述建立当前资源节点的与安全等级成正比的安全性效用的效用函数包括:
为当前资源节点随机分配所述四个安全等级中的一个安全等级si;根据随机分配的当前资源节点的安全等级建立与安全等级成正比的安全性效用的效用函数包括:Ui(si)=0.25si。
需要说明的是,本发明实施例方法划分4个安全等级是根据经验获得,根据实际应用中对安全等级的划分可以进行调整。
作为一种实施方式,所述根据当前任务包含的数据种类设定当前任务的优先级包括:
将任务包含的数据划分为时间采用类数据、动作记录类数据、和设备台账及综合信息类数据;设置包含的数据为时间采用类数据的任务的优先级等级为第一优先级;设置包含的数据为动作记录类数据的任务的优先级等级为第二优先级;设置包含的数据为设备台账及综合信息类数据的任务的优先级等级为第三优先级;
设置的第一优先级等级的等级系数小于第二优先级的等级系数,第二优先级的等级系数小于第三优先级的等级系数,且设置的第一优先级等级的等级系数、第二优先级的等级系数和第三优先级的等级系数的数值大小用于区分每一种类数据对应的任务的优先级等级高低。
需要说明的是,本发明实施例方法,任务的优先级等级划分方式为可选的一种划分方式,可以根据对优先级等级的不同定义进行相应的划分。
步骤101、对用户提交的每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值。
作为一种实施方式,本发明实施例方法,所述遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值包括:
对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效
用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;
对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计算总效用函数时选择每一种类的效用函数的所有取值的一个取值;
对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函数的取值进行累加,获得总效用函数的取值。
需要说明的是,这里的累加包括:对每一次选择的每一的效用函数的取值进行相加。
作为一种实施方式,对选择的效用函数的取值进行累加之前,该方法还包括:
为建立总效用函数中包含的每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数按照预设权重策略分别设置相应的权重;
这里,总效用函数中包含的效用函数的权重值相加可以设定值为1。
需要说明的是,设置权重主要用于进行任务调度时参考的因素进行考虑,理论上用户注重时间效用时,时间效用的效用函数的权重相对于其他效用函数较大;相似的,如果用户对可靠性要求高,则可靠性效用的效用函数的权重相对于其他效用函数较大。
作为一种实施方式,采用贪心算法进行每一任务对应的总效用函数的遍历计算。
需要说明的是,贪心算法只是本发明实施例的一个可选实施例,如果经过算法改进,其他算法可以实现快速遍历计算,则其他算法也可以应用到本发明实施例中。
步骤102、对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚
拟机。
作为一种实施方式,所述确定遍历计算该任务对应的总效用函数的最大取值之前,所述方法还包括:
将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序,按照任务优先级由高到低的顺序计算任务的总效用函数。
作为一种实施方式,本发明实施例方法还包括:
将运算用户提交的任务的虚拟机按照单字长定点指令MIPS的大小升序排列。
需要说明的是,对虚拟机按照的MIPS的大小升序排列,MIPS是衡量虚拟机的中央处理器(CPU,Central Processing Unit)性能的一个指标,用于衡量虚机性能,按MIPS升序排列后,最后一列的虚机性能最好;拟分配任务到虚拟机时,根据排序从性能最好的虚拟机开始进行拟分配,在此基础上计算任务的总效用函数的取值。
作为一种实施方式,当分配到虚拟机的任务在运行阈值时长内未完成运算时,本发明实施例方法还包括:
停止虚拟机继续运算运行阈值时长内未完成运算的任务,并将停止运算的任务加载到优先级等级排序的末端;
完成除停止运算的任务的其他任务的运算后,再对排在优先级等级排序末端的停止运算的任务进行运算。
需要说明的是,运行阈值时长为本领域技术人员根据经验分析确定的一般任务运算需要的时长,如果运行阈值时长任务未完成运算,则说明该任务是较长的任务,继续进行该任务的运算会影响后续任务的及时完成。
作为一种实施方式,本发明实施例方法还包括:以运行阈值时长作为资源预估单位,
将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任
务对应的预估所需资源;
将所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
需要说明的是,每一任务的大小可以通过运算任务需要的虚拟中央处理器(VCPU,Virtual Central Processing Unit)个数、内存大小等进行确定。
作为一种实施方式,本发明实施例方法还包括:对所有资源节点的端口流量、和/或连接数进行监测,以用于根据预设策略对每一资源节点的端口流量、和/或连接数进行调整。
需要说明的是,资源节点的端口流量、和/或连接数通过资源管理器进行调整,因此,本发明实施例方法监测到的资源节点的端口流量、和/或连接数可以反馈到任务管理器上。
本发明实施例方法可以通过相关技术中进行任务调度的装置实施,例如、任务管理器。效用函数的遍历计算、将任务分配到虚拟机等可以通过进行任务调度的装置的中央处理器,相关信息可以存储在存储介质当中。
本发明实施例方法,通过对用户提交的任务根据时间效应、可靠性效应、安全性效应等进行任务调度,考虑了用户对时间、可靠性、安全性等方面的需求,实现了***的负载均衡,提升了运算任务的工作性能。
图2本发明实施例实现任务调度的装置的结构框图,如图2所示,包括:总效用函数单元21、遍历计算单元22和任务分配单元23;其中,
所述总效用函数单元21配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述多个函数包括:每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数;
所述遍历计算单元22配置为,对用户提交的每一任务,遍历计算任务
拟分配到虚拟机时该任务的总效用函数的取值;
所述任务分配单元23配置为,对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
作为一种实施方式,所述总效用函数单元21配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,计算当前任务的预设期望运行时间与任务提交时间的时间差,将计算获得的时间差作为任务执行期限;确定任务在任务执行期限内完成时时间效用的效用函数取值为1;确定任务在任务执行期限内未完成时时间效用的效用函数取值为0;
所述总效用函数单元21配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,确定分配到资源节点的任务数nT和资源节点包含的虚拟机数nM;以预先设置的可靠性系数作为可靠性效用的效用函数作为底数,以确定的分配到资源节点的任务数nT与资源节点包含的虚拟机数nM的上作为指数参数,构建可靠性效用的效用函数;
所述总效用函数单元21配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,按照预设等级策略划分所有资源节点为两个或两个以上安全等级;为当前资源节点从划分的两个或两个以上安全等级中随机分配一个安全等级;
根据为当前资源节点随机分配的安全等级建立当前资源节点的与安全等级成正比的安全性效用的效用函数;
所述总效用函数单元21配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,根据当前任务包含的数据种类设定当前任务的优先级;根据设定的当前任务的优先级等级,设置每一优先级等级相应的等级系数,以设置的等级系数作为当前任务的优先级效
用的效用函数;
所述等级系数用于区分每一种类数据对应的任务的优先级;
所述可靠性系数为大于0而小于1的数。
作为一种实施方式,所述遍历计算单元22配置为,
对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;
对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计算总效用函数时选择每一种类的效用函数的所有取值的一个取值;
对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函数的取值进行累加,获得总效用函数的取值。
作为一种实施方式,本发明实施例装置还包括设置权重单元24,配置为对选择的每一效用函数的取值进行累加之前,
为建立总效用函数中包含的每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数按照预设权重策略分别设置相应的权重。
作为一种实施方式,本发明实施例装置还包括任务排序单元25,配置为确定遍历计算该任务对应的总效用函数的最大取值之前,将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序,按照任务优先级由高到低的顺序计算任务的总效用函数。
作为一种实施方式,本发明实施例装置还包括虚拟机排序单元26,配置为将运算用户提交的任务的虚拟机按照单字长定点指令MIPS的大小升序排列。
作为一种实施方式,本发明实施例装置还包括运算调整单元27,配置为当分配到虚拟机的任务在运行阈值时长内未完成运算时,停止虚拟机继续运算运行阈值时长内未完成运算的任务,并将停止运算的任务加载到优先级等级排序的末端;完成除停止运算的任务的其他任务的运算后,再对排在优先级等级排序末端的停止运算的任务进行运算。
作为一种实施方式,本发明实施例装置还包括获取资源单元28,配置为以运行阈值时长作为资源预估单位,将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任务对应的预估所需资源;将用户提交所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
作为一种实施方式,本发明实施例装置还包括监测单元29,配置为对所有资源节点的端口流量、和/或连接数进行监测,以用于根据预设策略对每一资源节点的端口流量、和/或连接数进行调整。
本发明实施例中,所述实现任务调度的装置中的总效用函数单元21、遍历计算单元22、任务分配单元23、设置权重单元24、任务排序单元25、虚拟机排序单元26、运算调整单元27、获取资源单元28和监测单元29,在实际应用中均可由所述装置中的CPU、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现。
以下通过应用示例对本发明方法进行清楚详细的说明,应用示例仅用于陈述本发明实施例,并不用于限定本发明的保护范围。
应用示例
图3本发明应用示例的方法流程图,如图3所示,包括:
步骤300、根据用户提交的任务,生成任务队列。
步骤301、确定运算用户提交任务的虚拟机所需的计算机资源。
本应用示例包括:
以运行阈值时长作为资源预估单位,将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任务对应的预估所需资源;将所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
需要说明的是,任务的大小可以通过运算任务需要的VCPU个数、内存大小等计算机硬件资源进行确定;
作为一种实施方式,运算用户提交任务的虚拟机所需的计算机资源Y可以通过以下公式计算:
步骤302、根据确定的运算用户提交任务的虚拟机所需的计算机资源创建虚拟机。
需要说明的是,创建虚拟机为本领域技术人员的惯用技术手段。
步骤303、将运算用户提交的任务的虚拟机按照单字长定点指令MIPS的大小升序排列。
步骤304、将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序。
步骤305、按照任务优先级由高到低的顺序计算任务的总效用函数。
需要说明的是,计算任务的总效用函数需要将任务拟分配到虚拟机中,通过拟分配的虚拟机确定任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数和任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数。
本步骤中,对用户提交的每一任务,遍历计算任务拟分配到虚拟机时
该任务的总效用函数的取值。
作为一种实施方式,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值包括:
对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;
对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计算总效用函数时选择每一种类的效用函数的所有取值的一个取值;
对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函数的取值进行累加,获得总效用函数的取值。
需要说明的是,这里的累加包括:对每一次选择的每一的效用函数的取值进行相加。总效用函数中包含的每一效用函数每一次分别取一次计算获得的取值,采用组合方式进行遍历,总效用函数可能获得的所有取值。
步骤306、对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
步骤307、当分配到虚拟机的任务在运行阈值时长内未完成运算时,停止虚拟机继续运算运行阈值时长内未完成运算的任务,并将停止运算的任务加载到优先级等级排序的末端。
步骤308、完成除停止运算的任务的其他任务的运算后,对排在优先级等级排序末端的停止运算的任务进行运算。
步骤309、完成用户提交的任务的运算时,释放虚拟机。
作为一种实施方式,本应用示例还包括:对所有资源节点的端口流量、和/或连接数进行监测,以用于根据预设策略对每一资源节点的端口流量、
和/或连接数进行调整。
需要说明的是,资源节点的端口流量、和/或连接数通过资源管理器进行调整,因此,本发明实施例方法监测到的资源节点的端口流量、和/或连接数可以反馈到任务管理器上。
在本发明所提供的几个实施例中,应该理解到,所揭露的方法及装置,可以通过其他的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个模块或组件可以结合,或可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性的、机械的或其他形式的。
上述作为分离部件说明的模块可以是、或也可以不是物理上分开的,作为模块显示的部件可以是、或也可以不是物理模块,即可以位于一个地方,也可以分布到多个网络模块上;可以根据实际的需要选择其中的部分或全部模块来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能模块可以全部集成在一个处理模块中,也可以是各模块分别单独作为一个模块,也可以两个或两个以上模块集成在一个模块中;上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本发明实施例上述集成的模块如果以软件功能模块的形式实现
并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
本发明实施例中记载的存储器切换方法、装置只以上述实施例为例,但不仅限于此,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
本发明实施例的技术方案通过对用户提交的任务根据时间效应、可靠性效应、安全性效应等进行任务调度,考虑了用户对时间、可靠性、安全性等方面的需求,实现了***的负载均衡,提升了运算任务的工作性能。
Claims (23)
- 一种实现任务调度的方法,包括:根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述多个函数包括:每一任务相应的时间效用的效用函数、每一资源节点相应的可靠性效用的效用函数、每一资源节点相应的安全性效用的效用函数、每一任务相应的优先级效用的效用函数;对用户提交的每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值;对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
- 根据权利要求1所述的方法,其中,所述根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,所述方法还包括:建立每一任务相应的时间效用的效用函数;和/或,建立每一资源节点相应的可靠性效用的效用函数;和/或,建立每一资源节点相应的安全性效用的效用函数;和/或,建立每一任务相应的优先级效用的效用函数;所述建立每一任务相应的时间效用的效用函数,包括:计算当前任务的预设期望运行时间与任务提交时间的时间差,将计算获得的时间差作为任务执行期限;确定任务在所述任务执行期限内完成时所述时间效用的效用函数取值为1;确定任务在所述任务执行期限内未完成时所述时间效用的效用函数取值为0;所述建立每一资源节点相应的可靠性效用的效用函数包括:确定分配到资源节点的任务数nT和所述资源节点包含的虚拟机数nM;以预先设置的可靠性系数作为可靠性效用的效用函数作为底数,以确定的分配到资源节点的任务数nT与资源节点包含的虚拟机数nM的上作为指数参 数,构建所述可靠性效用的效用函数;所述建立每一资源节点相应的安全性效用的效用函数包括:按照预设等级策略划分所有资源节点为两个或两个以上安全等级;为当前资源节点从划分的两个或两个以上安全等级中随机分配一个安全等级;根据为当前资源节点随机分配的安全等级建立当前资源节点的与安全等级成正比的安全性效用的效用函数;所述建立每一任务相应的优先级效用的效用函数包括:根据当前任务包含的数据种类设定当前任务的优先级;根据设定的当前任务的优先级等级,设置每一优先级等级相应的等级系数,以设置的等级系数作为当前任务的所述优先级效用的效用函数;所述等级系数用于区分每一种类数据对应的任务的优先级;所述可靠性系数为大于0而小于1的数。
- 根据权利要求2所述的方法,其中,所述按照预设等级策略划分所有资源节点为两个或两个以上安全等级包括:将资源节点按照预设等级策略划分安全等级为si={1,2,3,4}的四个安全等级;所述建立当前资源节点的与安全等级成正比的安全性效用的效用函数包括:为当前资源节点随机分配所述四个安全等级中的一个安全等级si;根据 随机分配的当前资源节点的安全等级建立与安全等级成正比的安全性效用的效用函数包括:Ui(si)=0.25si。
- 根据权利要求2所述的方法,其中,所述根据当前任务包含的数据种类设定当前任务的优先级包括:将任务包含的数据划分为时间采用类数据、动作记录类数据、和设备台账及综合信息类数据;设置包含的数据为时间采用类数据的任务的优先级等级为第一优先级;设置包含的数据为动作记录类数据的任务的优先级等级为第二优先级;设置包含的数据为设备台账及综合信息类数据的任务的优先级等级为第三优先级;设置的所述第一优先级等级的等级系数小于所述第二优先级的等级系数,所述第二优先级的等级系数小于所述第三优先级的等级系数,且设置的所述第一优先级等级的等级系数、所述第二优先级的等级系数、和所述第三优先级的等级系数的数值大小用于区分每一种类数据对应的任务的优先级等级高低。
- 根据权利要求1至5任一项所述的方法,其中,所述遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值包括:对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计算总效用函数时选择每一种类的效用函数的所有取值的一个取值;对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函数的取值进行累加,获得总效用函数的取值。
- 根据权利要求6所述的方法,其中,对选择的效用函数的取值进行 累加之前,该方法还包括:为所述建立总效用函数中包含的每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数按照预设权重策略分别设置相应的权重。
- 根据权利要求1至5任一项所述的方法,其中,所述确定遍历计算该任务对应的总效用函数的最大取值之前,所述方法还包括:将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序,按照任务优先级由高到低的顺序计算任务的所述总效用函数。
- 根据权利要求1至5任一项所述的方法,其中,该方法还包括:将运算用户提交的任务的虚拟机按照单字长定点指令平均执行速度MIPS的大小升序排列。
- 根据权利要求1至5任一项所述的方法,其中,当分配到虚拟机的任务在运行阈值时长内未完成运算时,所述方法还包括:停止所述虚拟机继续运算所述运行阈值时长内未完成运算的任务,并将停止运算的所述任务加载到优先级等级排序的末端;完成除停止运算的任务的其他任务的运算后,再对排在所述优先级等级排序末端的所述停止运算的任务进行运算。
- 根据权利要求1至5任一项所述的方法,其中,所述采用贪心算法进行每一任务对应的所述总效用函数的遍历计算。
- 根据权利要求1至5任一项所述的方法,其中,所述方法还包括:以运行阈值时长作为资源预估单位,将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任务对应的预估所需资源;将用户提交所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
- 根据权利要求1至5任一项所述的方法,其中,该方法还包括:对所有所述资源节点的端口流量、和/或连接数进行监测,以用于根据预设策略对每一资源节点的端口流量、和/或连接数进行调整。
- 一种实现任务调度的装置,包括:总效用函数单元、遍历计算单元和任务分配单元;其中,所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数;其中,所述多个函数包括:每一任务相应的时间效用的效用函数、每一资源节点相应的可靠性效用的效用函数、每一资源节点相应的安全性效用的效用函数、每一任务相应的优先级效用的效用函数;所述遍历计算单元配置为,对用户提交的每一任务,遍历计算任务拟分配到虚拟机时该任务的总效用函数的取值;所述任务分配单元配置为,对每一任务,确定遍历计算该任务对应的总效用函数的最大取值,将总效用函数取值最大时任务拟分配到的虚拟机作为运算任务的虚拟机。
- 根据权利要求14所述的装置,其中,所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,计算当前任务的预设期望运行时间与任务提交时间的时间差,将计算获得的时间差作为任务执行期限;确定任务在所述任务执行期限内完成时所述时间效用的效用函数取值为1;确定任务在所述任务执行期限内未完成时所述时间效用的效用函数取值为0;所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,确定分配到资源节点的任务数nT和所述资源节点包含的虚拟机数nM;以预先设置的可靠性系数作为可靠 性效用的效用函数作为底数,以确定的分配到资源节点的任务数nT与资源节点包含的虚拟机数nM的上作为指数参数,构建所述可靠性效用的效用函数;所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,按照预设等级策略划分所有资源节点为两个或两个以上安全等级;为当前资源节点从划分的两个或两个以上安全等级中随机分配一个安全等级;根据为当前资源节点随机分配的安全等级建立当前资源节点的与安全等级成正比的安全性效用的效用函数;所述总效用函数单元配置为,根据预先建立的多个函数中的至少一个函数构建每一任务相应的总效用函数之前,根据当前任务包含的数据种类设定当前任务的优先级;根据设定的当前任务的优先级等级,设置每一优先级等级相应的等级系数,以设置的等级系数作为当前任务的所述优先级效用的效用函数;所述等级系数用于区分每一种类数据对应的任务的优先级;所述可靠性系数为大于0而小于1的数。
- 根据权利要求14或15所述的装置,其中,所述遍历计算单元配置为,对用户提交的每一任务,计算该任务对应的时间效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的可靠性效用的效用函数的所有取值、和/或任务拟分配到的虚拟机所在的资源节点的安全性效用的效用函数的所有取值、和/或优先级效用的效用函数的所有取值;对总效用函数中包含的每一种类的效用函数,按照组合方式每一次计算总效用函数时选择每一种类的效用函数的所有取值的一个取值;对按照组合方式选择的所有组合,分别对每一次选择的每一的效用函 数的取值进行累加,获得总效用函数的取值。
- 根据权利要求16所述的装置,其中,该装置还包括设置权重单元,配置为对选择的每一效用函数的取值进行累加之前,为所述建立总效用函数中包含的每一任务相应的时间效用的效用函数、和/或每一资源节点相应的可靠性效用的效用函数、和/或每一资源节点相应的安全性效用的效用函数、和/或每一任务相应的优先级效用的效用函数按照预设权重策略分别设置相应的权重。
- 根据权利要求14或15所述的装置,其中,该装置还包括任务排序单元,配置为确定遍历计算该任务对应的总效用函数的最大取值之前,将用户提交的所有任务按照任务的优先级等级的高低顺序进行排序,按照任务优先级由高到低的顺序计算任务的所述总效用函数。
- 根据权利要求14或15所述的装置,其中,该装置还包括虚拟机排序单元,配置为将运算用户提交的任务的虚拟机按照单字长定点指令MIPS的大小升序排列。
- 根据权利要求14或15所述的装置,其中,该装置还包括运算调整单元,配置为当分配到虚拟机的任务在运行阈值时长内未完成运算时,停止所述虚拟机继续运算所述运行阈值时长内未完成运算的任务,并将停止运算的所述任务加载到优先级等级排序的末端;完成除停止运算的任务的其他任务的运算后,再对排在所述优先级等级排序末端的所述停止运算的任务进行运算。
- 根据权利要求14或15所述的装置,其中,该装置还包括获取资源单元,配置为以运行阈值时长作为资源预估单位,将用户提交的每一任务的大小除以资源预估单位获得的商,作为该任务对应的预估所需资源;将用户提交所有任务对应的预估所需资源进行累加,获得创建运算用户提交任务的虚拟机所需的计算机资源。
- 根据权利要求14或15所述的装置,其中,该装置还包括监测单元,配置为对所有所述资源节点的端口流量、和/或连接数进行监测,以用于根据预设策略对每一资源节点的端口流量、和/或连接数进行调整。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至13任一项所述的实现任务调度的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610181930.0A CN107239336B (zh) | 2016-03-28 | 2016-03-28 | 一种实现任务调度的方法及装置 |
CN201610181930.0 | 2016-03-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017167025A1 true WO2017167025A1 (zh) | 2017-10-05 |
Family
ID=59963418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/076934 WO2017167025A1 (zh) | 2016-03-28 | 2017-03-16 | 一种实现任务调度的方法、装置及计算机存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107239336B (zh) |
WO (1) | WO2017167025A1 (zh) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108595249A (zh) * | 2018-05-02 | 2018-09-28 | 联想(北京)有限公司 | 一种虚拟机任务调度方法及电子设备 |
CN110008026A (zh) * | 2019-04-09 | 2019-07-12 | 中国科学院上海高等研究院 | 基于额外预算均分的作业调度方法、装置、终端和介质 |
CN110717662A (zh) * | 2019-09-27 | 2020-01-21 | 苏州达家迎信息技术有限公司 | 任务分配方法、装置、设备及存储介质 |
CN111124832A (zh) * | 2019-12-25 | 2020-05-08 | 青梧桐有限责任公司 | 数据监控方法、装置、电子设备及存储介质 |
CN111143037A (zh) * | 2019-12-31 | 2020-05-12 | 联想(北京)有限公司 | 一种虚拟机资源分配方法、设备、***及存储介质 |
CN111309373A (zh) * | 2020-01-19 | 2020-06-19 | 北京戴纳实验科技有限公司 | 一种灵活配置人物权限、办事流程、角色的方法 |
CN112130978A (zh) * | 2020-09-29 | 2020-12-25 | 中国船舶重工集团公司第七二四研究所 | 一种无人平台载多功能雷达任务综合优先级计算方法 |
CN112732437A (zh) * | 2020-12-30 | 2021-04-30 | 成都科来网络技术有限公司 | 一种高效的动态均衡分布式任务调度方法及*** |
CN112954022A (zh) * | 2020-12-29 | 2021-06-11 | 广东电网有限责任公司电力科学研究院 | 一种基于智能变电站的多并发实时通信方法及装置 |
CN113114502A (zh) * | 2020-05-11 | 2021-07-13 | 苏州乐米凡电气科技有限公司 | 基于服务质量的用户信息分配占比的*** |
CN113760493A (zh) * | 2020-11-05 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 一种作业调度方法和装置 |
CN117687873A (zh) * | 2023-12-20 | 2024-03-12 | 中安华邦(北京)安全生产技术研究院股份有限公司 | 一种基于ai的安全信息构建方法及*** |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107885589B (zh) * | 2017-11-22 | 2021-02-12 | 贝壳找房(北京)科技有限公司 | 一种作业调度方法及装置 |
CN108287666B (zh) * | 2018-01-16 | 2021-01-26 | 中国人民公安大学 | 用于云存储环境的数据存储方法及装置 |
CN108920269B (zh) * | 2018-07-19 | 2021-03-19 | 中国联合网络通信集团有限公司 | 容器的i/o传输任务的调度方法和装置 |
CN113992691B (zh) * | 2021-12-24 | 2022-04-22 | 苏州浪潮智能科技有限公司 | 一种边缘计算资源的分配方法、装置、设备及存储介质 |
CN115168017B (zh) * | 2022-09-08 | 2022-11-25 | 天云融创数据科技(北京)有限公司 | 一种任务调度云平台及其任务调度方法 |
CN115686865B (zh) * | 2022-11-18 | 2023-07-07 | 天河超级计算淮海分中心 | 一种基于多场景应用的超算节点资源分配*** |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060168587A1 (en) * | 2005-01-24 | 2006-07-27 | Shahzad Aslam-Mir | Interoperable communications apparatus and method |
CN101692208A (zh) * | 2009-10-15 | 2010-04-07 | 北京交通大学 | 实时交通信息处理的任务调度方法与*** |
CN102780759A (zh) * | 2012-06-13 | 2012-11-14 | 合肥工业大学 | 基于调度目标空间的云计算资源调度方法 |
CN103699446A (zh) * | 2013-12-31 | 2014-04-02 | 南京信息工程大学 | 基于量子粒子群优化算法的多目标工作流动态调度方法 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8875143B2 (en) * | 2009-12-31 | 2014-10-28 | Bmc Software, Inc. | Utility-optimized scheduling of time-sensitive tasks in a resource-constrained environment |
CN102904963A (zh) * | 2012-10-25 | 2013-01-30 | 上海电机学院 | 一种基于云模型云服务的管理方法及*** |
CN103218737B (zh) * | 2013-04-19 | 2016-03-30 | 湖南大学 | 一种基于双边市场的移动云计算环境中多维资源定价方法 |
CN104143042B (zh) * | 2014-06-28 | 2017-11-03 | 中国人民解放军国防科学技术大学 | 一种敏捷卫星对地观测任务预处理方案决策的方法 |
-
2016
- 2016-03-28 CN CN201610181930.0A patent/CN107239336B/zh active Active
-
2017
- 2017-03-16 WO PCT/CN2017/076934 patent/WO2017167025A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060168587A1 (en) * | 2005-01-24 | 2006-07-27 | Shahzad Aslam-Mir | Interoperable communications apparatus and method |
CN101692208A (zh) * | 2009-10-15 | 2010-04-07 | 北京交通大学 | 实时交通信息处理的任务调度方法与*** |
CN102780759A (zh) * | 2012-06-13 | 2012-11-14 | 合肥工业大学 | 基于调度目标空间的云计算资源调度方法 |
CN103699446A (zh) * | 2013-12-31 | 2014-04-02 | 南京信息工程大学 | 基于量子粒子群优化算法的多目标工作流动态调度方法 |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108595249A (zh) * | 2018-05-02 | 2018-09-28 | 联想(北京)有限公司 | 一种虚拟机任务调度方法及电子设备 |
CN110008026A (zh) * | 2019-04-09 | 2019-07-12 | 中国科学院上海高等研究院 | 基于额外预算均分的作业调度方法、装置、终端和介质 |
CN110717662A (zh) * | 2019-09-27 | 2020-01-21 | 苏州达家迎信息技术有限公司 | 任务分配方法、装置、设备及存储介质 |
CN110717662B (zh) * | 2019-09-27 | 2022-10-28 | 苏州达家迎信息技术有限公司 | 任务分配方法、装置、设备及存储介质 |
CN111124832A (zh) * | 2019-12-25 | 2020-05-08 | 青梧桐有限责任公司 | 数据监控方法、装置、电子设备及存储介质 |
CN111143037A (zh) * | 2019-12-31 | 2020-05-12 | 联想(北京)有限公司 | 一种虚拟机资源分配方法、设备、***及存储介质 |
CN111143037B (zh) * | 2019-12-31 | 2023-11-21 | 联想(北京)有限公司 | 一种虚拟机资源分配方法、设备、***及存储介质 |
CN111309373B (zh) * | 2020-01-19 | 2023-10-17 | 北京戴纳实验科技有限公司 | 一种灵活配置人物权限、办事流程、角色的方法 |
CN111309373A (zh) * | 2020-01-19 | 2020-06-19 | 北京戴纳实验科技有限公司 | 一种灵活配置人物权限、办事流程、角色的方法 |
CN113114502A (zh) * | 2020-05-11 | 2021-07-13 | 苏州乐米凡电气科技有限公司 | 基于服务质量的用户信息分配占比的*** |
CN112130978A (zh) * | 2020-09-29 | 2020-12-25 | 中国船舶重工集团公司第七二四研究所 | 一种无人平台载多功能雷达任务综合优先级计算方法 |
CN113760493A (zh) * | 2020-11-05 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 一种作业调度方法和装置 |
CN113760493B (zh) * | 2020-11-05 | 2024-05-17 | 北京沃东天骏信息技术有限公司 | 一种作业调度方法和装置 |
CN112954022A (zh) * | 2020-12-29 | 2021-06-11 | 广东电网有限责任公司电力科学研究院 | 一种基于智能变电站的多并发实时通信方法及装置 |
CN112732437B (zh) * | 2020-12-30 | 2023-08-22 | 科来网络技术股份有限公司 | 一种高效的动态均衡分布式任务调度方法及*** |
CN112732437A (zh) * | 2020-12-30 | 2021-04-30 | 成都科来网络技术有限公司 | 一种高效的动态均衡分布式任务调度方法及*** |
CN117687873A (zh) * | 2023-12-20 | 2024-03-12 | 中安华邦(北京)安全生产技术研究院股份有限公司 | 一种基于ai的安全信息构建方法及*** |
CN117687873B (zh) * | 2023-12-20 | 2024-04-30 | 中安华邦(北京)安全生产技术研究院股份有限公司 | 一种基于ai的安全信息构建方法及*** |
Also Published As
Publication number | Publication date |
---|---|
CN107239336A (zh) | 2017-10-10 |
CN107239336B (zh) | 2022-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017167025A1 (zh) | 一种实现任务调度的方法、装置及计算机存储介质 | |
EP3606008B1 (en) | Method and device for realizing resource scheduling | |
Kumar et al. | Deadline constrained based dynamic load balancing algorithm with elasticity in cloud environment | |
US10089140B2 (en) | Dynamically adaptive, resource aware system and method for scheduling | |
US10185592B2 (en) | Network storage device using dynamic weights based on resource utilization | |
CA2942665C (en) | Coordinated admission control for network-accessible block storage | |
US20190324819A1 (en) | Distributed-system task assignment method and apparatus | |
US10623481B2 (en) | Balancing resources in distributed computing environments | |
Ge et al. | GA-based task scheduler for the cloud computing systems | |
CN107003887A (zh) | Cpu超载设置和云计算工作负荷调度机构 | |
US20150295970A1 (en) | Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system | |
CN110221920B (zh) | 部署方法、装置、存储介质及*** | |
US20120221730A1 (en) | Resource control system and resource control method | |
WO2011110026A1 (zh) | 一种实现数据中心资源负载均衡的方法及装置 | |
US10250673B1 (en) | Storage workload management using redirected messages | |
WO2012173641A1 (en) | Decentralized management of virtualized hosts | |
CN106412124B (zh) | 一种并序化云服务平台任务分配***及任务分配方法 | |
Delavar et al. | A synthetic heuristic algorithm for independent task scheduling in cloud systems | |
US20220300323A1 (en) | Job Scheduling Method and Job Scheduling Apparatus | |
CN105607943A (zh) | 一种云环境下虚拟机动态部署机制 | |
Liu et al. | Deadline guaranteed service for multi-tenant cloud storage | |
CN107203256B (zh) | 一种网络功能虚拟化场景下的节能分配方法与装置 | |
Kumar et al. | Load balancing algorithm to minimize the makespan time in cloud environment | |
Himthani et al. | Comparative analysis of VM scheduling algorithms in cloud environment | |
Natarajan | Parallel queue scheduling in dynamic cloud environment using backfilling algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17773055 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17773055 Country of ref document: EP Kind code of ref document: A1 |