CN109885383B - A Non-Unit Time Task Scheduling Method with Constraints - Google Patents
A Non-Unit Time Task Scheduling Method with Constraints Download PDFInfo
- Publication number
- CN109885383B CN109885383B CN201811272629.6A CN201811272629A CN109885383B CN 109885383 B CN109885383 B CN 109885383B CN 201811272629 A CN201811272629 A CN 201811272629A CN 109885383 B CN109885383 B CN 109885383B
- Authority
- CN
- China
- Prior art keywords
- task
- time
- tasks
- unit time
- scheduling scheme
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及一种带约束条件的非单位时间任务调度方法,属于计算数据处理领域。The invention relates to a non-unit time task scheduling method with constraint conditions, belonging to the field of computing data processing.
背景技术Background Art
在单个处理器上,为了在有限的时间内尽可能完成更多的任务,需要对这些任务进行调度优化,所以这是一个最优调度问题,需要给每个任务都设定一个截止期限和超时惩罚作为约束条件。大多数的计算任务都无法在单个的单位时间内完成,完成任务的时间由多个单位的时间组成且任务调度还需考虑优先处理权问题。In order to complete as many tasks as possible within a limited time on a single processor, it is necessary to optimize the scheduling of these tasks. Therefore, this is an optimal scheduling problem, and each task needs to be given a deadline and timeout penalty as constraints. Most computing tasks cannot be completed in a single unit of time. The time to complete a task is composed of multiple units of time, and task scheduling also needs to consider priority issues.
发明内容Summary of the invention
针对上述问题,本发明提出了一一种带约束条件的非单位时间任务调度方法,本文对面向非单位时间的任务调度问题进行了详细的分析,对问题分解后得到相关问题的相似性,则可将任务调度问题看作相对简单的问题进行剖析,最终结合多个简单问题的解决方法加以改进,提出了一种带约束条件的非单位任务调度算法,实验证明了本文提出的算法能够在面向非单位时间的任务调度中利用约束条件给出最优调度,且比性能优异。In view of the above problems, the present invention proposes a non-unit time task scheduling method with constraints. This paper conducts a detailed analysis of the task scheduling problem for non-unit time. After decomposing the problem, the similarities of related problems are obtained. The task scheduling problem can be regarded as a relatively simple problem for analysis. Finally, it is improved by combining the solutions to multiple simple problems. A non-unit task scheduling algorithm with constraints is proposed. Experiments have proved that the algorithm proposed in this paper can use constraints to give the optimal scheduling in non-unit time task scheduling, and has excellent performance.
本公开的几个示例方面的概述如下。提供本概述是为了读者的方便,以提供对这些实施例的基本理解而不是完全地限定本发明的范围。本概述不是所有预期实施例的广泛综述,并且既不旨在标识所有方面的关键或重要元素,也不描述任何或所有方面的范围。其唯一目的在于以简化的形式呈现一个或多个实施例的一些概念,作为稍后呈现的更详细描述的前奏。为了方便,在本文中术语“一些实施例”可用于指本公开的单一实施例或者多个实施例。An overview of several example aspects of the present disclosure is as follows. This overview is provided for the convenience of the reader to provide a basic understanding of these embodiments rather than to completely limit the scope of the invention. This overview is not an extensive review of all contemplated embodiments, and is neither intended to identify key or important elements of all aspects, nor to describe the scope of any or all aspects. Its sole purpose is to present some concepts of one or more embodiments in a simplified form as a prelude to a more detailed description presented later. For convenience, the term "some embodiments" may be used herein to refer to a single embodiment or multiple embodiments of the present disclosure.
本发明的技术方案包括一种带约束条件的非单位时间任务调度方法,其特征在于,该方法包括:S1,将预设时间段内即将执行的多个带约束条件的非单位时间任务进行按任务价值排序;S2,将预设时间段划分为多个具有相同宽度的时间槽;S3,按照所述步骤S1排序将非单位时间任务放置于时间槽进行执行,每次放置时对任务运行时间与时间槽进行对比,若运行时间没有超过时间槽宽度则允许执行,并将已经运行有多个非单位时间任务及对应的时间槽宽度作为任务调度方案,每次添加新任务时对任务调度方案进行维护,每次维护时生成一个对应的任务调度方案;S4,对比所述步骤S3生成的所有任务调度方案及调度方案所执行的非单位时间任务数,选取非单位时间任务数最大的对应调度方案作为最优任务调度方案。The technical solution of the present invention includes a non-unit time task scheduling method with constraints, characterized in that the method includes: S1, sorting multiple non-unit time tasks with constraints to be executed within a preset time period according to task value; S2, dividing the preset time period into multiple time slots with the same width; S3, placing the non-unit time tasks in the time slot for execution according to the sorting of step S1, comparing the task running time with the time slot each time the task is placed, allowing execution if the running time does not exceed the time slot width, and using multiple non-unit time tasks that have been running and the corresponding time slot width as a task scheduling scheme, maintaining the task scheduling scheme each time a new task is added, and generating a corresponding task scheduling scheme each time the maintenance is performed; S4, comparing all task scheduling schemes generated in step S3 and the number of non-unit time tasks executed by the scheduling schemes, and selecting the corresponding scheduling scheme with the largest number of non-unit time tasks as the optimal task scheduling scheme.
根据所述的带约束条件的非单位时间任务调度方法,其中约束条件为截止期限和相应惩罚。According to the non-unit time task scheduling method with constraints, the constraints are deadlines and corresponding penalties.
根据所述的带约束条件的非单位时间任务调度方法,其中任务包括任务序号、任务运行时间、任务截止期限及任务价值,其中任务价值为任务的超时惩罚。According to the non-unit time task scheduling method with constraints, a task includes a task serial number, a task running time, a task deadline and a task value, wherein the task value is the timeout penalty of the task.
根据所述的带约束条件的非单位时间任务调度方法,其中步骤S3具体包括:对即将加入时间槽的非单位时间任务运行时间与时间槽宽度进行对比,若非单位时间任务运行时间大于时间槽宽度,则禁止非单位时间任务添加进时间槽进行运行,同时不更新任务调度方案,并使用原任务调度方案查找下一个非单位时间任务;若非单位时间任务运行时间小于时间槽宽度,则将对应非单位时间任务添加进时间槽进行运行,同时更新任务调度方案,并使用新任务调度方案查找下一个非单位时间任务。According to the non-unit time task scheduling method with constraints, step S3 specifically includes: comparing the running time of the non-unit time task to be added to the time slot with the time slot width; if the running time of the non-unit time task is greater than the time slot width, the non-unit time task is prohibited from being added to the time slot for running, and the task scheduling plan is not updated at the same time, and the original task scheduling plan is used to find the next non-unit time task; if the running time of the non-unit time task is less than the time slot width, the corresponding non-unit time task is added to the time slot for running, and the task scheduling plan is updated at the same time, and the new task scheduling plan is used to find the next non-unit time task.
根据所述的带约束条件的非单位时间任务调度方法,其中时间槽的长短可以进行自定义设置。According to the non-unit time task scheduling method with constraint conditions, the length of the time slot can be customized.
根据所述的带约束条件的非单位时间任务调度方法,其中该方法还包括:若预设时间内的多个宽度相同时间槽为整数,则根据步骤S3执行对任务调度;若预设时间段内包括多个宽度相同的标准时间槽及一个额外时间槽,该时间槽小于多个宽度相同的标准时间槽,则将额外的时间槽与尾部的时间槽进行合并,并置于尾部对多个未放置于时间槽的非单位时间任务执行步骤S3,选取能放进尾部时间槽的最大价值任务进行执行。According to the non-unit time task scheduling method with constraints, the method also includes: if the multiple time slots with the same width within the preset time are integers, then the task scheduling is performed according to step S3; if the preset time period includes multiple standard time slots with the same width and an additional time slot, and the time slot is smaller than the multiple standard time slots with the same width, then the additional time slot is merged with the tail time slot and placed at the tail. Step S3 is executed for multiple non-unit time tasks that are not placed in the time slot, and the maximum value task that can be placed in the tail time slot is selected for execution.
根据所述的带约束条件的非单位时间任务调度方法,其中步骤S3还包括:每执行添加一次任务的添加生成对应的一个任务调度方案,该调度方案包括总时间槽长度、任务数及总任务价值;将每次添加一次任务生成的所有任务调度方案进行对比,将总时间槽长度最大、任务数任务数最多及总任务价值最高的调度方案作为解决将执行的多个带约束条件的非单位时间任务。According to the non-unit time task scheduling method with constraints, step S3 also includes: each time a task is added, a corresponding task scheduling scheme is generated, and the scheduling scheme includes the total time slot length, the number of tasks and the total task value; all task scheduling schemes generated each time a task is added are compared, and the scheduling scheme with the largest total time slot length, the largest number of tasks and the highest total task value is used as a solution to multiple non-unit time tasks with constraints to be executed.
本发明的有益效果为:将非单位时间的任务调度问题转化为相对简单的问题进行剖析,最终结合转化问题的解决方法并加以改进,提出了一种带约束条件的非单位任务调度,提高的任务调度的效率,并减少了系统资源的消耗。The beneficial effects of the present invention are: converting the non-unit time task scheduling problem into a relatively simple problem for analysis, and finally combining and improving the solution to the converted problem, proposing a non-unit task scheduling with constraints, thereby improving the efficiency of task scheduling and reducing the consumption of system resources.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1所示为根据本发明的方法的总体流程图。FIG. 1 is a general flow chart of the method according to the present invention.
具体实施方式DETAILED DESCRIPTION
本发明的技术方案包括一种带约束条件的非单位时间任务调度方法,适用于以下将结合实施例和附图对本发明的构思、具体结构及产生的技术效果进行清楚、完整的描述,以充分地理解本发明的目的、方案和效果。The technical solution of the present invention includes a non-unit time task scheduling method with constraints, which is suitable for the following clear and complete description of the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, solution and effect of the present invention.
需要说明的是,如无特殊说明,当某一特征被称为“固定”、“连接”在另一个特征,它可以直接固定、连接在另一个特征上,也可以间接地固定、连接在另一个特征上。此外,本公开中所使用的上、下、左、右等描述仅仅是相对于附图中本公开各组成部分的相互位置关系来说的。在本公开中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。此外,除非另有定义,本文所使用的所有的技术和科学术语与本技术领域的技术人员通常理解的含义相同。本文说明书中所使用的术语只是为了描述具体的实施例,而不是为了限制本发明。本文所使用的术语“和/或”包括一个或多个相关的所列项目的任意的组合。It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature, or it may be indirectly fixed or connected to the other feature. In addition, the descriptions of up, down, left, right, etc. used in the present disclosure are only relative to the relative positional relationship of the components of the present disclosure in the accompanying drawings. The singular forms of "a", "said" and "the" used in the present disclosure are also intended to include the plural forms, unless the context clearly indicates other meanings. In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art. The terms used in this specification are only for describing specific embodiments and are not intended to limit the present invention. The term "and/or" used herein includes any combination of one or more related listed items.
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种元件,但这些元件不应限于这些术语。这些术语仅用来将同一类型的元件彼此区分开。例如,在不脱离本公开范围的情况下,第一元件也可以被称为第二元件,类似地,第二元件也可以被称为第一元件。本文所提供的任何以及所有实例或示例性语言(“例如”、“如”等)的使用仅意图更好地说明本发明的实施例,并且除非另外要求,否则不会对本发明的范围施加限制。It should be understood that, although the term first, second, third etc. may be adopted to describe various elements in the present disclosure, these elements should not be limited to these terms. These terms are only used to distinguish the same type of elements from each other. For example, without departing from the scope of the present disclosure, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element. The use of any and all examples or exemplary language ("for example", "such as" etc.) provided herein is only intended to better illustrate embodiments of the present invention, and unless otherwise required, the scope of the present invention will not be limited.
在单个处理器上,为了在有限的时间内尽可能完成更多的任务,需要对这些任务进行调度优化,所以这是一个最优调度问题[1],需要给每个任务都设定一个截止期限和超时惩罚作为约束条件。In order to complete as many tasks as possible within a limited time on a single processor, it is necessary to optimize the scheduling of these tasks. This is an optimal scheduling problem [1], and it is necessary to set a deadline and timeout penalty for each task as constraints.
图1所示为根据本发明的方法的总体流程图。具体包括:S1,将预设时间段内即将执行的多个带约束条件的非单位时间任务进行按任务价值排序;S2,将预设时间段划分为多个具有相同宽度的时间槽;S3,按照所述步骤S1排序将非单位时间任务放置于时间槽进行执行,每次放置时对任务运行时间与时间槽进行对比,若运行时间没有超过时间槽宽度则允许执行,并将已经运行有多个非单位时间任务及对应的时间槽宽度作为任务调度方案,每次添加新任务时对任务调度方案进行维护,每次维护时生成一个对应的任务调度方案;S4,对比所述步骤S3生成的所有任务调度方案及调度方案所执行的非单位时间任务数,选取非单位时间任务数最大的对应调度方案作为最优任务调度方案。Figure 1 shows the overall flow chart of the method according to the present invention. Specifically, it includes: S1, sorting multiple non-unit time tasks with constraints to be executed within a preset time period according to task value; S2, dividing the preset time period into multiple time slots with the same width; S3, placing the non-unit time tasks in the time slots for execution according to the sorting of step S1, comparing the task running time with the time slot each time the task is placed, allowing execution if the running time does not exceed the time slot width, and taking multiple non-unit time tasks that have been running and the corresponding time slot width as the task scheduling scheme, maintaining the task scheduling scheme each time a new task is added, and generating a corresponding task scheduling scheme each time the maintenance is performed; S4, comparing all the task scheduling schemes generated in step S3 and the number of non-unit time tasks executed by the scheduling scheme, and selecting the corresponding scheduling scheme with the largest number of non-unit time tasks as the optimal task scheduling scheme.
本发明的技术方案进一步提供了以下技术方案The technical solution of the present invention further provides the following technical solution
非单位时间任务需要运行若干个单位的时间,下文分析中忽略任务之间相互切换所耗费的时间。假设一个非单位时间任务a运行时间为,且a可以从任意时间点开始,在任意时间点结束(假设任务a尚未完成的情况下),任务a的剩余完成时间为,在若干个单位时间后,任务a可以从另一个时间点开始继续运行,直到时,任务即视为完成。设若干非单位时间任务的集合为S,对S的一个调度就是S中的一个任务执行序列,其中表示该任务从时间点开始运行,在时间点暂停(或结束),执行序列规定了从时间点0开始,可在任意一个时间点运行任一个任务。Non-unit time tasks need to run for a certain number of units of time. The time spent switching between tasks is ignored in the following analysis. Assume that the running time of a non-unit time task a is , and a can be obtained from any time point Start at any point in time End (assuming that task a has not been completed), the remaining completion time of task a is ,After a certain number of time units, task a can continue to run from another time point until When , the task is considered completed. Let S be a set of non-unit time tasks. A schedule for S is a task execution sequence in S. ,in Indicates that the task is from Start running at time point, at time point Pause (or end), the execution sequence specifies starting from time point 0, and any task can be run at any time point.
问题的输入如下:包含n个非单位时间任务的集合;给定一段时间T(包含T个时间单位),作为任务序列执行的最大时间跨度;给定任务对应的非负整数期限,且任务要求在内完成;给定任务对应的非负整数时间,且任务的运行时间为个单位时间;给定任务对应的非负整数惩罚,若任务没有在内完成则受到惩罚,否则没有惩罚。问题的本质是需要在集合S中找出一个合适的调度,使得惩罚的总和最小。The input of the problem is as follows: a set of n non-unit time tasks ; Given a period of time T (including T time units), as the maximum time span for the execution of the task sequence; given a task The corresponding non-negative integer deadline , and the task Request in Completed within; given task The corresponding non-negative integer time , and the task The running time is units of time; given a task The corresponding non-negative integer penalty , if the task Not in If you complete it within the time limit, you will be punished. , otherwise there is no penalty. The essence of the problem is to find a suitable schedule in the set S so that the sum of penalties is minimized.
1.问题分析1. Problem Analysis
问题描述:给定已知权重的n个项和价值和一个容量的背包,找到适合于背包的项目的最有价值的子集[6]。 假设所有的权重和背包容量都是正整数,总值不必是整数。Problem Description: Given n items with known weights and value And a backpack with capacity , find the most valuable subset of items that can fit into the knapsack [6]. Assume that all weights and knapsack capacities are positive integers; the total value need not be an integer.
由前i个项目定义的实例,,具有权,值和背包容量j,。令为该实例的最优解。在这里,划分适合背包的前i个项目的所有子集的容量j分为两类:不包括第i项和包括第i项。注意:The instance defined by the first i items, , with the right ,value and the backpack capacity j, .make is the optimal solution for this instance. Here, the capacity j of all subsets that fit into the first i items of the knapsack is divided into two categories: excluding the i-th item and including the i-th item. Note:
1、在不包括第i项的子集中,最佳子集的值定义为;2、在包括第i个项的子集中,产生最佳子集以及适合于背包中的第一个项的最佳子集容量。最优子集的值是。1. In the subset that does not include the i-th item, the value of the best subset is defined as ; 2. In the subset including the i-th item, generate the best subset and the first one suitable for the knapsack Optimal subset capacity of items The value of the optimal subset is .
因此,前i个项目的所有可行子集中的最优解的值为这两个值的最大值。如果第i个项目不适合背包,值从最前面的i个项目中选择的最佳子集的值与最佳子集的值相同从第一个项目中选择,由此得出:Therefore, the value of the optimal solution among all feasible subsets of the first i items is the maximum of these two values. If the i-th item does not fit into the knapsack, the value of the optimal subset selected from the first i items is the same as the value of the optimal subset selected from the first Select from among the projects, and you will get:
定义初始条件如下:Define the initial conditions as follows:
从问题的定义上考虑,对比0-1背包问题与非单位时间任务调度问题发现,如果把后者的截止期限这一条件去掉,再把给定的T个单位时间看作背包的“最大负载重量”,每个任务的运行时间看作任务的“重量”,把对应的超时惩罚看作是这个任务的“价值”,此时非单位时间任务调度问题就可以看作0-1背包问题,相应的,0-1背包问题最优解的求解方法可以类似的作为非单位时间任务调度问题求解方法的参考。From the definition of the problem, by comparing the 0-1 knapsack problem with the non-unit time task scheduling problem, we find that if the deadline condition of the latter is removed, and the given T unit time is regarded as the "maximum load weight" of the knapsack, the running time of each task is regarded as the "weight" of the task, and the corresponding timeout penalty is regarded as the "value" of the task, then the non-unit time task scheduling problem can be regarded as the 0-1 knapsack problem. Correspondingly, the method for solving the optimal solution of the 0-1 knapsack problem can be similarly used as a reference for the solution method of the non-unit time task scheduling problem.
2.2带期限和惩罚的单位时间任务调度问题分析推理2.2 Analysis and reasoning of the unit time task scheduling problem with deadlines and penalties
与非单位时间任务调度类似的单位时间任务是一种作业,例如要在计算机上运行的程序,只需要一个单位时间完成。给定单位时间任务的有限集合S[8],S的调度是置换S中指定执行这些任务的顺序。Similar to the scheduling of non-unit-time tasks, a unit-time task is a job, such as a program to be run on a computer, that takes only one unit of time to complete. Given a finite set S of unit-time tasks [8], the schedule of S is to permute the order in which these tasks are executed.
问题具有以下输入:The problem has the following input:
1、集合个单位时间任务;1. Collection Unit time task;
2、一组n个整数期限,使得每个满足和任务应该由时间完成;2. A set of n integer deadlines , so that each satisfy and tasks Should be by time Finish;
3、一组n个非负权重或惩罚如果任务没有在截止时间之前完成则会受到惩罚,反之,没有惩罚。3. A set of n non-negative weights or penalties If the task Not on deadline If it is completed before, there will be a penalty, otherwise there is no penalty.
综上所述,希望找到一个S的时间表,最大限度地减少因错过的截止期限所造成的总惩罚。In summary, we want to find a schedule S that minimizes the total penalty due to missed deadlines.
因此,搜索找到分配的任务的集合A所在的最佳时间表。确定A后,可以通过列出实际的时间表A的元素并按照单调递增的最后期限的顺序,然后列出近期任务(S-A),产生最佳时间表的规范排序。Therefore, the search finds the best schedule where the set A of assigned tasks lies. After A is determined, a canonical ordering of the best schedule can be produced by listing the elements of the actual schedule A in order of monotonically increasing deadlines and then listing the near-term tasks (S-A).
如果存在这些任务的时间表,则集合A是没有迟到任务的。显然,时间表的早期任务集合形成了一组单独的任务。考虑给定任务集合A是否是单独的问题。对于,令表示A中任务的数量,其截止期限为t或更早,。If there exists a schedule for these tasks, then set A has no late tasks. Clearly, the set of early tasks in the schedule forms a separate set of tasks. Consider the question of whether a given set of tasks A is separate. For ,make represents the number of tasks in A whose deadline is t or earlier, .
引理1对于任务集A,以下语句是等效的。Lemma 1 For a task set A, the following statements are equivalent.
1、集合A是单独的。1. Set A is unique.
2、对于,有。2. For ,have .
3、如果A中的任务按照单调递增的截止期限的顺序安排,则没有任务迟到了。3. If the tasks in A are scheduled in order of monotonically increasing deadlines, no task will be late.
容易看出,在单位时间任务调度问题之上,把任务完成时间由单个的单位时间改成多个单位时间,即可以看作非单位时间任务,因此,除非单位时间而引出的截止期限和相应的惩罚这两个约束条件外,非单位时间调度任务是广义的单位时间调度任务。It is easy to see that in the unit time task scheduling problem, changing the task completion time from a single unit time to multiple unit times can be regarded as a non-unit time task. Therefore, except for the two constraints of the deadline and corresponding penalty induced by the non-unit time, the non-unit time scheduling task is a generalized unit time scheduling task.
1.算法问题转化1. Algorithm Problem Transformation
3.1单位时间任务调度问题转化3.1 Transformation of unit time task scheduling problem
由2.2可知,本文题设与单位时间任务调度问题的不同点在于,后者的任务都是单位时间的,因此只需要保证任务能够在截止期限之前开始运行即可;而本文题设的任务需要若干个单位时间来运行,这样的话如果我们想要保证任务不被“惩罚”,我们必须保证能够在之前开始运行,并且有足够的时间()使得在能够在(或之前)完成。From 2.2, we can see that the difference between the problem in this paper and the problem of scheduling tasks per unit time is that the tasks in the latter are all per unit time, so it is only necessary to ensure that the tasks can be started before the deadline; while the tasks in this paper require several unit time. To run, if we want to ensure the task We must ensure that we are not "punished" Can Started running before, and had enough time ( ) makes Can (or before) completion.
由于本文题设中的非单位时间任务不需要连续运行,所以可以把非单位时间任务分割成个单位时间任务,每个任务的截止期限为,把任务的惩罚定义为:Since the non-unit time tasks in this paper do not need to run continuously, we can put the non-unit time tasks Split into unit time tasks, each task has a deadline of , the task The penalty is defined as:
•如果属于的个单位时间任务都能在各自的期限(或之前)完成,则惩罚为0; • If it belongs to of If all unit time tasks can be completed on or before their respective deadlines, the penalty is 0;
•如果任一属于的单位时间任务没有在自己的期限(或之前)完成,那么惩罚为。 • If any of If the unit time task is not completed on or before its own deadline, the penalty is .
把非单位时间任务调度问题经过上述转化后,则可以考虑能否利用单位时间任务调度问题的求解算法来解决。问题给出了关于独立集合A的概念以及它的等价形式,并且将其的求解转化为构建任务集合S的一个独立集合A,使得集合A包含的任务的超时惩罚之和最大的问题。要构建一个独立集合A,需要考虑如何判定一个运行时间为t,截止期限为d的任务a能否加入到一个现有的独立集合A中,组成一个新的独立集合。对于单位时间任务,从独立集合A的等价形式可以知道,只要,则任务a可以加入独立集合A。但是对于本文题设的非单位时间任务a,由于需要保证所有属于a的t个单位时间任务都能在d(或之前)完成,所以要满足,任务a才能加入独立集合A。由此可得,对于单位时间任务和非单位时间任务,判定的条件都是一致的。After the non-unit time task scheduling problem has been transformed as above, we can consider whether it can be solved using the algorithm for solving the unit time task scheduling problem. The problem gives the concept of independent set A and its equivalent form, and transforms its solution into the problem of constructing an independent set A of the task set S so that the sum of the timeout penalties of the tasks contained in set A is maximized. To construct an independent set A , we need to consider how to determine whether a task a with a running time of t and a deadline of d can be added to an existing independent set A to form a new independent set. For unit time tasks , from the equivalent form of the independent set A, we can know that as long as , then task a can be added to the independent set A. However, for the non-unit time task a in this paper, since it is necessary to ensure that all t unit time tasks belonging to a can be completed on d (or before), it must satisfy , task a can be added to the independent set A. Therefore, for unit time tasks and non-unit time tasks, the judgment conditions are the same.
引理2:给定一个运行时间为t,截止期限为d的任务a,以及一个现有的独立集合A,如果a满足如下条件,则a可以加入到A中,组成一个新的独立集合:Lemma 2: Given a task a with a running time of t and a deadline of d , and an existing independent set A , a can be added to A to form a new independent set if a satisfies the following conditions:
假设存在一个(超时惩罚之和)比A大的集合,任务a是A中的超时惩罚d最小的任务,那么必然存在一个不在集合A中,超时惩罚为的任务,使得并且能够加入集合A-a,此时只要替换任务a和任务,就可以得到一个比A大的集合。但是无法找到这样的任务,因为如果并且能够加入集合,那么必然已经在集合A中,因为在构建集合A时是按任务的超时惩罚从大到小挑选的。于是可证明A是S的一个最大独立集合。Assume there is a set with a (sum of timeout penalties) larger than A , and task a is the task with the smallest timeout penalty d in A , then there must be a task that is not in set A and has a timeout penalty of Mission , so that and Can be added to set Aa , then just replace task a and task , we can get a set larger than A. But we cannot find such a task , because if and Ability to join collections ,So It must already be in set A , because when constructing set A, tasks are selected from large to small according to their timeout penalties. So it can be proved that A is a maximal independent set of S.
但对于非单位时间任务调度问题,利用单位时间任务调度问题中的方法并不能保证得到的集合A是最大的。However, for non-unit time task scheduling problems, using the method in the unit time task scheduling problem cannot guarantee that the obtained set A is the largest.
例如:给定一个包含T=7个单位时间的时间槽,包含如表1所示的5个任务:For example, given a time slot of T = 7 time units, containing 5 tasks as shown in Table 1:
表1Table 1
现在任务,,,,是按从大到小排好序的,可以尝试利用带期限和惩罚的单位时间任务调度问题的解法求出一个最大独立集合A。对于任务,由于,所以可以加入A。然后考虑,,所以也可以加入A。再到,,所以也加入到A。这时,时间槽的状态如表2所示(其中属于同一个非单位时间任务的单位时间任务用相同的任务号表示):Current Tasks , , , , Yes If the tasks are sorted from large to small, we can try to find a maximum independent set A using the solution to the unit time task scheduling problem with deadlines and penalties. ,because ,so A can be added. Then consider , ,so You can also add A. Then , ,so Also added to A. At this time, the state of the time slot is shown in Table 2 (where the unit time tasks belonging to the same non-unit time task are represented by the same task number):
表2Table 2
剩余的空位只有时间点1,所以后面的任务和都不可能完成了。首先计算一下目前在时间槽中的任务的总惩罚为15,然而这并不是最大值,因为可以找到如表3的任务调度方式,使得总惩罚为16。The only remaining slot is time point 1, so the following tasks and First, the total penalty of the task currently in the time slot is calculated to be 15, but this is not the maximum value, because we can find a task scheduling method as shown in Table 3, which makes the total penalty 16.
表3Table 3
3.2 0-1背包问题转化3.2 0-1 Knapsack Problem Transformation
由2.1可知,0-1背包与本文题设的不同点在于,后者增加了对“物品”(即任务)的“期限”约束,这样的话,要保证“物品”能够装入“背包”,除了要有“空位”以外,还需要满足“期限”的约束。As can be seen from 2.1, the difference between the 0-1 backpack and the problem in this article is that the latter adds a "deadline" constraint on the "items" (i.e., tasks). In this case, in order to ensure that the "items" can be put into the "backpack", in addition to having "space", the "deadline" constraint must also be met.
下面先给出非单位时间任务调度问题的另外一种描述,使得它更加接近0-1背包问题:The following is another description of the non-unit time task scheduling problem, which makes it closer to the 0-1 knapsack problem:
给定N个已知运行时间为,价值为以及期限为的任务,和一个长度为T个单位时间的时间槽,找到一个在满足任务期限的条件下,能够放进给定时间槽并且具有最大价值的任务调度。Given N known running times , the value is and the deadline is and a time slot of length T units, find a task schedule that can fit into the given time slot and has the greatest value while meeting the task deadline.
从背包问题的递归式(1)看到,对于第i个物品,如果不选择这个物品或者这个物品本身无法加入背包,那么前i个物品可以获得的最大价值与前i -1 个是一样的。否则将能找到一个能够放下第i个物品的方案(即),比较该方案与前一个方案的总价值,选出一个最大的作为前i个物品的最大价值,即。这个递归式同样适用与本文题设,但是无法保证第i个任务加入方案之后仍然能够满足期限的约束。于是,还需要在选择第i个任务之前,判断方案加入第i个任务之后是否仍然能够满足期限的约束,如果不能满足,则不能选择第i个任务。下面给出本文题设的递归式:From the recursive formula (1) of the knapsack problem, we can see that for the ith item, if this item is not selected or cannot be added to the knapsack, the maximum value that the first i items can obtain is the same as the first i - 1 items. Otherwise, a solution that can place the ith item (i.e. ), compare this solution with the previous one The total value of the items, select the largest one as the maximum value of the first i items, that is This recursive formula is also applicable to the problem in this paper, but it cannot guarantee that the i- th task will be added to the solution. After that, the deadline can still be met. Therefore, it is also necessary to judge the solution before selecting the i- th task. After adding the i -th task, can the deadline constraint still be met? If not, the i- th task cannot be selected. The recursive formula of this paper is given below:
目前需要考虑如何判断一个给定的方案加入第i个任务之后是否仍然能够满足期限的约束。对于现有的方案,能获得信息只有当前的最大值,这显然无法做出判断,那么需要增加哪些信息呢?At present, we need to consider how to judge a given solution After adding the i- th task, can the deadline still be met? , the only information available is the current maximum value, which obviously cannot make a judgment, so what information needs to be added?
在前面分析中,给定一个已知的独立集合A和一个任务a,即可判断任务a能否加入A。因此,增加的信息就是每一个方案对应的独立集合A,即当前已经加入到A中的任务。把每一个扩展为一张长度为N+1的表,其中N为任务的数量,表示当前方案对应的最大价值,对于1,In the previous analysis, given a known independent set A and a task a , we can determine whether task a can be added to A. Therefore, the additional information is that each solution The corresponding independent set A is the task that has been added to A. Expand to a table of length N + 1 , where N is the number of tasks, Indicates the maximum value corresponding to the current solution. For 1 ,
为了利用前面的方法来求解集合A,还需要先对任务按价值从大到小排序。In order to use the previous method to solve the set A , we need to sort the tasks by value from large to small.
算法设计由3.1和3.2中的分析,可根据非单位时间任务调度问题的定义及0-1背包问题和单位时间任务调度问题的解决方案,得到以下算法:Algorithm Design Based on the analysis in 3.1 and 3.2, we can get the following algorithm according to the definition of non-unit time task scheduling problem and the solutions of 0-1 knapsack problem and unit time task scheduling problem:
Input:给定T个单位时间,N个任务(task[1..N]),每个任务包含4个属性(1≤i≤N):Input: Given T units of time, N tasks ( task[1..N]), each task contains 4 attributes (1 ≤i≤N ):
•task[i].num:任务的序号 • task[i].num: the task number
•task[i].t:任务的运行时间 • task[i].t: the running time of the task
•task[i].d:任务的截止期限 • task[i].d: the deadline of the task
•task[i].v:任务的价值(或超时惩罚) • task[i].v: the value of the task (or timeout penalty)
Output:可以获得的最大价值,以及对应的任务调度方案,即对于T个单位时间的时间槽上的Output: The maximum value that can be obtained, and the corresponding task scheduling scheme, that is, for the time slot of T units of time
每一个点分别运行哪一个任务,若对应的时间槽为空,则表明该点可运行任意任务,而不会影响最终结果。1:SortByValue(task[1..N]);Which task is run at each point? If the corresponding time slot is empty, it means that any task can be run at this point without affecting the final result. 1: SortByValue(task[1..N]);
2:fori←0toNdo2:fori←0toNdo
3:forj←0toTdo4:fork←0toNdo5:F[i][j][k]←0;6:endfor7:endfor8:endfor9:fori←1toTdo10:forj←1toNdo11:iftask[j].t>ithen12:F[j][i][0]←F[j-1][i][0]13:copyF[j-1][i][1..N]toF[j][i][1..N]14:else15:if(F[j-1][i][0]F[j-1][i-task[j].t][0]+task[j].v)or(check(F[j-1][i-task[j].t],j,i)=FALSE)then16:F[j][i][0]←F[j-1][i][0]17:copyF[j-1][i][1..N]toF[j][i][1..N]18:else19:F[j][i][0]←F[j-1][i-task[j].t][0]+task[j].v20:copyF[j-1][i-task[j].t][1..N]toF[j][i][1..N]21:F[j][i][j]←122:endif23:endif24:endfor25:endfor26:printSchedule3:forj←0toTdo4:fork←0toNdo5:F[i][j][k]←0;6:endfor7:endfor8:endfor9:fori←1toTdo10:forj←1toNdo11:iftask[j].t>ithen12:F[ j][i][0]←F[j-1][i][0]13:copyF[j-1][i][1..N]toF[j][i][1..N ]14:else15:if(F[j-1][i][0] F[j-1][i-task[j].t][0]+task[j].v)or(check(F[j-1][i-task[j].t],j, i)=FALSE)then16:F[j][i][0]←F[j-1][i][0]17:copyF[j-1][i][1..N]toF[j ][i][1..N]18:else19:F[j][i][0]←F[j-1][i-task[j].t][0]+task[j]. v20:copyF[j-1][i-task[j].t][1..N]toF[j][i][1..N]21:F[j][i][j]← 122:endif23:endif24:endfor25:endfor26:printSchedule
整个算法是基于0-1背包问题的算法之上,增加了对每一个方案的维护以及判断某个任务是否能够加入某个方案。The entire algorithm is based on the algorithm of the 0-1 knapsack problem, adding the maintenance of each plan and the judgment of whether a task can be added to a certain plan.
在第1行,先对任务按value从大到小排序,第2-8行初始化需要维护的表。In line 1, tasks are sorted by value from large to small, and lines 2-8 initialize the table to be maintained. .
第9行时间槽的长度i从1增加到T,每次增加之后,第10行j代表从任务1开始到任务N,计算递归式(3)。The length of the time slot i in line 9 increases from 1 to T. After each increase, the length of the time slot j in line 10 represents the calculation of the recursive formula (3) from task 1 to task N.
第11行,如果任务j的运行时间比当前时间槽长度i大,那么任务j不能运行;第15行,如果方案较优,或者在时间槽长度为i的情况下,方案无法加入任务j,则依然选择方案,否则第18行就在方案的基础上加入任务j。注意,在第13、17、20行,分别把对应的方案拷贝到当前方案中,第21行由于加入了任务j,所以要把对应的置为1。最后,第27行输出最大值和调度方案Line 11: If the running time of task j is greater than the current time slot length i, then task j cannot run; Line 15: If the solution Better, or when the time slot length is i, the solution If you cannot join task j, you still choose the solution Otherwise, line 18 is in the solution Note that in lines 13, 17, and 20, the corresponding solutions are copied to the current solution. In line 21, since task j is added, the corresponding Set to 1. Finally, line 27 outputs the maximum value and the scheduling plan
Check函数实现:Check function implementation:
Input:Input:
•当前方案S[1..N],如果S[i]=1(),说明该方案包含任务i; • Current solution S[1..N], if S [ i ]=1( ), indicating that the solution includes task i;
•新加入的第a个任务; • The newly added a- th task;
•当前时间槽的长度T。 • The length T of the current time slot.
•一个长度为T+1的时间槽结构(时间点0不能被使用)timeslots,它初始条件下是T+1个不相交集合,它支持如下操作: • A timeslot structure of length T + 1 (time point 0 cannot be used) timeslots, which is initially T + 1 disjoint sets and supports the following operations:
1.FindEmpty(k):找到一个位置k之前并且未被使用的时间点,如果找不到,则返回0;1. FindEmpty(k): Find a time point before position k that is not used. If not found, return 0;
2.Use(p,i):把位置p上的时间点给任务i使用,并且把时间点p所属的集合与p之前的一个集合合并起来。Output:如果第a个任务能加入方案S,则返回TRUE,否则返回FALSE。1:fori1toado2:ifS[i]=1ori=athen3:forj←task[i].ddowntotask[i].d-task[i].tdo4:ifj>Tthen5:k←T6:else7:k←j8:endif9:p←timeslots.FindEmpty(k)10:ifp=0then11:returnFALSE12:endif13:timeslots.Use(p,i)14:endfor15:endif16:endfor17:returnTRUE2.Use(p,i): Use the time point at position p for task i, and merge the set to which time point p belongs with the set before p. Output: If the a - th task can be added to plan S, then return TRUE, otherwise return FALSE. 1:fori1toado2:ifS[i]=1ori=athen3:forj←task[i].ddowntotask[i].d-task[i].tdo4:ifj>Tthen5:k←T6:else7:k←j8:endif9:p←timeslots.FindEmpty(k)10:ifp=0then11:returnFALSE12:endif13:timeslots.Use(p,i)14:endfor15:endif16:endfor17:returnTRUE
第1行,由于之前的任务是从第1个到第N个开始选择的,所以在检测第a个任务的时候只需要扫描。In the first row, since the previous tasks are selected from the 1st to the Nth, when detecting the ath task, only the scan .
第2行,如果S[i]=1说明第i个任务已经在方案S中了,如果i=a,虽然,但是可以先假设a能加入到S中,再判定假设是否成立。In the second line, if S [ i ]=1, it means that the i-th task is already in the solution S. If i = a , although , but we can first assume that a can be added to S, and then determine whether the assumption is true.
第3行,j从task[i].d减小到task[i].t,相当于把任务j分成task[i].t个单位时间任务,期限分别为。In the third line, j is reduced from task[i].d to task[i].t, which is equivalent to dividing task j into task[i].t unit time tasks with deadlines of .
第4-8行,如果任务的期限j比当前的时间槽的长度大,那么只能从时间槽的最后一点开始。后面的工作就是给每个单位时间任务找一个时间点。如果能找到一个时间点p,那么就把p分配给任务i,如果找不到(p=0),说明之前的假设不成立,于是就返回FALSE,否则返回TRUE。Lines 4-8, if the deadline j of the task is longer than the length of the current time slot, then it can only start from the last point of the time slot. The following work is to find a time point for each unit time task. If a time point p can be found, then p is assigned to task i. If it cannot be found (p=0), it means that the previous assumption is not true, so FALSE is returned, otherwise TRUE is returned.
下面分析一下算法的时间复杂度。在这之前,先要分析一下check的时间复杂度。直接看伪代码的话,check的时间复杂度并不好分析,考虑从另一个角度来分析。首先,check的实现是基于按秩合并和路径压缩的快速不相交集合森林的,其中的FindEmpty(k)是基于FIND-SET操作的,Use(p,i)是基于UNION操作的。对于一个给定的长度为T的时间槽,check最多只能执行T次FindEmpty(k)和T次Use(p,i)操作,因为每次找到一个空的时间点之后,该时间点就会被使用,当T个时间点都被使用以后,check要么返回FALSE,要么返回TRUE。所以check的时间复杂度可近似地看作O(T)。The following is an analysis of the time complexity of the algorithm. Before that, we need to analyze the time complexity of check. If we look at the pseudocode directly, the time complexity of check is not easy to analyze. Consider analyzing it from another angle. First, the implementation of check is based on a fast disjoint set forest with rank merging and path compression, in which FindEmpty(k) is based on the FIND-SET operation, and Use(p,i) is based on the UNION operation. For a given time slot of length T, check can only perform at most T FindEmpty(k) and T Use(p,i) operations, because each time an empty time point is found, the time point will be used. When all T time points are used, check will either return FALSE or TRUE. Therefore, the time complexity of check can be approximately regarded as O ( T ).
再分析schedule的时间复杂度,假设第1行采用一个时间复杂度为的排序算法,第2-8行显然为,考-+虑最坏情况下,每次循环都要执行check,则第9-25行的时间复杂度为,最后,printSchedule可在完成。所以,整个调度算法的时间复杂度为。Let's analyze the time complexity of schedule again. Assume that the first line uses a time complexity of The sorting algorithm of , lines 2-8 are obviously , considering the worst case, each loop needs to execute the check, then the time complexity of lines 9-25 is Finally, printSchedule can be used in Completed. Therefore, the time complexity of the entire scheduling algorithm is .
4,试验和结果。4. Experiments and results.
非单位时间任务调度问题的求解算法是结合了0-1背包问题和单位时间任务调度问题的,如果输入一组运行时间全为1的任务,那么需要求解的问题就退化为单位时间任务调度问题了,如果输入一组截止期限大于等于时间槽长度T的任务,那么问题就退化为0-1背包问题了,也就是说,0-1背包问题和单位时间任务调度问题能解决的问题,非单位时间任务调度问题的算法都能够解决。The algorithm for solving the non-unit time task scheduling problem combines the 0-1 knapsack problem and the unit time task scheduling problem. If a set of tasks whose running time is all 1 is input, then the problem to be solved degenerates into the unit time task scheduling problem. If a set of tasks whose deadline is greater than or equal to the time slot length T is input, then the problem degenerates into the 0-1 knapsack problem. In other words, the problems that can be solved by the 0-1 knapsack problem and the unit time task scheduling problem can also be solved by the algorithms of the non-unit time task scheduling problem.
于是,设置三组数据:So, set three sets of data:
1.现有技术关于0-1背包问题的数据1. Data on the 0-1 knapsack problem in existing technology
2.现有技术关于带惩罚的单位时间任务调度的问题的数据2. Data on the Problem of Unit-Time Task Scheduling with Penalty in the Prior Art
3.针对非单位时间任务调度问题的数据,这一组数据来自例(1),已经可以知道单位时间任务调度问题的算法无法解决这组数据,则可尝试问题0的算法是否能解决它。3. Regarding the data of the non-unit time task scheduling problem, this set of data comes from Example (1). We already know that the algorithm for the unit time task scheduling problem cannot solve this set of data. So we can try to see if the algorithm for Problem 0 can solve it.
4.针对非单位时间任务调度问题的数据,这一组数据是在第3组数据之上修改了任务的期限,使得能够得到的最大变小了。4. Regarding the data of non-unit time task scheduling problem, this set of data modifies the task deadline based on the third set of data, making the maximum obtainable value smaller.
3.1测试数据3.1 Test Data
第一组数据:The first set of data:
表4第一组数据Table 4 The first set of data
第二组数据:The second set of data:
表5第二组数据Table 5 The second set of data
第三组数据:The third set of data:
表6第三组数据Table 6 The third set of data
第四组数据:The fourth set of data:
表7第四组数据Table 7 The fourth group of data
3.2实验结果3.2 Experimental Results
第一组:Group 1:
表8第一组数据实验结果Table 8 Experimental results of the first set of data
表9第一组策略Table 9 The first group of strategies
得出的最大值和装载策略与上述现有技术关于0-1背包问题的数据的结果一致,但得出的表不同,原因是对物品(任务)做了排序。The obtained maximum value and loading strategy are consistent with the results of the above-mentioned prior art on the data of the 0-1 knapsack problem, but the obtained table is different because the items (tasks) are sorted.
第二组:Group 2:
表10第二组实验结果Table 10 The second set of experimental results
表11第二组策略Table 11 The second group of strategies
得出的调度策略与上述现有技术关于带惩罚的单位时间任务调度的调度策略一致,本文算法计算的是最大价值,但结果是一致的。The obtained scheduling strategy is consistent with the scheduling strategy of the above-mentioned prior art regarding unit time task scheduling with penalty. The algorithm in this paper calculates the maximum value, but the results are consistent.
第三组:Group 3:
表12第三组实验结果Table 12 Results of the third group of experiments
表13第三组策略Table 13 The third group of strategies
与对文中例子的分析一致。This is consistent with the analysis of the examples in the article.
第四组:Group 4:
表14第四组实验结果Table 14 Results of the fourth group of experiments
表15第四组策略Table 15 The fourth group of strategies
通过对比可知,本文提出的算法能够在面向非单位时间的任务调度中利用约束条件给出最优调度,且性能优异。By comparison, it can be seen that the algorithm proposed in this paper can use constraints to give the optimal schedule in non-unit time task scheduling, and its performance is excellent.
本文对面向非单位时间的任务调度问题进行了详细的分析,通过对该问题的分解,根据分解结果与其他相关问题的相似性对比,将非单位时间的任务调度问题转化为相对简单的问题进行剖析,最终结合转化问题的解决方法并加以改进,提出了一种带约束条件的非单位任务调度算法。并通过实验验证了该算法能够解决问题0、问题1和问题2,能利用约束条件给出最优调度,且性能优异。该算法的时间复杂度为。应当认识到,本发明的实施例可以由计算机硬件、硬件和软件的组合、或者通过存储在非暂时性计算机可读存储器中的计算机指令来实现或实施。方法可以使用标准编程技术-包括配置有计算机程序的非暂时性计算机可读存储介质在计算机程序中实现,其中如此配置的存储介质使得计算机以特定和预定义的方式操作——根据在具体实施例中描述的方法和附图。每个程序可以以高级过程或面向对象的编程语言来实现以与计算机系统通信。然而,若需要,该程序可以以汇编或机器语言实现。在任何情况下,该语言可以是编译或解释的语言。此外,为此目的该程序能够在编程的专用集成电路上运行。This paper makes a detailed analysis of the non-unit time task scheduling problem. By decomposing the problem and comparing the decomposition results with other related problems, the non-unit time task scheduling problem is transformed into a relatively simple problem for analysis. Finally, a non-unit time task scheduling algorithm with constraints is proposed by combining the solution to the transformed problem and improving it. Experiments have verified that the algorithm can solve problems 0, 1, and 2, and can use constraints to give the optimal schedule with excellent performance. The time complexity of the algorithm is . It should be appreciated that embodiments of the present invention may be implemented or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The methods may be implemented in a computer program using standard programming techniques - including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed application-specific integrated circuit for this purpose.
此外,可按任何合适的顺序来执行本文描述的过程的操作,除非本文另外指示或以其他方式明显地与上下文矛盾。本文描述的过程(或变型和/或其组合)可在配置有可执行指令的一个或多个计算机系统的控制下执行,并且可作为共同地在一个或多个处理器上执行的代码(例如,可执行指令、一个或多个计算机程序或一个或多个应用)、由硬件或其组合来实现。计算机程序包括可由一个或多个处理器执行的多个指令。Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. A computer program includes a plurality of instructions that may be executed by one or more processors.
进一步,方法可以在可操作地连接至合适的任何类型的计算平台中实现,包括但不限于个人电脑、迷你计算机、主框架、工作站、网络或分布式计算环境、单独的或集成的计算机平台、或者与带电粒子工具或其它成像装置通信等等。本发明的各方面可以以存储在非暂时性存储介质或设备上的机器可读代码来实现,无论是可移动的还是集成至计算平台,如硬盘、光学读取和/或写入存储介质、RAM、ROM等,使得其可由可编程计算机读取,当存储介质或设备由计算机读取时可用于配置和操作计算机以执行在此所描述的过程。此外,机器可读代码,或其部分可以通过有线或无线网络传输。当此类媒体包括结合微处理器或其他数据处理器实现上文步骤的指令或程序时,本文的发明包括这些和其他不同类型的非暂时性计算机可读存储介质。当根据本发明的方法和技术编程时,本发明还包括计算机本身。Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and/or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or a portion thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the above steps in conjunction with a microprocessor or other data processor, the invention herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention also includes the computer itself.
计算机程序能够应用于输入数据以执行本文的功能,从而转换输入数据以生成存储至非易失性存储器的输出数据。输出信息还可以应用于一个或多个输出设备如显示器。在本发明优选的实施例中,转换的数据表示物理和有形的对象,包括显示器上产生的物理和有形对象的特定视觉描绘。The computer program can be applied to input data to perform the functions herein, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents physical and tangible objects, including specific visual depictions of physical and tangible objects produced on the display.
以上,只是本发明的较佳实施例而已,本发明并不局限于上述实施方式,只要其以相同的手段达到本发明的技术效果,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。在本发明的保护范围内其技术方案和/或实施方式可以有各种不同的修改和变化。The above are only preferred embodiments of the present invention. The present invention is not limited to the above embodiments. As long as the technical effects of the present invention are achieved by the same means, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention. Within the scope of protection of the present invention, its technical solutions and/or implementation methods may have various modifications and changes.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811272629.6A CN109885383B (en) | 2018-10-30 | 2018-10-30 | A Non-Unit Time Task Scheduling Method with Constraints |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811272629.6A CN109885383B (en) | 2018-10-30 | 2018-10-30 | A Non-Unit Time Task Scheduling Method with Constraints |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109885383A CN109885383A (en) | 2019-06-14 |
| CN109885383B true CN109885383B (en) | 2023-08-01 |
Family
ID=66924844
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811272629.6A Active CN109885383B (en) | 2018-10-30 | 2018-10-30 | A Non-Unit Time Task Scheduling Method with Constraints |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109885383B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113780745B (en) * | 2021-08-16 | 2024-05-14 | 华中科技大学 | A method and system for IT personnel scheduling driven by on-site service demand |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102323895A (en) * | 2011-09-02 | 2012-01-18 | 广东中大讯通软件科技有限公司 | Real-time scheduling method of embedded operating system based on STB (Set Top Box) |
| CN103514048A (en) * | 2013-10-15 | 2014-01-15 | 上海交通大学 | Sensing participation system and task distribution method of sensing participation system |
| CN103995742A (en) * | 2014-05-20 | 2014-08-20 | 万向钱潮股份有限公司 | Embedded type real-time scheduling control device and method based on MCU |
| CN106095582A (en) * | 2016-06-17 | 2016-11-09 | 四川新环佳科技发展有限公司 | The task executing method of cloud platform |
| CN106681807A (en) * | 2016-11-28 | 2017-05-17 | 中国人民解放军国防科学技术大学 | Method for parallelizing preprocessing of tasks of imaging satellites on basis of Spark |
| CN107430510A (en) * | 2015-12-31 | 2017-12-01 | 华为技术有限公司 | Data processing method, device and system |
Family Cites Families (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4750350B2 (en) * | 2003-03-13 | 2011-08-17 | パナソニック株式会社 | Task switching device, method and program |
| EP2323035B1 (en) * | 2009-11-16 | 2019-04-17 | Red Bend Software | Scheduling system |
| JP5069325B2 (en) * | 2010-03-11 | 2012-11-07 | 株式会社豊田中央研究所 | Task execution control device and program |
| CN101964752B (en) * | 2010-10-19 | 2013-02-06 | 杨忠明 | Broadband network access method for dynamically adjusting resource allocation |
| EP2751684A4 (en) * | 2011-09-02 | 2015-07-08 | Freescale Semiconductor Inc | Data processing system and method for task scheduling in a data processing system |
| CN102591721A (en) * | 2011-12-30 | 2012-07-18 | 北京新媒传信科技有限公司 | Method and system for distributing thread execution task |
| CN102867107B (en) * | 2012-08-16 | 2015-05-13 | 中国人民解放军国防科学技术大学 | Multi-imaging satellite emergency task dynamic scheduling method |
| CN103729248B (en) * | 2012-10-16 | 2017-12-15 | 华为技术有限公司 | A kind of method and apparatus of determination based on cache perception task to be migrated |
| US20150310380A1 (en) * | 2014-04-28 | 2015-10-29 | Patent Investment & Licensing Company | Dispatch system having control shared with dispatched service providers |
| CN106126326A (en) * | 2016-06-23 | 2016-11-16 | 东软集团股份有限公司 | Timing task management method and apparatus |
| US10031776B2 (en) * | 2016-11-21 | 2018-07-24 | Ca, Inc. | Workflow job distribution in a data processing system with agent time window constraints |
| CN108345501B (en) * | 2017-01-24 | 2021-10-29 | 全球能源互联网研究院有限公司 | A distributed resource scheduling method and system |
-
2018
- 2018-10-30 CN CN201811272629.6A patent/CN109885383B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102323895A (en) * | 2011-09-02 | 2012-01-18 | 广东中大讯通软件科技有限公司 | Real-time scheduling method of embedded operating system based on STB (Set Top Box) |
| CN103514048A (en) * | 2013-10-15 | 2014-01-15 | 上海交通大学 | Sensing participation system and task distribution method of sensing participation system |
| CN103995742A (en) * | 2014-05-20 | 2014-08-20 | 万向钱潮股份有限公司 | Embedded type real-time scheduling control device and method based on MCU |
| CN107430510A (en) * | 2015-12-31 | 2017-12-01 | 华为技术有限公司 | Data processing method, device and system |
| CN106095582A (en) * | 2016-06-17 | 2016-11-09 | 四川新环佳科技发展有限公司 | The task executing method of cloud platform |
| CN106681807A (en) * | 2016-11-28 | 2017-05-17 | 中国人民解放军国防科学技术大学 | Method for parallelizing preprocessing of tasks of imaging satellites on basis of Spark |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109885383A (en) | 2019-06-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2024081083A1 (en) | Workload-aware hardware architecture recommendations | |
| CN114217966A (en) | Deep learning model dynamic batch processing scheduling method and system based on resource adjustment | |
| Möhring et al. | Linear preselective policies for stochastic project scheduling | |
| Chen et al. | Fast identification of custom instructions for extensible processors | |
| JP6598981B2 (en) | Compiling the data processing graph | |
| CN106681820B (en) | Scalable big data computing method based on message composition | |
| US20220253482A1 (en) | Memory bandwidth allocation for multi-tenant fpga cloud infrastructures | |
| Memik et al. | A super-scheduler for embedded reconfigurable systems | |
| Symons et al. | Loma: Fast auto-scheduling on dnn accelerators through loop-order-based memory allocation | |
| CN107329822B (en) | Multi-core scheduling method based on hyper task network and oriented to multi-source multi-core system | |
| Norollah et al. | Efficient scheduling of dependent tasks in many-core real-time system using a hardware scheduler | |
| Wan et al. | Scheduling with variable time slot costs | |
| CN110088730B (en) | Task processing method, device, medium and equipment | |
| CN109885383B (en) | A Non-Unit Time Task Scheduling Method with Constraints | |
| Atli | Tabu search and an exact algorithm for the solutions of resource-constrained project scheduling problems | |
| US20230418667A1 (en) | Computing device for handling tasks in a multi-core processor, and method for operating computing device | |
| CN115145591B (en) | A multi-center-based medical ETL task scheduling method, system and device | |
| CN103942235B (en) | Intersect the distributed computing system and method that compare for large-scale dataset | |
| Verma et al. | Fast, nearly optimal ISE identification with I/O serialization through maximal clique enumeration | |
| CN116820713A (en) | Flow control method, accelerator and electronic equipment | |
| US11789773B2 (en) | Computing device for handling tasks in a multi-core processor, and method for operating computing device | |
| Wang | Review on hybrid flow shop scheduling | |
| Jarachanthan et al. | Acts: Autonomous cost-efficient task orchestration for serverless analytics | |
| Dadamis et al. | IgNITE: Scheduling pipeline-parallel DNN training jobs on heterogeneous infrastructures | |
| Hamidzadeb et al. | Dynamic scheduling of real-time tasks, by assignment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |