CN116010081B - Real-time system randomization task scheduling method based on-line priority reverse budget analysis - Google Patents

Real-time system randomization task scheduling method based on-line priority reverse budget analysis Download PDF

Info

Publication number
CN116010081B
CN116010081B CN202211577512.5A CN202211577512A CN116010081B CN 116010081 B CN116010081 B CN 116010081B CN 202211577512 A CN202211577512 A CN 202211577512A CN 116010081 B CN116010081 B CN 116010081B
Authority
CN
China
Prior art keywords
job
priority
time
budget
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211577512.5A
Other languages
Chinese (zh)
Other versions
CN116010081A (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.)
Dalian University of Technology
Original Assignee
Dalian University 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 Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN202211577512.5A priority Critical patent/CN116010081B/en
Publication of CN116010081A publication Critical patent/CN116010081A/en
Application granted granted Critical
Publication of CN116010081B publication Critical patent/CN116010081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Multi Processors (AREA)

Abstract

A real-time system randomization task scheduling method based on-line priority reversal budget analysis belongs to the technical field of real-time systems, and solves the problem that the randomness of the task scheduling process is limited in the existing real-time system analysis process.

Description

Real-time system randomization task scheduling method based on-line priority reverse budget analysis
Technical Field
The invention belongs to the technical field of real-time systems, and particularly relates to a randomized task scheduling method based on-line priority inversion budget analysis.
Background
The real-time system (Real Time Operating System, RTOS for short) refers to an operating system which can accept and process external events or data quickly enough, and the processing result can control the production process or make quick response to the processing system within a specified time, schedule all available resources to complete real-time tasks, and control all real-time tasks to run in coordination and in unison. Providing timely response and high reliability is a major feature.
Modern real-time systems have been widely used in critical fields of avionics, automobiles, industrial control, etc., however, as connectivity between modern real-time systems has been continuously enhanced, the use of general ready-made components has been drastically increased, and the trend of remote control through the internet has become more apparent, modern real-time systems have exposed various security defects, and thus security has become a critical consideration in real-time system design. To provide real-time critical functionality, the task scheduling of a real-time system is often predictable and its scheduling pattern is often deterministic. However, the deterministic task scheduling mode of the real-time system is a double-edged sword, which makes the system vulnerable to some external attacks, such as scheduling-based timing-side channel attacks. In order to alleviate such a problem, the security of the real-time system is improved and the real-time requirement is met, and the vulnerability of the real-time system to timing side channel attacks can be relieved by using a method based on the randomization of the scheduling process.
Scheduling randomization is a Moving object defense (Moving TARGET DEFENSE) technique that reduces the amount of information that an attacker steals by dynamically changing the order of execution of tasks during scheduling. For the periodic real-time task scheduling problem of a dynamic priority real-time system with deterministic task scheduling patterns, chen and Hasan et al studied randomized task scheduling algorithms based on worst-case priority inversion budget analysis for single-processor dynamic priority real-time systems. Compared to the earliest deadline first (EARLIEST DEADLINE FIRST) scheduling algorithm proposed by Liu and Layland et al, which analyzes the worst case priority reversal budget for a task in a task set and implements randomization of the scheduling process based on the budget, the algorithm proves to improve randomness in the scheduling process with medium to low system utilization, but as system utilization improves, randomness in the scheduling process implemented by the algorithm gradually decreases, and even in some cases of high system utilization, it is difficult to implement the randomized task scheduling process.
Analysis has found that previous scheduling randomization solutions suffer from a core drawback in that, in order to guarantee schedulability of a task set, it takes the worst-case priority reversal budget of a task by analyzing the difference between the relative deadline of the real-time task and the worst-case response time upper bound off-line, and based on that budget, achieves a priority reversal of the scheduling process at run-time, which, due to the too pessimistic and possibly even negative value of the reversal budget, results in that tasks that could otherwise be blocked by low-priority tasks are considered to be unable to be reversed by priority, which pessimistic analysis process limits the randomness of the task scheduling process.
In view of the shortcomings of the existing research schemes, the invention provides a randomized task scheduling method based on online priority inversion budget analysis, which can solve the problems by combining worst case priority inversion budget analysis and job priority inversion budget analysis to randomize the task scheduling process.
Disclosure of Invention
The application aims to solve the problem that the randomness of the task scheduling process is limited in the existing real-time system analysis process. According to some embodiments of the application, the real-time system randomization task scheduling method based on the on-line priority inversion budget analysis comprises the following steps:
S1, calculating worst-case task priority reverse budget of tasks in a task set offline according to response time upper bound analysis;
s2, distributing job priorities of tasks in the task set;
s3, acquiring the residual priority reversal budget of the ready job set according to the worst task priority reversal budget, and acquiring a conservative candidate job set according to the residual priority reversal budget of the job and the job priority;
S4, acquiring an extended ready job set according to the ready job set, and randomly selecting a job from the extended ready job set;
If the random selection job belongs to the conservation candidate job set, allocating a priority reversal budget of a first length of the random job, determining the random job as the selected random job, and executing the step S5;
If the random selection job does not belong to the conservation candidate job set, allocating a priority reversal budget of a second length of the random job, and carrying out re-judgment:
If it is further determined that the priority reversal of the random job with the priority reversal budget of the second length does not affect the schedulability of the real-time system, determining that the random job is the selected random job, and executing step S5;
If the priority inversion of the random job with the priority inversion budget of the second length affects the schedulability of the real-time system, randomly selecting the job again from the conservative candidate job set, distributing the priority inversion budget of the first length of the random job, determining the random job as the selected random job, and executing the step S5;
s5, the selected random job in the online job execution obtains the processor resource of the real-time system at the moment, and the selected random job is executed for a certain time unit.
According to some embodiments of the application, the real-time system randomized task scheduling method based on the on-line priority inversion budget analysis further comprises the following scheduling decision initiation, and the steps S2 to S5 are executed iteratively.
According to some embodiments of the application, the step S1 specifically includes: for real-time tasks τ i ordered as i, the worst execution time is C i, the period is T i, and the deadline is D i, wherein D i=Ti, the worst-case priority inverse budget V i for each task of the task set is sequentially calculated, and the method for calculating the worst-case priority inverse budget V i for the tasks τ i comprises:
s1.1. calculating a worst case upper response time bound for a task τ i in the task set Γ, expressed by:
Where a is the given job release time, By iterating the stationary point search computation, for some iterations k,Where r (k) is the execution busy interval length upper bound for task τ i, the method of calculating the execution busy interval length upper bound using the following recursive relationship is represented by:
Assuming that the task set Γ is schedulable, the r (k) sequence converges in a limited number of steps R i (a) is the response time of task τ i relative to time a, and the calculation method of R i (a) is represented by the following formula:
Ri(a)=max{Ci,Wi(a)-a}
where W i (a) is the workload of task τ i, the W i (a) calculation method is represented by:
Where I i (a) is the upper bound of interference time experienced by task τ i, the calculation of I i (a) for a given release time t=a is represented by:
Where j represents the serial number of the job, and C j represents the job T j represents job/>D j represents a period of job/>Is a deadline of (2);
S1.2, calculating a worst-case priority reversal budget V i of a task tau i, wherein the calculation method of V i is expressed by the following formula:
Vi=Di-Ri
According to some embodiments of the application, the step S2 specifically includes: and (3) adopting EDF dynamic priority allocation, and arranging the tasks of the tasks in the task set at time t according to the sequence from near to far from the absolute deadline, wherein the closer to the deadline, the higher the priority of the tasks.
According to some embodiments of the application, the step S3 specifically includes:
For a ready job set at time t Sequentially calculating the residual priority reversal budget of each ready job at the calculation time t according to the arrangement of the assigned job priorities from high to low;
Acquiring a conservative candidate job set at time t according to the residual priority reversal budgets of all ready jobs at time t
According to some embodiments of the application, the method for real-time system randomized task scheduling based on online priority inversion budget analysis in step S3 sequentially calculates the remaining priority inversion budget of each ready job at the calculation time t comprises: each ready job ordered i, worst execution time C i, absolute deadline d i at calculation time tThe remaining priority inverse budget v i, when job/>, of task τ i When released, job/>The remaining priority reversal budget is initialized to the worst-case priority reversal budget V i for task τ i, task/>When blocked by any lower priority job, job/>The remaining priority inverse budget v i of (1) decreases with each time unit until it decreases to 0;
the step S3 obtains a conservative candidate job set at time t Comprises the following steps: first the highest priority job/>Put into a conservative candidate job set and then check the remaining priority reversal budget for each job in order of priority from high to low if job/>The remaining priority inversion budget is greater than 0, then job/>Put into a conservative candidate job set until the first job/>, is encounteredA remaining priority inversion budget of 0 or less, and said first job/>Also put into the conservative candidate job set.
According to some embodiments of the application, the method for obtaining the extended ready job set in step S4 includes: defining an idle task tau idle, representing idle time in task scheduling, and not limiting execution time, period and deadline of the idle task tau idle, and operating the idle task of the idle taskReady job set/>, at join time tGet extended ready job set/>
According to some embodiments of the application, a real-time system randomization task scheduling method based on-line priority inversion budget analysis, a random job selection method, comprises:
s4.1: from an extended ready job set Job/>Wherein:
If the job is selected randomly Then randomly select job/>Is a selected random job and is assigned to a random selection job/>Length is/>Is then executed in step S5;
If the job is selected randomly Step S4.2 is performed;
Wherein the method comprises the steps of Representing job/>At the remaining execution time at time t,Representation/>Medium priority is higher than/>The minimum priority reversal budget in a job of (a), d hp represents/>Medium priority is higher than/>Job/>V hp represents the job/>Is a residual priority reversal budget for (1);
s4.2: assigning to randomly selected jobs Length is/>And determines a randomly selected job/>Whether or not the priority reversal of (a) affects the schedulability of the real-time system:
If the judgment does not affect the schedulability of the real-time system, randomly selecting the job Is a selected random job;
Otherwise from a conservative candidate job set In re-randomly selecting jobs/>Reassign/>Length ofIs performed in step S5.
According to the real-time system randomization task scheduling method based on-line priority inversion budget analysis, according to some embodiments of the present application, a randomly selected job is judgedA method of whether a priority reversal of a real-time system would affect schedulability of the system, comprising:
calculate all jobs in [ t, f i ] time frame Absolute busy interval of (2)
Wherein f i represents a jobEnd time of/>After time t, the priority is higher than the job/>Job/>C h represents the job/>T h represents job/>Cycle of/>Representing job/>The remaining execution time at time t;
If all jobs The absolute busy intervals of (a) all satisfy/>Not greater than its absolute deadline d j condition, then randomly selected job/>Is a selected random job;
Real-time system randomized task scheduling methods based on online priority reversal budget analysis according to some embodiments of the application, in online job execution, for an extended ready job set at a time t Randomly selected jobs/>, whether or not higher priority jobs are executingPreempting the current resource and setting the execution time length to/>The next scheduling decision will be at time/>Initiated at the site.
The beneficial effects are that: the invention provides a randomized task scheduling method based on-line priority inversion budget analysis, which analyzes the feasibility of priority inversion by analyzing whether the priority inversion budget allocated to a task affects the schedulability of a system on line through a randomized task scheduling scheme based on-line priority inversion budget analysis, thereby realizing real-time task scheduling with high randomness and achieving the aim of relieving time sequence side channel attack based on scheduling. The invention analyzes the worst priority reverse budget of each task in the real-time task set from the task level, acquires the conservative candidate job set, accurately analyzes the feasibility of the priority reverse budget allocated to the job outside the conservative candidate job set from the job level, and realizes the randomized scheduling process with high randomness based on the priority reverse budget of the job while meeting the real-time requirement of the system.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a scheduling diagram of a scheduling algorithm scheduling a set of tasks according to the present invention;
FIG. 3 is a graph of average scheduling entropy versus results for different scheduling algorithms performing 100 supersycles on all task sets.
Detailed Description
Embodiments of the present application are described in detail below with reference to the drawings, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. As shown in fig. 1, the randomized task scheduling method based on the online priority inversion budget analysis according to one embodiment of the application comprises the following steps:
Step 1, analyzing worst-case priority reverse budgets of offline computing tasks based on the upper bound of response time, wherein step 1 specifically comprises sequentially computing worst-case priority reverse budgets V i of each task of a task set. A method of calculating a worst case priority reversal budget V i for a real-time task τ ii ordered as i, worst execution time C i, period T i, deadline D i,Di=Ti, task τ i, comprising:
step 1.1. Calculating the worst case response time upper bound for task τ i: r i=max{Ri (a) }, Where a is the given job release time,/>Calculated by iterative stationary point search, for some iterations k,Where r (k) is the execution busy interval length upper bound for task τ i. The present invention can calculate this upper bound using the following recurrence relation:
assuming that the task set Γ is schedulable, then the r (k) sequence converges in a limited number of steps R i (a) is the response time of task τ i relative to time a, and R i (a) is calculated as R i(a)=max{Ci,Wi (a) -a, where W i (a) is the workload of task τ i, which includes:
Where I i (a) is the interference time upper bound experienced by task τ i, for a given release time t=a, the calculation method of I i (a) is:
Where j represents the serial number of the job, and C j represents the job T j represents job/>D j represents a period of job/>Is a deadline of (2).
Step 1.2. Calculate the worst case priority reverse budget for task τ i, V i, with the method of calculation V i=Di-Ri.
And 2, distributing the job priorities, wherein the step 2 specifically comprises the step of adopting an EDF dynamic priority distribution method to arrange the jobs of the tasks in the task set at time t according to the sequence from near to far from the absolute deadline, wherein the closer to the deadline, the higher the priority of the jobs.
Step 3, acquiring a conservative candidate job set based on the worst case task priority inversion budgetWherein step3 specifically comprises for the ready job set/>, at time tThe remaining priority reversal budget for each ready job is calculated in turn, arranged in order of job priority from high to low.
Wherein for jobs ordered as iThe worst execution time is C i and the absolute deadline is d i. Job/>The calculation method of the remaining priority inversion budget v i of (a) is as follows: when job/>, of task τ i When released,/>The remaining priority reversal budget is initialized to the worst-case priority reversal budget V i for task τ i, when/>When blocked by any lower priority job, v i decreases with each time unit until it decreases to 0. According to the above calculation method, the remaining priority reversal budget for each ready job at time t is calculated.
Wherein a conservative candidate job set at time t is obtained based on the remaining priority reversal budget of all ready jobs at time tThe acquisition method comprises the following steps: first the highest priority job/>Put into the conservative candidate job set, then check the remaining priority inversion budget of each job in order of priority from high to low, if the remaining priority inversion budget of the job is greater than 0, put the job into the conservative candidate job set until encountering the remaining priority inversion budget of the first job being less than or equal to 0, the job is also put into the conservative candidate job set.
Step 4, selecting random jobs, wherein step 4 specifically comprises defining an idle task τ idle, representing idle time in task scheduling, and performing idle jobs of the idle task without limiting execution time, period and deadlineReady job set/>, at join time tGet extended ready job set/>
Wherein, the random job selection process includes the following steps:
Step 4.1. From the extended Ready Job set Job/>If/>Then the job selection is successful and assigned to/>Length is/>Is a priority inversion budget of (1), wherein/>Representing job/>Remaining execution time at time t,/>Representation/>Medium priority is higher than/>The minimum priority reversal budget in a job of (a), d hp represents/>Medium priority is higher than/>Job/>V hp represents the job/>Is then performed in step 5; if/>Step 4.2 is performed.
Step 4.2. random selection operationAfter that, assign to/>Length is/>And determine job/>Whether the priority inversion of the system affects the schedulability of the system or not is judged specifically by the following steps: calculate all jobs/>, within [ t, f i ] time frameAbsolute busy interval of (2)
Wherein f i represents a jobEnd time of/>After time t, the priority is higher than the job/>Job/>C h represents the job/>T h represents job/>Cycle of/>Representing job/>The remaining execution time at time t;
If the absolute busy intervals of all jobs are satisfied If the condition is that the job selection is successful, and the priority reversal budget is available; otherwise from the conservative candidate job set/>In re-randomly selecting jobs/>Reassign/>Length is/>Is then performed in step 5.
Step 5, executing online operation, wherein the step 5 specifically comprises the following steps: for an extended ready job set at a time tRandomly selected jobs/>, whether or not higher priority jobs are executingThe current resource will be preempted and execution/>The next scheduling decision will be in time/>, in time unitsInitiated at the site.
According to the scheme, the task scheduling process randomization is realized by combining the worst-case priority reverse budget analysis and the job priority reverse budget analysis, so that the task scheduling process randomness can be greatly improved, and the real-time requirement of a system is ensured. The core of the invention is to realize the randomization of the task scheduling process under the condition that the task does not miss the deadline. When the priority reversal budget of a job allocated to a task affects the schedulability of the system, the priority reversal of the job is prohibited, and otherwise the priority reversal is permitted. Based on the analysis of the priority reversal budget on line, the priority reversal which does not affect the schedulability of the system is realized, and meanwhile, the randomness of the scheduling process is improved.
From the above, the invention provides a randomized task scheduling method based on-line priority inversion budget analysis, which analyzes the feasibility of priority inversion by analyzing whether the priority inversion budget allocated to a task affects the schedulability of a system on line through a randomized task scheduling scheme based on-line priority inversion budget analysis, thereby realizing real-time task scheduling with high randomness so as to achieve the aim of alleviating time sequence side channel attack based on scheduling. The invention analyzes the worst priority reverse budget of each task in the real-time task set from the task level, acquires the conservative candidate job set, accurately analyzes the feasibility of the priority reverse budget allocated to the job outside the conservative candidate job set from the job level, and realizes the randomized scheduling process with high randomness based on the priority reverse budget of the job while meeting the real-time requirement of the system.
In a preferred embodiment of the present invention, the method of the present invention is exemplified by a specific task set, for example, one task set includes four tasks: the period of the task τ 1 is T 1 =10, the worst execution time C 1 =4, and the deadline is D 1 =10; the period of the task τ 2 is T 2 =20, the worst execution time C 2 =1, and the deadline is D 2 =20; the period of the task τ 3 is T 3 =4, the worst execution time C 3 =1, and the deadline is D 3 =4; the period of the task τ 4 is T 4 =12, the worst execution time C 4 =2, and the deadline is D 4 =12. The task set is EDF schedulable in that the total utilization u=4/10+1/20+1/4+2/12≡86.7% <1 of the task set.
According to the flowchart shown in fig. 1, in this example, the real-time system randomization task scheduling method based on the on-line priority inversion budget analysis of the present invention includes:
Step 1. Calculating the worst-case priority inversion budget of the task offline based on the response time analysis, firstly calculating the worst-case response time upper bound R i of each task τ i, and then calculating the worst-case priority inversion budget V i of the task according to the formula V i=Di-Ri. For task τ 1, the worst-case response time upper bound R 1 =10, then its worst-case priority inversion budget V 1 =10-10=0. For task τ 2, the worst-case response time upper bound R 2 =23, its worst-case priority inversion budget V 2 =20-23= -3. For task τ 3, the worst-case response time upper bound R 3 =7, its worst-case priority inversion budget V 1 =4-7= -3. For task τ 4, the worst-case response time upper bound R 4 =14, its worst-case priority inversion budget V 4 =12-14= -2.
And step 2, distributing job priorities, namely distributing the jobs of the tasks in the task set at time t according to the sequence from near to far from the absolute deadline by adopting an EDF dynamic priority distribution method, wherein the closer the distance deadline is, the higher the priority of the jobs is. Assuming that at time t=0, the jobs of all tasks are released simultaneously, steps 2, 3,4 and 5 are iteratively performed, resulting in a randomized scheduling process.
Step 3, acquiring a conservative candidate job set based on the worst case task priority inversion budgetSince jobs of all tasks are released simultaneously at time t=0, the ready job is now set to/>The remaining priority reversal budgets of the ready job are initialized to: /(I)Due to the highest priority job/>The remaining priority inversion budget is less than 0, and therefore is not allowed/>Blocked by its low priority jobs, so the set of conservative candidates at this time is/>Conservative candidate job set/>, of subsequent new scheduling decision pointsObtained in the same manner as described above.
Step 4, selecting random job, adding the idle task into the candidate job set, and expanding the ready job set when the time t=0At this time/>From/>Job/>Because ofSo is allocated to/>Length is/>And calculates all jobs/>, within the [0, f 1 ] time frameAbsolute busy interval of (2)
Since f 1 =8, the released operation in the [0,8] time range includesIts absolute busy interval is W 2,1=18,W3,1=3,W3,2=4,W3,3=9,W4,1 =9, since the absolute busy intervals of all jobs are satisfiedConditional, so job selection is successful and the execution time budget is available.
Step 5, executing the online job, wherein the online job is selected randomlyObtain the processor resource at this point and let/>At time t=0, 2 time units are performed, the next scheduling decision is initiated at t=2.
To demonstrate randomly selected jobsThe steps 2,3, 4,5 are repeated at time t=2, which results from the difference in process.
Wherein in step 3, at time t=2, the ready job set isThe remaining priority reversal budget for each job is: /(I)Due to the highest priority job at this timeThe remaining priority inversion budget is 0, and therefore is not allowed/>Blocked by its low priority jobs, so the set of conservative candidates at this time is/>
Wherein in step 4, the idle task is added to the candidate job set, and when time t=2, the ready job set is expandedAt this time/>From/>Job/>Because/>So is allocated to/>Length is/>Is a priority inversion budget of (c). Step 5: job/>Obtain the processor resources at this point and let/>At time t=2, 1 time unit is performed, and the next scheduling decision is initiated at t=3.
And (3) in the subsequent scheduling process, performing the steps 2, 3, 4 and 5 iteratively to finally obtain a randomized scheduling process, wherein the scheduling process is shown in figure 2.
By the above, in the process of realizing the randomization scheduling of the real-time task set, the existing task scheduling algorithm has limited choice of priority inversion during operation, and the online priority inversion budget analysis method provided by the invention can allow more priority inversion, thereby greatly improving the randomness of the scheduling process.
By the method, under the condition of meeting the schedulability of the system, the time budget of the task with the reversed priority can be analyzed on line, when the priority reversing budget of the task is smaller than or equal to 0, the task is not allowed to be blocked by the low-priority task, random priority reversing without influencing the schedulability of the system is realized based on the time budget, and the randomized task scheduling process with high randomness is realized.
Verification result:
To verify the effectiveness of the present invention, a comparative experiment was conducted on a desktop computer configured as an Intel (R) Core (TM) i7-9700CPU@3.00GHz,8 Core, 16GB memory. The algorithm proposed by the invention is abbreviated as REORDER ++, and the current optimal dynamic priority scheduling algorithm and the latest randomized scheduling algorithm are selected: the EDF algorithm and REORDER algorithm serve as comparison algorithms. In the experiment, task sets are divided into 10 basic utilization groups [0.01+0.1×i,0.09+0.1×i ], i=0, 1..9 according to the utilization ratio, each basic utilization group is divided into 4 subgroups according to the number of tasks, the number of tasks of each subgroup is respectively 9, 11, 13 and 15, each subgroup randomly generates 100 task sets according to the utilization ratio, and all tasks are periodic tasks (D i=Ti) with implicit deadlines.
In order to evaluate the randomness of the scheduling process, the invention uses the scheduling entropy as an index for evaluating the randomness of the K overcycles in the scheduling process, and for two scheduling sequences with the same length, the higher scheduling entropy means the higher randomness in the scheduling process. In the experiment, the scheduling entropy of each task set in 100 supercycles with the length of H is calculatedThe calculation method of (1) is as follows:
Wherein the method comprises the steps of Representing two scheduling sequences/>And/>Pi is a given dissimilarity threshold, m is the interval length of the time series, and 1.ltoreq.m.ltoreq.H. The dissimilarity degree is calculated by the following steps: for two given vectors u= [ U i]1≤i≤m and mWhen u i noteq.vi, then pi (u i noteq.vi) =1, otherwise 0.
FIG. 3 shows the average scheduling entropy of the scheduling process implemented by the EDF scheduling algorithm using different algorithms for task sets of different utilization groups and different subgroups, and it can be seen that, as the system utilization increases, the scheduling entropy of the scheduling process implemented by the EDF scheduling algorithm is substantially 0, because the scheduling entropy of the scheduling process implemented by the REORDER scheduling algorithm increases and decreases after the scheduling entropy of the scheduling process implemented by the REORDER ++ scheduling algorithm increases with increasing utilization, because the increasing of the system utilization does not affect the accuracy degree of the job level analysis priority inversion budget, and therefore REORDER ++ has more machines to implement randomization of the scheduling process by priority inversion. According to the experimental effect comparison of the three algorithms, the REORDER ++ algorithm provided by the invention can realize higher dispatching entropy, and the randomness of the dispatching process can be effectively improved.
For purposes of this disclosure, the terms "one embodiment," "some embodiments," "example," "a particular example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
While the invention has been described with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (9)

1. A real-time system randomization task scheduling method based on-line priority inversion budget analysis is characterized by comprising the following steps:
S1, calculating worst-case task priority reverse budget of tasks in a task set offline according to response time upper bound analysis;
s2, distributing job priorities of tasks in the task set;
s3, acquiring the residual priority reversal budget of the ready job set according to the worst task priority reversal budget, and acquiring a conservative candidate job set according to the residual priority reversal budget of the job and the job priority;
S4, acquiring an extended ready job set according to the ready job set, and randomly selecting a job from the extended ready job set;
If the random selection job belongs to the conservation candidate job set, allocating a priority reversal budget of a first length of the random job, determining the random job as the selected random job, and executing the step S5;
If the random selection job does not belong to the conservation candidate job set, allocating a priority reversal budget of a second length of the random job, and carrying out re-judgment:
If it is further determined that the priority reversal of the random job with the priority reversal budget of the second length does not affect the schedulability of the real-time system, determining that the random job is the selected random job, and executing step S5;
If the priority inversion of the random job with the priority inversion budget of the second length affects the schedulability of the real-time system, randomly selecting the job again from the conservative candidate job set, distributing the priority inversion budget of the first length of the random job, determining the random job as the selected random job, and executing the step S5;
S5, the selected random job obtains the processor resource of the real-time system at the moment in the execution of the online job, and a certain time unit is executed at the selected random job;
The step S1 specifically includes: for real-time tasks τ i ordered as i, the worst execution time is C i, the period is T i, and the deadline is D i, wherein D i=Ti, the worst-case priority inverse budget V i for each task of the task set is sequentially calculated, and the method for calculating the worst-case priority inverse budget V i for the tasks τ i comprises:
s1.1. calculating a worst case upper response time bound for a task τ i in the task set Γ, expressed by:
Where a is the given job release time, By iterating the stationary point search computation, for some iterations k,Where r (k) is the execution busy interval length upper bound for task τ i, the method of calculating the execution busy interval length upper bound using the following recursive relationship is represented by:
Assuming that the task set Γ is schedulable, the r (k) sequence converges in a limited number of steps R i (a) is the response time of task τ i relative to time a, and the calculation method of R i (a) is represented by the following formula:
Ri(a)=max{Ci,Wi(a)-a}
where W i (a) is the workload of task τ i, the W i (a) calculation method is represented by:
Where I i (a) is the upper bound of interference time experienced by task τ i, the calculation of I i (a) for a given release time t=a is represented by:
Where j represents the serial number of the job, and C j represents the job T j represents job/>D j represents a period of job/>Is a deadline of (2);
S1.2, calculating a worst-case priority reversal budget V i of a task tau i, wherein the calculation method of V i is expressed by the following formula:
Vi=Di-Ri
2. the method for scheduling tasks for real-time system randomization based on online priority reversal budget analysis according to claim 1, further comprising initiating a next scheduling decision, and iteratively executing steps S2 to S5.
3. The real-time system randomized task scheduling method based on-line priority reversal budget analysis according to claim 1, wherein said step S2 specifically comprises: and (3) adopting EDF dynamic priority allocation, and arranging the tasks of the tasks in the task set at time t according to the sequence from near to far from the absolute deadline, wherein the closer to the deadline, the higher the priority of the tasks.
4. The real-time system randomized task scheduling method based on-line priority reversal budget analysis according to claim 3, wherein said step S3 specifically comprises:
For a ready job set at time t Sequentially calculating the residual priority reversal budget of each ready job at the calculation time t according to the arrangement of the assigned job priorities from high to low;
Acquiring a conservative candidate job set at time t according to the residual priority reversal budgets of all ready jobs at time t
5. The method for real-time system randomized task scheduling based on online priority reversal budget analysis according to claim 4, wherein said method for sequentially calculating the remaining priority reversal budget for each ready job at calculation time t in step S3 comprises: each ready job ordered i, worst execution time C i, absolute deadline d i at calculation time tThe remaining priority of task τ i reverses budget v i, when job/>When released, job/>The remaining priority reversal budget is initialized to the worst-case priority reversal budget V i for task τ i, task/>When blocked by any lower priority job, job/>The remaining priority inverse budget v i of (1) decreases with each time unit until it decreases to 0;
the step S3 obtains a conservative candidate job set at time t Comprises the following steps: first the highest priority job/>Put into a conservative candidate job set and then check the remaining priority reversal budget for each job in order of priority from high to low if job/>The remaining priority inversion budget is greater than 0, then job/>Put into a conservative candidate job set until the first job/>, is encounteredIs less than or equal to 0, and the first job is processedAlso put into the conservative candidate job set.
6. The method for real-time system randomized task scheduling based on online priority reversal budget analysis according to claim 5, wherein said step S4 of obtaining an extended ready job set comprises: defining an idle task tau idle, representing idle time in task scheduling, and not limiting execution time, period and deadline of the idle task tau idle, and operating the idle task of the idle taskReady job set/>, at join time tGet extended ready job set/>
7. The method for real-time system randomized task scheduling based on online priority reversal budget analysis according to claim 6, wherein the method for random job selection comprises:
s4.1: from an extended ready job set Job/>Wherein:
If the job is selected randomly Then randomly select job/>Is a selected random job and is assigned to a random selection job/>Length is/>Is then executed in step S5;
If the job is selected randomly Step S4.2 is performed;
Wherein the method comprises the steps of Representing job/>Remaining execution time at time t,/>Representation ofMedium priority is higher than/>The minimum priority reversal budget in a job of (a), d hp represents/>Medium priority is higher than/>Job/>V hp represents the job/>Is a residual priority reversal budget for (1);
s4.2: assigning to randomly selected jobs Length is/>And determines a randomly selected job/>Whether or not the priority reversal of (a) affects the schedulability of the real-time system:
If the judgment does not affect the schedulability of the real-time system, randomly selecting the job Is a selected random job;
Otherwise from a conservative candidate job set In re-randomly selecting jobs/>Reassign/>Length ofIs performed in step S5.
8. The method for real-time system randomized task scheduling based on online priority reversal budget analysis according to claim 7, wherein the decision to randomly select a jobA method of whether a priority reversal of a real-time system would affect schedulability of the system, comprising:
calculate all jobs in [ t, f i ] time frame Absolute busy interval of (2)
Wherein f i represents a jobEnd time of/>After time t, the priority is higher than the job/>Job/>C h represents the job/>T h represents job/>Cycle of/>Representing job/>The remaining execution time at time t;
If all jobs The absolute busy intervals of (a) all satisfy/>Not greater than its absolute deadline d j condition, then randomly selected job/>Is a selected random job.
9. The method for real-time system randomized task scheduling based on online priority reversal budget analysis according to claim 8, wherein for an extended ready job set at a time t in online job executionRandomly selected jobs/>, whether or not higher priority jobs are executingPreempting the current resource and setting the execution time length to/>The next scheduling decision will be at time/>Initiated at the site.
CN202211577512.5A 2022-12-05 2022-12-05 Real-time system randomization task scheduling method based on-line priority reverse budget analysis Active CN116010081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211577512.5A CN116010081B (en) 2022-12-05 2022-12-05 Real-time system randomization task scheduling method based on-line priority reverse budget analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211577512.5A CN116010081B (en) 2022-12-05 2022-12-05 Real-time system randomization task scheduling method based on-line priority reverse budget analysis

Publications (2)

Publication Number Publication Date
CN116010081A CN116010081A (en) 2023-04-25
CN116010081B true CN116010081B (en) 2024-04-30

Family

ID=86036374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211577512.5A Active CN116010081B (en) 2022-12-05 2022-12-05 Real-time system randomization task scheduling method based on-line priority reverse budget analysis

Country Status (1)

Country Link
CN (1) CN116010081B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216762B (en) * 2023-08-24 2024-03-22 大连理工大学 Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107728466A (en) * 2017-09-28 2018-02-23 华侨大学 One kind is applied to digital control system fixed priority reliability and perceives energy consumption optimization method
CN110187956A (en) * 2019-05-07 2019-08-30 中国科学院软件研究所 A kind of the layering real-time task scheduling method and system of multiple agent platform
CN111381950A (en) * 2020-03-05 2020-07-07 南京大学 Task scheduling method and system based on multiple copies for edge computing environment
CN114327829A (en) * 2021-12-30 2022-04-12 东北大学 Multi-core real-time task scheduling analysis and simulation system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004513454A (en) * 2000-11-09 2004-04-30 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Method and apparatus for determining the best case reaction time of a periodic task

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107728466A (en) * 2017-09-28 2018-02-23 华侨大学 One kind is applied to digital control system fixed priority reliability and perceives energy consumption optimization method
CN110187956A (en) * 2019-05-07 2019-08-30 中国科学院软件研究所 A kind of the layering real-time task scheduling method and system of multiple agent platform
CN111381950A (en) * 2020-03-05 2020-07-07 南京大学 Task scheduling method and system based on multiple copies for edge computing environment
CN114327829A (en) * 2021-12-30 2022-04-12 东北大学 Multi-core real-time task scheduling analysis and simulation system and method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Execution allowance based fixed priority scheduling for probabilistic real-time systems;Jiankang Ren;《Journal of Systems and Software》;20190630;第152卷;120-133 *
一种不影响任务集合可调度性的优先级映射算法;王保进;李明树;;计算机研究与发展;20060628(第06期);全文 *
基于电压岛的多核实时系统中同步任务节能调度策略研究;吴小东;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20130715;全文 *
面向动态威胁的无人机多目标三维航迹规划;周畅;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20220115;全文 *

Also Published As

Publication number Publication date
CN116010081A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
Majumdar et al. Scheduling in multiprogrammed parallel systems
Becchetti et al. Average-case and smoothed competitive analysis of the multilevel feedback algorithm
Davis et al. Optimal fixed priority scheduling with deferred pre-emption
CN116010081B (en) Real-time system randomization task scheduling method based on-line priority reverse budget analysis
Hu et al. Adaptive scheduling of task graphs with dynamic resilience
US20130205141A1 (en) Quality of Service Targets in Multicore Processors
Miglani et al. Modified particle swarm optimization based upon task categorization in cloud environment
Keleher et al. Attacking the bottlenecks of backfilling schedulers
Tsai et al. Scheduling multiple scientific and engineering workflows through task clustering and best-fit allocation
Zeng et al. Partition and scheduling of the mixed-criticality tasks based on probability
Mody et al. Smart Round Robin CPU Scheduling algorithm for operating systems
Wang et al. A novel heterogeneous scheduling algorithm with improved task priority
Djigal et al. Performance evaluation of security-aware list scheduling algorithms in IaaS cloud
CN112181661A (en) Task scheduling method
CN110969565A (en) Image processing method and device
Sirohi et al. Improvised round robin (CPU) scheduling algorithm
Marinho et al. Job phasing aware preemption deferral
Zhang et al. An Optimized Algorithm for Reduce Task Scheduling.
Simon et al. An improved half life variable quantum time with mean time slice round robin CPU scheduling (IMHLVQTRR)
Alsheikhy et al. An efficient dynamic scheduling algorithm for periodic tasks in real-time systems using dynamic average estimation
Olofintuyi et al. An Improved Time Varying Quantum Round Robin CPU Scheduling Algorithm
Hatvani et al. Optimal priority and threshold assignment for fixed-priority preemption threshold scheduling
Kuchumov et al. HPC workload balancing algorithm for co-scheduling environments
D’Souza et al. Optimal round robin CPU scheduling algorithm using euclidean distance
Wei et al. Generalized rate monotonic schedulability bounds using relative period ratios

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