[go: up one dir, main page]

CN109165089A - A kind of overload real-time system based on MaxSAT optimal solution can not preemption scheduling method - Google Patents

A kind of overload real-time system based on MaxSAT optimal solution can not preemption scheduling method Download PDF

Info

Publication number
CN109165089A
CN109165089A CN201811110298.6A CN201811110298A CN109165089A CN 109165089 A CN109165089 A CN 109165089A CN 201811110298 A CN201811110298 A CN 201811110298A CN 109165089 A CN109165089 A CN 109165089A
Authority
CN
China
Prior art keywords
task
maxsat
clause
time
scheduling
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.)
Granted
Application number
CN201811110298.6A
Other languages
Chinese (zh)
Other versions
CN109165089B (en
Inventor
廖晓鹃
张辉
黄荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Univeristy of Technology
Original Assignee
Chengdu Univeristy of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Univeristy of Technology filed Critical Chengdu Univeristy of Technology
Priority to CN201811110298.6A priority Critical patent/CN109165089B/en
Publication of CN109165089A publication Critical patent/CN109165089A/en
Application granted granted Critical
Publication of CN109165089B publication Critical patent/CN109165089B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

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

本发明公开了一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法,包括如下步骤:(S1)确定调度问题,将任务属性编码为MaxSAT硬子句;(S2)将调度目标编码为MaxSAT子句;(S3)将(S1)得到的MaxSAT硬子句和(S2)得到的MaxSAT子句,利用合取运算符进行连接,得到MaxSAT问题;(S4)通过MaxSAT解算器计算出MaxSAT问题的最优解,得到最优调度方案。本发明通过上述方案,解决了过载实时系统中存在的求解最优方案困难和效率低下问题,最终提高了目标任务调度方法的效率,从而使得本发明不仅具有很强的可扩展性和执行效率,还具有很高的实用价值和推广价值。

The invention discloses a non-preemptive scheduling method for overloaded real-time systems based on the optimal solution of MaxSAT, comprising the following steps: (S1) determining a scheduling problem, encoding task attributes as MaxSAT hard clauses; (S2) encoding scheduling objectives as MaxSAT clause; (S3) Connect the MaxSAT hard clause obtained by (S1) and the MaxSAT clause obtained by (S2) using the conjunction operator to obtain the MaxSAT problem; (S4) Calculate MaxSAT through the MaxSAT solver The optimal solution of the problem is obtained, and the optimal scheduling scheme is obtained. Through the above solution, the present invention solves the problems of difficulty in finding the optimal solution and low efficiency in the overloaded real-time system, and finally improves the efficiency of the target task scheduling method, so that the present invention not only has strong scalability and execution efficiency, but also It also has high practical value and promotion value.

Description

一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法A non-preemptive scheduling method for overloaded real-time systems based on MaxSAT optimal solution

技术领域technical field

本发明属于计算机应用领域,具体涉及一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法。The invention belongs to the field of computer application, in particular to a non-preemptive scheduling method for an overloaded real-time system based on the MaxSAT optimal solution.

背景技术Background technique

实时系统在当今的各应用领域占有重要地位,研究过载实时系统的最优调度策略在提升系统稳定性层面产生着积极影响,具有非常重要理论意义和实用价值。在正常工作负载下,经典的调度算法可以确保在截止时间之前完成所有任务,但在实际应用中,系统负载可能因工作环境的不稳定因素而发生变化,一旦系统负荷过重,便不存在任何调度算法可以在截止时间内完成所有任务,这种情况便称为系统过载。当过载问题发生时,若没有合适的调度方案来处理过载情况,将会导致系统性能急剧下降。目前针对过载实时系统的调度算法多致力于求取近似最优解,它们虽然能给出比经典调度算法更有效的调度方案,却无法确保输出的近似解能够稳定接近于最优解。针对过载实时系统,Cheng等人提出基于可满足模理论(Satisfiability Modulo Theories:SMT)的最优调度算法,但必须循环调用SMT解算器,这在一定程度上增加了计算成本,同时降低了求解效率,不利于大规模推广。Real-time systems occupy an important position in various application fields today. The study of optimal scheduling strategies for overloaded real-time systems has a positive impact on improving system stability, and has very important theoretical significance and practical value. Under normal workloads, the classical scheduling algorithm can ensure that all tasks are completed before the deadline, but in practical applications, the system load may change due to unstable factors in the working environment. Once the system is overloaded, there will be no The scheduling algorithm can complete all tasks within the deadline, a situation known as system overload. When the overload problem occurs, if there is no suitable scheduling scheme to deal with the overload situation, the system performance will drop sharply. At present, most of the scheduling algorithms for overloaded real-time systems focus on finding approximate optimal solutions. Although they can provide more efficient scheduling schemes than classical scheduling algorithms, they cannot ensure that the output approximate solutions can be stably close to the optimal solutions. For overloaded real-time systems, Cheng et al. proposed an optimal scheduling algorithm based on Satisfiability Modulo Theories (SMT), but the SMT solver must be called cyclically, which increases the computational cost to a certain extent and reduces the solution cost. Efficiency is not conducive to large-scale promotion.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法,本发明解决了过载实时系统中存在的求解最优方案困难和效率低下问题。The purpose of the present invention is to provide a non-preemptive scheduling method for overloaded real-time systems based on the MaxSAT optimal solution, and the present invention solves the problems of difficulty in finding optimal solutions and low efficiency in overloaded real-time systems.

为了实现上述目的,本发明采用的技术方案如下:In order to achieve the above object, the technical scheme adopted in the present invention is as follows:

一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法,包括如下步骤:A non-preemptive scheduling method for overloaded real-time systems based on the optimal solution of MaxSAT, comprising the following steps:

(S1)确定调度问题,将任务属性编码为MaxSAT硬子句,其中,所述任务属性编码和与之对应的MaxSAT硬子句应同时满足以下规则:(S1) Determine the scheduling problem, and encode the task attribute as a MaxSAT hard clause, wherein the task attribute encoding and the corresponding MaxSAT hard clause should satisfy the following rules at the same time:

第一种规则first rule

当一个任务τi开始于时刻t或t之后,那么该任务τi一定开始于时刻t-1或t-1之后,将该任务属性编码为如下硬子句:When a task τ i starts at time t or after t, then the task τ i must start at time t-1 or after t-1, and the task attribute is encoded as the following hard clause:

其中,是布尔变量,表示任务τi在t或t-1时刻之后开始执行,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, indicating that task τ i starts to execute after time t or t-1, c i is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks;

第二种规则second rule

当一个任务τi结束于时刻t或t之前,那么该任务τi一定结束于时刻t+1或t+1之前,将该任务属性编码为如下硬子句:When a task τ i ends before time t or t, then the task τ i must end before time t+1 or t+1, and the task attribute is encoded as the following hard clause:

其中,是布尔变量,表示任务τi在t或t时刻之前完成,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, indicating that task τ i is completed before time t or t, ci is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks;

第三种规则third rule

当一个任务τi开始于时刻t或t之后,那么该任务τi一定不能结束于t+ci-1,将该任务属性编码为如下硬子句:When a task τ i starts at time t or after t, then the task τ i must not end at t+ ci -1, and the task attribute is encoded as the following hard clause:

其中,是布尔变量,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, c i is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks;

第四种规则fourth rule

当两个任务τi和τj占用同一台处理机,且他们的执行时间段重叠,那么τi先于τj执行,或者τj先于τi执行,将该任务属性编码为如下硬子句:When two tasks τ i and τ j occupy the same processor and their execution time periods overlap, then τ i is executed before τ j , or τ j is executed before τ i , and the task attribute is encoded as the following hard sub sentence:

pri,j∨prj,i pr i,j ∨pr j,i

其中,pri,j是布尔变量,表示任务τi先于τj执行;Among them, pr i,j is a Boolean variable, indicating that the task τ i is executed before τ j ;

(S2)将调度目标编码为MaxSAT子句;(S2) encoding the scheduling target as a MaxSAT clause;

(S3)将(S1)得到的MaxSAT硬子句和(S2)得到的MaxSAT子句,利用合取运算符进行连接,得到MaxSAT问题;(S3) The MaxSAT hard clause obtained by (S1) and the MaxSAT clause obtained by (S2) are connected by a conjunction operator to obtain the MaxSAT problem;

(S4)通过MaxSAT解算器计算出MaxSAT问题的最优解,得到最优调度方案。(S4) The optimal solution of the MaxSAT problem is calculated by the MaxSAT solver, and the optimal scheduling scheme is obtained.

进一步地,所述步骤(S1)中,在同时满足四种规则的前提下,任务属性编码和与之对应的MaxSAT硬子句的规则还包括:当任务τj依赖于任务τi,那么任务τi先于任务τj执行,将该任务属性编码为如下两个硬子句:Further, in the step (S1), under the premise of satisfying the four rules at the same time, the task attribute coding and the corresponding rules of the MaxSAT hard clause also include: when the task τ j depends on the task τ i , then the task τ i is executed before task τ j , encoding the task attributes into the following two hard clauses:

pri,j pr i,j and

其中,pri,j是布尔变量,t=di-ci+1,ci是任务τi的执行时长,di是任务τi的截止时刻。Among them, p i,j are Boolean variables, t=d i -c i +1, c i is the execution time of task τ i , and d i is the deadline for task τ i .

再进一步地,所述步骤(S1)中,对于出现过的布尔变量pri,j,将其生成如下MaxSAT硬子句:Still further, in the step (S1), for the Boolean variables p i,j that have appeared, the following MaxSAT hard clauses are generated:

其中,ri+ci≤t≤di-ci+1, 是布尔变量,ci是任务τi的执行时长,di是任务τi的截止时刻。where r i +ci ≤t≤d i -ci +1 , is a Boolean variable, ci is the execution time of task τ i , and d i is the deadline for task τ i .

再进一步地,所述步骤(S2)中,调度目标满足以下任意一种类型,并将其编码为与之对应的MaxSAT子句:Further, in the step (S2), the scheduling target satisfies any one of the following types, and encodes it as the corresponding MaxSAT clause:

(1)最大化在截止时刻前完成的任务数量,将该调度目标编码为MaxSAT软子句:(1) To maximize the number of tasks completed before the deadline, encode the scheduling objective as a MaxSAT soft clause:

(2)在保证关键任务全部完成的前提下,最大化在截止时刻前完成的非关键任务的数量,将所有关键任务τk的调度目标编码为MaxSAT硬子句:(2) Under the premise of ensuring that all key tasks are completed, maximize the number of non-critical tasks completed before the deadline, and encode the scheduling objectives of all key tasks τ k as the MaxSAT hard clause:

将所有非关键任务τl的调度目标编码为MaxSAT软子句:Encode the scheduling objectives of all non-critical tasks τ l as MaxSAT soft clauses:

(3)最大化在截止时刻前完成的任务权重之和,将该调度目标编码为MaxSAT带权软子句:(3) Maximize the sum of the task weights completed before the deadline, and encode the scheduling objective as a MaxSAT weighted soft clause:

其中,wi表示完成任务τi所获得的收益。Among them, wi represents the income obtained by completing the task τ i .

具体地,所述步骤(S3)中,采用合取运算符∧将每个子句进行连接,得到MaxSAT问题。Specifically, in the step (S3), the conjunction operator ∧ is used to connect each clause to obtain the MaxSAT problem.

与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:

(1)本发明通过将任务属性和调度目标分别编码为MaxSAT硬子句和MaxSAT子句,将它们用合取运算符连接之后得到MaxSAT问题,再通过MaxSAT解算器求出最优解的调度方案,本发明在求解最优解的过程中不需要循环调用解算器,从而降低了计算成本,提高了求解效率,适于大规模推广应用;(1) The present invention encodes the task attribute and the scheduling target as the MaxSAT hard clause and the MaxSAT clause respectively, connects them with the conjunction operator to obtain the MaxSAT problem, and then obtains the scheduling of the optimal solution through the MaxSAT solver According to the solution, the present invention does not need to cyclically call the solver in the process of solving the optimal solution, thereby reducing the calculation cost, improving the solving efficiency, and being suitable for large-scale popularization and application;

(2)本发明具有很强的可扩展性和执行效率,可以用于解决多目标优化问题,适用于在较大规模的实时系统中寻求最优的调度方案,力求在系统过载情况下得到最大的效益。(2) The present invention has strong expansibility and execution efficiency, can be used to solve multi-objective optimization problems, is suitable for seeking the optimal scheduling scheme in a large-scale real-time system, and strives to obtain the maximum value in the case of system overload benefit.

附图说明Description of drawings

图1为本发明的方法流程图。FIG. 1 is a flow chart of the method of the present invention.

具体实施方式Detailed ways

下面结合附图说明和实施例对本发明作进一步说明,本发明的方式包括但不仅限于以下实施例。The present invention will be further described below with reference to the accompanying drawings and examples, and the modes of the present invention include but are not limited to the following examples.

实施例Example

如图1所示,一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法,该方法的具体步骤如下:As shown in Figure 1, a non-preemptive scheduling method for overloaded real-time systems based on the optimal solution of MaxSAT, the specific steps of the method are as follows:

步骤一:确定调度问题,将任务属性编码为MaxSAT硬子句,其中,任务属性编码和与之对应的MaxSAT硬子句应同时满足以下规则:Step 1: Determine the scheduling problem, and encode the task attribute as a MaxSAT hard clause, where the task attribute code and the corresponding MaxSAT hard clause should satisfy the following rules at the same time:

(1)当一个任务τi开始于时刻t或t之后,那么该任务τi一定开始于时刻t-1或t-1之后,将该任务属性编码为如下硬子句:(1) When a task τ i starts at time t or after t, then the task τ i must start at time t-1 or after t-1, and the task attribute is encoded as the following hard clause:

其中,是布尔变量,表示任务τi在t或t-1时刻之后开始执行,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, indicating that task τ i starts to execute after time t or t-1, c i is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks;

(2)当一个任务τi结束于时刻t或t之前,那么该任务τi一定结束于时刻t+1或t+1之前,将该任务属性编码为如下硬子句:(2) When a task τ i ends before time t or t, then the task τ i must end before time t+1 or t+1, and the task attribute is encoded as the following hard clause:

其中,是布尔变量,表示任务τi在t或t时刻之前完成,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, indicating that task τ i is completed before time t or t, ci is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks;

(3)当一个任务τi开始于时刻t或t之后,那么该任务τi一定不能结束于t+ci-1,将该任务属性编码为如下硬子句:(3) When a task τ i starts at time t or after t, then the task τ i must not end at t+ ci -1, and the task attribute is encoded as the following hard clause:

其中,是布尔变量,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, c i is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks;

(4)当两个任务τi和τj占用同一台处理机,且他们的执行时间段重叠,那么τi先于τj执行,或者τj先于τi执行,将该任务属性编码为如下硬子句:(4) When two tasks τ i and τ j occupy the same processor and their execution time periods overlap, then τ i is executed before τ j , or τ j is executed before τ i , and the task attribute is encoded as The following hard clauses:

pri,j∨prj,i pr i,j ∨pr j,i

其中,pri,j是布尔变量,表示任务τi先于τj执行;Among them, pr i,j is a Boolean variable, indicating that the task τ i is executed before τ j ;

(5)当任务τi开始于时刻t或t之后,且任务τi先于任务τj执行,那么τj必须在τi完成后才能开始执行,对于(4)~(6)中出现过的布尔变量pri,j,生成如下MaxSAT硬子句:(5) When task τ i starts at time t or after t, and task τ i is executed before task τ j , then τ j must be executed after τ i is completed. The boolean variables p i,j of , generate the following MaxSAT hard clause:

其中,ri+ci≤t≤di-ci+1, 是布尔变量,ci是任务τi的执行时长,di是任务τi的截止时刻。where r i +ci ≤t≤d i -ci +1 , is a Boolean variable, ci is the execution time of task τ i , and d i is the deadline for task τ i .

本实施例中,基于上述规则,所述步骤一中,在同时满足上述五种规则的前提下,任务属性编码和与之对应的MaxSAT硬子句的规则还包括:In the present embodiment, based on the above-mentioned rules, in the step 1, under the premise that the above-mentioned five kinds of rules are satisfied at the same time, the rules of the task attribute coding and the corresponding MaxSAT hard clauses also include:

(6)当任务τj依赖于任务τi,那么任务τi先于任务τj执行,将该任务属性编码为如下两个硬子句:(6) When task τ j depends on task τ i , then task τ i is executed before task τ j , and the task attribute is encoded as the following two hard clauses:

pri,j pr i,j and

其中,t=di-ci+1,ci是任务τi的执行时长,di是任务τi的截止时刻。Among them, t=d i -c i +1, c i is the execution time of task τ i , and d i is the deadline of task τ i .

步骤二:将调度目标编码为MaxSAT子句,其中,调度目标满足如下任意一种类型:Step 2: Encode the scheduling target as a MaxSAT clause, where the scheduling target satisfies any one of the following types:

针对调度目标(a1):最大化在截止时刻前完成的任务数量,将调度目标编码为MaxSAT如下软子句:For the scheduling objective (a1): to maximize the number of tasks completed before the deadline, the scheduling objective is encoded as the MaxSAT soft clause as follows:

针对调度目标(a2):在保证关键任务全部完成的前提下,最大化在截止时刻前完成的非关键任务的数量,其中:For scheduling objective (a2): Maximize the number of non-critical tasks completed before the deadline under the premise of ensuring that all critical tasks are completed, where:

将所有关键任务τk的调度目标编码为MaxSAT硬子句:Encode the scheduling objectives of all critical tasks τ k as MaxSAT hard clauses:

将所有非关键任务τl的调度目标编码为MaxSAT软子句:Encode the scheduling objectives of all non-critical tasks τ l as MaxSAT soft clauses:

针对调度目标(a3):最大化在截止时刻前完成的任务权重之和,将调度目标编码为MaxSAT带权软子句:For the scheduling objective (a3): maximize the sum of the task weights completed before the deadline, encode the scheduling objective as a MaxSAT weighted soft clause:

其中,wi表示完成任务τi所获得的收益。Among them, wi represents the income obtained by completing the task τ i .

步骤三:将步骤一得到的MaxSAT硬子句和步骤二得到的MaxSAT子句,利用合取运算符进行连接,得到MaxSAT问题。具体地,将每个子句用合取运算符∧进行连接,得到的就是MaxSAT问题;Step 3: Use the conjunction operator to connect the MaxSAT hard clause obtained in step 1 and the MaxSAT clause obtained in step 2 to obtain the MaxSAT problem. Specifically, connect each clause with the conjunction operator ∧ to get the MaxSAT problem;

步骤四:通过MaxSAT解算器计算出MaxSAT问题的最优解,最优解包含了每个任务分片的开始执行时刻,由此可以得到最优调度方案。Step 4: Calculate the optimal solution of the MaxSAT problem through the MaxSAT solver. The optimal solution includes the start execution time of each task fragment, so that the optimal scheduling scheme can be obtained.

本发明通过上述方案,解决现有技术中存在的求解最优方案困难和效率低下的问题,使得本发明不仅具有很强的可扩展性和执行效率,还具有很高的实用价值和推广价值。Through the above solution, the present invention solves the problems of difficulty in finding the optimal solution and low efficiency in the prior art, so that the present invention not only has strong scalability and execution efficiency, but also has high practical value and promotion value.

上述实施例仅为本发明的优选实施方式之一,不应当用于限制本发明的保护范围,但凡在本发明的主体设计思想和精神上作出的毫无实质意义的改动或润色,其所解决的技术问题仍然与本发明一致的,均应当包含在本发明的保护范围之内。The above-mentioned embodiment is only one of the preferred embodiments of the present invention, and should not be used to limit the protection scope of the present invention. If the technical problem is still consistent with the present invention, it should be included within the protection scope of the present invention.

Claims (5)

1.一种基于MaxSAT最优解的过载实时系统不可抢占式调度方法,其特征在于,包括如下步骤:1. a non-preemptive scheduling method based on the overload real-time system of MaxSAT optimal solution, is characterized in that, comprises the steps: (S1)确定调度问题,将任务属性编码为MaxSAT硬子句,其中,所述任务属性编码和与之对应的MaxSAT硬子句应同时满足以下规则:(S1) Determine the scheduling problem, and encode the task attribute as a MaxSAT hard clause, wherein the task attribute encoding and the corresponding MaxSAT hard clause should satisfy the following rules at the same time: 第一种规则first rule 当一个任务τi开始于时刻t或t之后,那么该任务τi一定开始于时刻t-1或t-1之后,将该任务属性编码为如下硬子句:When a task τ i starts at time t or after t, then the task τ i must start at time t-1 or after t-1, and the task attribute is encoded as the following hard clause: 其中,是布尔变量,表示任务τi在t或t-1时刻之后开始执行,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, indicating that task τ i starts to execute after time t or t-1, c i is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks; 第二种规则second rule 当一个任务τi结束于时刻t或t之前,那么该任务τi一定结束于时刻t+1或t+1之前,将该任务属性编码为如下硬子句:When a task τ i ends before time t or t, then the task τ i must end before time t+1 or t+1, and the task attribute is encoded as the following hard clause: 其中,是布尔变量,表示任务τi在t或t时刻之前完成,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, indicating that task τ i is completed before time t or t, ci is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks; 第三种规则third rule 当一个任务τi开始于时刻t或t之后,那么该任务τi一定不能结束于t+ci-1,将该任务属性编码为如下硬子句:When a task τ i starts at time t or after t, then the task τ i must not end at t+ ci -1, and the task attribute is encoded as the following hard clause: 其中,是布尔变量,ci是任务τi的执行时长,di是任务τi的截止时刻,n是系统任务的总数;in, is a Boolean variable, c i is the execution time of task τ i , d i is the deadline for task τ i , and n is the total number of system tasks; 第四种规则fourth rule 当两个任务τi和τj占用同一台处理机,且他们的执行时间段重叠,那么τi先于τj执行,或者τj先于τi执行,将该任务属性编码为如下硬子句:When two tasks τ i and τ j occupy the same processor and their execution time periods overlap, then τ i is executed before τ j , or τ j is executed before τ i , and the task attribute is encoded as the following hard sub sentence: pri,j∨prj,i pr i,j ∨pr j,i 其中,pri,j是布尔变量,表示任务τi先于τj执行;Among them, pr i,j is a Boolean variable, indicating that the task τ i is executed before τ j ; (S2)将调度目标编码为MaxSAT子句;(S2) encoding the scheduling target as a MaxSAT clause; (S3)将(S1)得到的MaxSAT硬子句和(S2)得到的MaxSAT子句,利用合取运算符进行连接,得到MaxSAT问题;(S3) The MaxSAT hard clause obtained by (S1) and the MaxSAT clause obtained by (S2) are connected by a conjunction operator to obtain the MaxSAT problem; (S4)通过MaxSAT解算器计算出MaxSAT问题的最优解,得到最优调度方案。(S4) The optimal solution of the MaxSAT problem is calculated by the MaxSAT solver, and the optimal scheduling scheme is obtained. 2.根据权利要求1所述的基于MaxSAT最优解的过载实时系统不可抢占式调度方法,其特征在于,所述步骤(S1)中,在同时满足四种规则的前提下,任务属性编码和与之对应的MaxSAT硬子句的规则还包括:当任务τj依赖于任务τi,那么任务τi先于任务τj执行,将该任务属性编码为如下两个硬子句:2. the non-preemptive scheduling method of overload real-time system based on MaxSAT optimal solution according to claim 1, is characterized in that, in described step (S1), under the premise of satisfying four kinds of rules simultaneously, task attribute coding and The corresponding rules of MaxSAT hard clauses also include: when task τ j depends on task τ i , then task τ i is executed before task τ j , and the task attributes are encoded as the following two hard clauses: pri,j pr i,j and 其中,pri,j是布尔变量,t=di-ci+1,ci是任务τi的执行时长,di是任务τi的截止时刻。Among them, p i,j are Boolean variables, t=d i -c i +1, c i is the execution time of task τ i , and d i is the deadline for task τ i . 3.根据权利要求1~2中任意一项所述的基于MaxSAT最优解的过载实时系统不可抢占式调度方法,其特征在于,所述步骤(S1)中,对于出现过的布尔变量pri,j,将其生成如下MaxSAT硬子句:3. the non-preemptive scheduling method for overloaded real-time systems based on the MaxSAT optimal solution according to any one of claims 1 to 2, characterized in that, in the step (S1), for the Boolean variable p i that has occurred ,j , which generates the following MaxSAT hard clause: 其中,ri+ci≤t≤di-ci+1, 是布尔变量,ci是任务τi的执行时长,di是任务τi的截止时刻。where r i +ci ≤t≤d i -ci +1 , is a Boolean variable, ci is the execution time of task τ i , and d i is the deadline for task τ i . 4.根据权利要求1所述的基于MaxSAT最优解的过载实时系统不可抢占式调度方法,其特征在于,所述步骤(S2)中,调度目标满足以下任意一种类型,并将其编码为与之对应的MaxSAT子句:4. the non-preemptive scheduling method of overload real-time system based on MaxSAT optimal solution according to claim 1, is characterized in that, in described step (S2), scheduling target satisfies any one of following types, and it is coded as The corresponding MaxSAT clause: (1)最大化在截止时刻前完成的任务数量,将该调度目标编码为MaxSAT软子句:(1) To maximize the number of tasks completed before the deadline, encode the scheduling objective as a MaxSAT soft clause: (2)在保证关键任务全部完成的前提下,最大化在截止时刻前完成的非关键任务的数量,将所有关键任务τk的调度目标编码为MaxSAT硬子句:(2) Under the premise of ensuring that all key tasks are completed, maximize the number of non-critical tasks completed before the deadline, and encode the scheduling objectives of all key tasks τ k as the MaxSAT hard clause: 将所有非关键任务τl的调度目标编码为MaxSAT软子句:Encode the scheduling objectives of all non-critical tasks τ l as MaxSAT soft clauses: (3)最大化在截止时刻前完成的任务权重之和,将该调度目标编码为MaxSAT带权软子句:(3) Maximize the sum of the task weights completed before the deadline, and encode the scheduling objective as a MaxSAT weighted soft clause: 其中,wi表示完成任务τi所获得的收益。Among them, wi represents the income obtained by completing the task τ i . 5.根据权利要求1所述的基于MaxSAT最优解的过载实时系统不可抢占式调度方法,其特征在于,所述步骤(S3)中,采用合取运算符∧将每个子句进行连接,得到MaxSAT问题。5. the non-preemptive scheduling method of overload real-time system based on MaxSAT optimal solution according to claim 1, is characterized in that, in described step (S3), adopt conjunction operator ∧ to connect each clause, obtain MaxSAT questions.
CN201811110298.6A 2018-09-21 2018-09-21 A non-preemptive scheduling method for overloaded real-time systems based on MaxSAT optimal solution Expired - Fee Related CN109165089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811110298.6A CN109165089B (en) 2018-09-21 2018-09-21 A non-preemptive scheduling method for overloaded real-time systems based on MaxSAT optimal solution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811110298.6A CN109165089B (en) 2018-09-21 2018-09-21 A non-preemptive scheduling method for overloaded real-time systems based on MaxSAT optimal solution

Publications (2)

Publication Number Publication Date
CN109165089A true CN109165089A (en) 2019-01-08
CN109165089B CN109165089B (en) 2021-10-29

Family

ID=64880028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811110298.6A Expired - Fee Related CN109165089B (en) 2018-09-21 2018-09-21 A non-preemptive scheduling method for overloaded real-time systems based on MaxSAT optimal solution

Country Status (1)

Country Link
CN (1) CN109165089B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134501A (en) * 2019-04-25 2019-08-16 成都理工大学 A scheduling method for overloaded real-time system based on SMT optimal solution

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6031984A (en) * 1998-03-09 2000-02-29 I2 Technologies, Inc. Method and apparatus for optimizing constraint models
CN101887383A (en) * 2010-06-30 2010-11-17 中山大学 A real-time process scheduling method
US20160275224A1 (en) * 2015-03-20 2016-09-22 Arani Sinha Apparatus and method for generating a reduced number of test vectors and inserting test points for a logic circuit
CN107589993A (en) * 2017-08-15 2018-01-16 郑州云海信息技术有限公司 A kind of dynamic priority scheduling algorithm based on linux real time operating systems
CN108256649A (en) * 2018-01-16 2018-07-06 成都理工大学 A kind of coalition structure forming method based on MaxSAT optimal solutions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6031984A (en) * 1998-03-09 2000-02-29 I2 Technologies, Inc. Method and apparatus for optimizing constraint models
CN101887383A (en) * 2010-06-30 2010-11-17 中山大学 A real-time process scheduling method
US20160275224A1 (en) * 2015-03-20 2016-09-22 Arani Sinha Apparatus and method for generating a reduced number of test vectors and inserting test points for a logic circuit
CN107589993A (en) * 2017-08-15 2018-01-16 郑州云海信息技术有限公司 A kind of dynamic priority scheduling algorithm based on linux real time operating systems
CN108256649A (en) * 2018-01-16 2018-07-06 成都理工大学 A kind of coalition structure forming method based on MaxSAT optimal solutions

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134501A (en) * 2019-04-25 2019-08-16 成都理工大学 A scheduling method for overloaded real-time system based on SMT optimal solution
CN110134501B (en) * 2019-04-25 2023-03-31 成都理工大学 Scheduling method of overload real-time system based on SMT optimal solution

Also Published As

Publication number Publication date
CN109165089B (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN111737954B (en) Text similarity determination method, device, equipment and medium
CN110070178A (en) A kind of convolutional neural networks computing device and method
CN110336643B (en) A data processing method based on edge computing environment
CN102110158B (en) Multi-join query optimization method for database based on improved SDD-1 (System for Distributed Database) algorithm
CN107729241A (en) A kind of software mutation testing data evolution generation method based on variant packet
CN109165089B (en) A non-preemptive scheduling method for overloaded real-time systems based on MaxSAT optimal solution
CN102289408A (en) regression test case sequencing method based on error propagation network
CN109358954B (en) A Preemptive Scheduling Method for Overloaded Real-time Systems Based on MaxSAT Optimal Solution
CN115617395A (en) A Smart Contract Similarity Detection Method Fused with Global and Local Features
CN108427773B (en) A Distributed Knowledge Graph Embedding Method
CN118823489A (en) Image classification method, device and equipment based on multi-scale attention mechanism
CN111158898B (en) BIM data processing method and device aiming at power transmission and transformation project site arrangement standardization
CN108330896A (en) A kind of reservoir dispatching method and system
CN108256649A (en) A kind of coalition structure forming method based on MaxSAT optimal solutions
CN115482147B (en) Efficient parallel graph processing method and system based on compressed data direct calculation
CN116842428A (en) An abnormal merchant classification method and device
CN117131160A (en) Intelligent query response interactive information mining method and system based on artificial intelligence
CN110134501B (en) Scheduling method of overload real-time system based on SMT optimal solution
CN114331711A (en) Block chain transaction parallel execution method and device based on associated semantics
CN116266275A (en) Deep convolutional neural network pruning method and device, electronic equipment and medium
CN105512087B (en) Reliability evaluation method of resource-constrained multi-node computing system
CN113034343A (en) Parameter-adaptive hyperspectral image classification GPU parallel method
CN111523054A (en) Project recommendation method and system based on active account and similar accounts
CN110233624A (en) Data reconstruction method based on distributed compression perception
Yang et al. Computing Power Scheduling Method Based on Long-Term Workload Prediction for Computing Power Platform

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211029