CN117216762B - Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium - Google Patents

Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN117216762B
CN117216762B CN202311074754.7A CN202311074754A CN117216762B CN 117216762 B CN117216762 B CN 117216762B CN 202311074754 A CN202311074754 A CN 202311074754A CN 117216762 B CN117216762 B CN 117216762B
Authority
CN
China
Prior art keywords
task
time
test
tau
real
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
CN202311074754.7A
Other languages
Chinese (zh)
Other versions
CN117216762A (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 CN202311074754.7A priority Critical patent/CN117216762B/en
Publication of CN117216762A publication Critical patent/CN117216762A/en
Application granted granted Critical
Publication of CN117216762B publication Critical patent/CN117216762B/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

  • Debugging And Monitoring (AREA)

Abstract

A safe perception real-time task scheduling method, electronic equipment and a computer readable storage medium based on online priority inversion budget analysis belong to the field of real-time system safety, and are used for solving the problems of reducing the proportion of unreliable tasks in AEW and having square time complexity; the current resource is preempted and executed by the task of the feasibility test, and the effect is that the trusted and untrusted tasks are effectively selected for scheduling, the attack success rate is reduced while the schedulability of the system is ensured, the proportion of the untrusted tasks in the AEW is reduced to the greatest extent, and the square time complexity is realized.

Description

Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium
Technical Field
The invention belongs to the field of real-time system safety, and particularly relates to an efficient safety perception real-time task scheduling method based on-line priority inversion budget analysis for a fixed-priority real-time system.
Background
Real-time systems are widely used in many safety critical areas, such as automotive and avionics, medical equipment, and industrial robots, to provide critical functions. To ensure real-time computation, the execution of these systems must have predictable and deterministic characteristics. However, such predictability and deterministic execution patterns are susceptible to scheduling-based attacks. Such attacks utilize deterministic execution patterns of the real-time system, capturing certain time characteristics of the system, and potentially launching more targeted attacks. For example, an attacker may destroy the stability of the system by injecting dummy data, or destroy the function of the vehicle by controlling the system signals. Therefore, implementing an effective security scheduling policy in a real-time system, aiming at effectively preventing attack based on scheduling on the premise of meeting the real-time requirement, is very important.
The success rate of a dispatch-based attack typically depends on whether the attacker task is executing within an attack availability window (Attack effective window, AEW for short) that is related to the execution state of the attacked task. Son et al in 2006 proposed an open-ended work of information leakage due to predictable execution patterns of real-time systems. Thereafter, for dispatch-based attacks, a great deal of literature is presented for defense based on randomized dispatch methods. These methods prevent an attacker from predicting the task execution state by increasing the time uncertainty of the real-time task. However, in many cases, randomization-based approaches may not be resistant to scheduling-based attacks, as they may increase the probability of performing the attack task within the effective attack window. To prevent untrusted tasks from being executed during the attack validation window, chen et al propose an overlay-oriented scheduling policy that defends against scheduling-based post-attacks by preventing as much as possible the execution of untrusted tasks immediately after the completion of the attacked task. The algorithm proves to be able to reduce the proportion of untrusted tasks within the AEW compared to RM scheduling strategies. But the defensive effect of the scheduling policy is still poor because the scheduling policy ignores the limitations of the system protection capability and the pessimistic nature of the maximum tolerable blocking time of the offline computation. Any health et al propose a safe perception real-time task scheduling method based on busy interval analysis, which reduces the proportion of untrustworthy in AEW, but the method has higher time complexity and is difficult to be used in a system with higher real-time requirement.
Disclosure of Invention
To address the problem of reducing the proportion of untrusted tasks within an AEW and having squared time complexity, a security aware real-time task scheduling method based on online priority reversal budget analysis according to some embodiments of the present application includes the steps of:
step 1: offline calculating the maximum protection window length of the attacked task;
step 2: calculating the maximum delay time of the real-time task offline;
step 3: according to the maximum protection window length, determining tasks for feasibility test in the ready queue on line;
step 4: calculating the priority reversal budget of the test task on line according to the maximum delay time, and judging the test feasibility of the task according to the priority reversal budget of the test task calculated on line;
step 5: the task passing the feasibility test preempts and executes the current resource.
According to some embodiments of the present application, a security aware real-time task scheduling method based on online priority inversion budget analysis, for a task set Γ and an attacked task τ in step 1 v The attacked task tau v Maximum guard window length of (2)Is expressed by the following formula:
wherein T is v Representing an attacked task τ v U is the period of (1) i Representing an attacked task tau i Is used for (a)Rate u v Representing an attacked task τ v And the utilization rate of Γ untrust Is the set of all untrusted tasks within the task set Γ.
According to some embodiments of the present application, a method for secure aware real-time task scheduling based on-line priority inversion budget analysis, step 2, for real-time tasks τ ordered as k k Maximum delay time V of (2) k Is expressed by the following formula:
V k =argmax(W k (ω))≤d k
wherein d k Representing real-time task τ k Is W k (omega) represents real-time task τ k Busy interval at priority reversal length ω;
wherein the real-time task τ k Busy interval W of (2) k From busy intervalsIterative calculation until convergence, the obtained busy interval is busy interval W k M represents the number of iterations, wherein the busy interval W k Is expressed by the following formula:
in the method, in the process of the invention,C k representing real-time task τ k Worst execution time of->Representing time t to real-time task tau j The length of the first deadline after time t, C j Representing task τ j Worst execution time of T j Representing task τ j Is of the period hp (τ) k ) Representation->Inner high-qualityFirst order task->Representing real-time task τ k Relative deadlines at time t, task τ j Belonging to hp (tau) k ) Is a task in (a).
According to the safety perception real-time task scheduling method based on the online priority inversion budget analysis, which is provided by some embodiments of the application, the current scheduling time t is within the length of the maximum protection window, and the trusted task in the ready queue is determined to be a feasibility test task;
the current scheduling time t is within the length of the maximum protection window, and the thread queue does not have a trusted task, and the idle task in the ready queue is determined to be a feasibility test task;
and determining the untrusted traffic in the ready queue as the feasibility test task when the current scheduling time t is not within the maximum protection window length.
According to some embodiments of the present application, a security aware real-time task scheduling method based on online priority inversion budget analysis, the current scheduling time t is within a maximum protection window, and is represented by the following formula:
wherein f v Representing an attacked task τ v The completion time of the last job completed before time t,indicating the maximum guard window length.
According to some embodiments of the present application, the step 4 specifically includes:
step 4.1: calculation ofInner high priority task hp (tau) k ) For the current task tau k Interference upper bound->Task τ k Indicating a priority higher than the test task tau test Is a task of (1);
step 4.2: according to the maximum delay time V k Upper boundary of interferenceOn-line computing priority higher than test task tau test Current task τ k Priority reversal budget ∈>
Step 4.3: according to the current task tau k Is used for judging the current task tau through the online priority inversion budget k Is feasible for testing;
step 4.3.1: if judging the current task tau k Meeting priority reversal budgetCurrent task τ k The completion time of the test task tau does not exceed the deadline test Execution at time t will not destroy the current task τ k Step 4.3.2 is performed;
if judging the current task tau k Unsatisfied priority inversion budgetThe feasibility test is judged to be ended, and the task tau is tested test Failed feasibility test, test task τ test Information affecting the schedulability of the task set;
step 4.3.2: for tasks tau with priority lower than the current one k But higher than test task tau test Is taken as tau k Steps 4.1, 4.2 and 4.3.1 are performed until the current task τ k Has been a higher priority than the test task tau test Task of (2)Set hp (tau) test ) If the task with the lowest priority is the feasibility test judgment is finished, testing the task tau test Through feasibility test, test task τ test Information that does not affect the schedulability of the task set.
According to some embodiments of the present application, a security aware real-time task scheduling method based on online priority inversion budget analysis calculatesInner high priority task hp (tau) k ) For real-time task tau k Interference upper bound->Is expressed by the following formula:
in the method, in the process of the invention,representing real-time task τ k Relative deadlines at time t, real-time task τ k Is hp (tau) test ) In (c) tasks, hp (τ) k ) Representing priority over real-time task tau k Task set, task tau j Is hp (tau) k ) Task in->Representing task τ j The remaining execution time at time t, +.>Representing time t to task τ j The length of the first deadline after the time t, representing task τ j The last arrival time before time t, +.>Representing time t to real-time task tau k The length of the first deadline after time t,/-> Representing real-time task τ k Last arrival time before time T, T k Representing real-time task τ k Is a period of (2);
on-line computing priority higher than test task tau test Task τ k Priority reversal budget for (c)Is expressed by the following formula:
in the method, in the process of the invention,representing task τ k Is the remaining execution time at time t +.>Representing task τ k Is an absolute off-time at time t.
According to some embodiments of the present application, a security aware real-time task scheduling method based on-line priority reversal budget analysis, in step 5,
if the test task passes the feasibility test, the test task passing the feasibility test preempts the current resource and executes omega time units;
if the task fails the feasibility test, executing omega time units by the task with the highest priority in the ready queue, and initiating the next scheduling decision at the time t=t+omega to repeatedly execute the steps 3-5;
wherein:
denoted τ test The remaining execution time at time t.
The embodiment of the application also provides electronic equipment, which comprises: one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory, the one or more programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform any of the possible technical solutions of the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, which comprises a computer program, when the computer program runs on the electronic device, the electronic device is caused to execute the technical scheme of any possible design in the embodiment of the application.
The beneficial effects are that:
in the first aspect, the invention can effectively select trusted and untrusted tasks to schedule according to the execution state of the attacked task, reduce the attack success rate while ensuring the schedulability of the system, furthest reduce the proportion of the untrusted tasks in the AEW and have square time complexity.
In a second aspect, the present invention characterizes the system protection capability limitation through the protection window for the scheduling-based attack in the fixed priority real-time system, and can minimize the proportion of the unreliable tasks in the effective attack window for the system with uncertain effective attack window length.
In the third aspect, the invention performs feasibility test on line based on priority inversion budget analysis, so as to achieve the aim of greatly reducing the proportion of unreliable tasks in AEW and ensuring the real-time requirement of the system, and greatly reduces the algorithm time complexity compared with the existing safety perception scheduling algorithm.
In the fourth aspect, compared with the computer task safety scheduling strategy based on the judgment of the task feasibility of the busy interval, the method has the defect of high calculation complexity and longer time occupied by the CPU because the busy interval is iteratively calculated at each scheduling moment and then the task feasibility is judged according to the busy interval. Compared with a busy interval strategy, the method is a computer task safety scheduling strategy for judging the feasibility of the task based on the online priority reversal budget, and the priority reversal budget is calculated online at each scheduling moment, so that iterative calculation is not needed, and the calculation complexity is reduced.
In the fifth aspect, with respect to the offline priority inversion budget, only the period and the worst running time are considered, and the calculation is the task level calculation, but if the priority inversion budget is applied online, the calculation is the job level calculation, and the factors such as the execution condition of the task at the current moment are considered, the online priority inversion budget model which can adapt to the task scheduling can be accurately made.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a scheduling diagram of a scheduling method of the present invention for scheduling a set of tasks; (a) is aew=10, (b) is aew=30, and (c) is aew=50.
FIG. 3 is a graph of the comparison of the proportion of untrusted traffic within the average AEW for one cycle of execution of a different scheduling method for all task sets.
Fig. 4 shows attack success rates of schedulleak under different scheduling methods.
Fig. 5 is a diagram of scheduler overhead for different scheduling algorithms.
Detailed Description
The invention will be further described with reference to the accompanying drawings.
Example 1: a safety perception real-time task scheduling method based on-line priority inversion budget analysis comprises the following steps:
step 1: off-line calculation of maximum protection window length
Due to the limited and schedulability limitations of trusted tasks in the task set, the scheduling policy has limited protection against attacked tasks due to schedulability limitations. The present invention therefore proposes the concept of a maximum protection window to characterize the protection capabilities of the system.
For the task set Γ and the attacked task τ v The attacked task tau v Maximum guard window length of (2)The method comprises the following steps:
T v is the attacked task tau v U is the period of (1) i Is the attacked task tau i U v Representing an attacked task τ v And the utilization rate of Γ untrust Is the set of all untrusted tasks within the task set Γ.
Step 2: off-line calculation of maximum delay time V k
For a real-time task τ ordered as k k Maximum delay time V of (2) k Is expressed by the following formula:
V k =argmax(W k (ω))≤d k
wherein d k Representing real-time task τ k Is W k (omega) represents real-time task τ k Busy interval with priority reversal length omega, real-time task tau k Busy interval W of (2) k Is expressed by the following formula:
to busy intervalIterative calculation until convergence, the obtained busy interval is busy interval W k M represents the number of iterations;
in the method, in the process of the invention,C k representing real-time task τ k Worst execution time of->Representing time t to real-time task tau j The length of the first deadline after time t, C j Representing task τ j Worst execution time of T j Representing task τ j Is of the period hp (τ) k ) Representation->Internal high priority task, task tau j Belonging to hp (tau) k ) Is a task in (a).
Step 3: test task selection
The method selects a trusted task or an untrusted task or an idle task in a ready queue to perform feasibility test according to whether the current scheduling time t is within the length of the maximum protection window.
The current scheduling time t is within the length of the maximum protection window, and a trusted task in a ready queue is selected as a feasibility test task;
the current scheduling time t is within the length of the maximum protection window, trusted tasks are not arranged in the thread queue, and idle tasks in the ready queue are selected as feasibility test tasks;
the current scheduling time t is not within the length of the maximum protection window, and an untrusted task in a ready queue is selected as a feasibility test task;
furthermore, idle task τ idle Will be incorporated into the selection process and the idle tasks represent idle time in the task schedule without limiting its execution time, period and deadline.
Wherein τ k Represents any task that needs to be traversed, τ v Representing the task under attack τ j Is a priority ratio tau k High tasks;
the current scheduling time t is within the maximum protection window and is expressed by the following formula:
f in v Representing an attacked task τ v The completion time of the last job completed before time t,indicating the maximum guard window length.
The method can select the trusted task with the highest priority in the ready queue for carrying out the feasibility test, and if the trusted task does not exist in the ready queue, the method can select the idle task for carrying out the feasibility test. If the current scheduling time is not within the maximum protection window, the method can select the unreliable task with the highest priority in the ready queue to perform the feasibility test, if the unreliable task does not exist in the ready queue, the method can judge whether the attacked task is in the ready queue, if the attacked task is in the ready queue, the attacked task is selected to perform the feasibility test, otherwise, the task with the highest priority in the ready queue is selected to perform the feasibility test.
Step 4: calculating the priority reversal budget of the test task on line, and carrying out feasibility test on the test task according to the priority reversal budget of the test task calculated on line:
to ensure schedulability of the real-time system, the method will test the task τ test The feasibility test (i.e. the task selected in the second step) is performed at time t. τ test The feasibility test of (2) comprises the following steps:
step 4.1: calculation ofInner high priority task hp (tau) k ) For real-time task tau k Interference upper bound->Is expressed by the following formula:
in the method, in the process of the invention,representing real-time task τ k Relative deadlines at time t, real-time task τ k Is hp (tau) test ) In (c) tasks, hp (τ) k ) Representing priority over real-time task tau k Task set, task tau j Is hp (tau) k ) Task in->Representing task τ j The remaining execution time at time t, +.>Representing time t to task τ j The length of the first deadline after the time t, representing task τ j The last arrival time before time t, +.>Representing time t to real-time task tau k The length of the first deadline after time t,/-> Representing real-time task τ k Last arrival time before time T, T k Representing real-time task τ k Is a periodic one.
Step 4.2: on-line computing priority higher than test task tau test Task τ k Priority reversal budget for (c)The calculation method comprises the following steps:
wherein,is task tau k Is the remaining execution time at time t +.>Is task tau k Is an absolute off-time at time t.
Step 4.3: and judging feasibility.
Task τ k Indicating a priority higher than the test task tau test Task of (2)
If for task tau k Satisfy the following requirementsI.e. task tau k The completion time of (1) does not exceed its deadline, the task tau is tested test Execution at time t will not destroy task τ k Is then prioritized below task tau k But higher than test task tau test Steps 4.1 and 4.2 are performed for the task of (1), if the current task τ is k Already hp (τ) test ) If the task with the lowest priority is the feasibility test is finished, the task tau is tested test Through feasibility test, returning to test task tau test The priority inversion of (1) does not affect the schedulability of the entire task set. If for task tau k Do not satisfy->The feasibility test is ended and the test task tau is returned test The priority inversion of (1) affects the schedulability of the whole task set, and the test task tau test The feasibility test was not passed.
hp(τ test ) Indicating a priority higher than the test task tau test Is a task set of (1).
Step 5: and executing the online job.
If test task tau test Pass the feasibility test at time t, no matter how compared to the test task τ test Testing task τ if higher priority tasks are executing test Preempting the current resource (CPU) and executing the test task tau test And executes ω time units. Otherwise, the task with the highest priority in the ready queue will execute ω time units.
Step 6: the next scheduling decision will be initiated at time t=t+ω. Wherein the method comprises the steps of Denoted τ test The remaining execution time at time t. Wherein the next scheduling decision means that an iterative execution of steps 3 to 5 is initiated at time t=t+ω.
Aiming at the attack based on the dispatching in the fixed priority real-time system, the invention provides the safety perception real-time dispatching based on the protection window and the on-line priority reversal budget analysis. The core idea of the invention is to prevent the execution of an untrusted task within an effective attack window of an attacked task so as to reduce the attack success rate. For a system with uncertain length of an effective attack window, in order to minimize the proportion of unreliable tasks in the effective attack window, a protection window is introduced to characterize the protection capability limit of the system, and an online feasibility test based on priority reversal budget analysis is provided to increase the probability of priority reversal required by security perception scheduling. By introducing a protection window and an online feasibility test method based on priority inversion budget analysis, the invention achieves the aims of greatly reducing the proportion of unreliable tasks in an effective attack window and ensuring the real-time requirement of a system, and greatly reduces the time complexity of the algorithm compared with the existing safety perception scheduling algorithm.
The core of the invention is to reduce the proportion of the unreliable tasks in the AEW under the condition that the tasks do not miss the deadline, thereby reducing the success rate of attack. When the priority reversal budget of a job of a selected task affects the schedulability of the system, the priority reversal of the job is disabled, and otherwise the priority reversal is allowed. The invention obviously reduces the proportion of the untrusted tasks in the AEW under the condition of meeting the schedulability of the system, thereby reducing the success rate of attack.
Compared with a computer task safety scheduling strategy based on the judgment of task feasibility of busy intervals, the method has the advantages that the busy intervals are calculated iteratively at each scheduling moment, and then the task feasibility is judged according to the busy intervals, so that the calculation complexity is high, and the occupied time of a CPU is longer. The invention is a computer task safety scheduling strategy based on judging the task feasibility of the online priority inversion budget, and each scheduling moment calculates the priority inversion budget online, and the priority inversion budget does not need iterative calculation, so that the calculation complexity can be reduced. For offline priority inversion budget, only the cycle and the worst running time are considered, and the calculation of the task level is performed, but if the priority inversion budget is applied online, the calculation of the job level is performed, and the factors such as the execution condition of the task at the current moment are considered, so that an accurate online priority inversion budget model can be made, and the accuracy of the feasibility test is improved.
For example, a task set Γ contains four tasks: task τ v Is an attacked task with period T v Time of worst execution c=4 v =1, deadline D v =4; task τ 1 Is an untrusted task with period T 1 Time of worst execution c=5 1 =1, deadline D 1 =5; task τ 2 Is a trusted task with period T 1 Time of worst execution c=10 2 =2, deadline D 2 =10; task τ 3 Is an untrusted task with period T 3 =20, worst execution time C 3 =1, deadline D 3 =20. The set of tasks is RM schedulable.
The core of the invention is to reduce the proportion of the unreliable tasks in the AEW under the condition that the tasks do not miss the deadline, thereby reducing the success rate of attack. When the priority reversal budget of a job of a selected task affects the schedulability of the system, the priority reversal of the job is disabled, and otherwise the priority reversal is allowed. In the following, the above task set is taken as an example, and a specific embodiment of the present invention is shown according to a flowchart as shown in fig. 1.
Step 1: off-line calculation of maximum protection window length
For the task set Γ and the attacked task τ v ,τ v Method for calculating maximum protection window length of (2)The method comprises the following steps:
step 2: off-line computing task maximum deferrable time
For task τ v ,V v =argmax(W k (ω))≤d v W when ω=3 k (ω)=d v =4, so V v =3. V of the same kind 1 =2,V 2 =1,V 3 =2。
Step 3: test task selection
The current scheduling time t=0 is outside the maximum protection window, the method selects the untrusted service tau with the highest priority in the ready queue 1 Feasibility testing was performed.
Step 4: on-line computing priority reversal budget
Step 4.1: calculation ofInner high priority task hp (tau) k ) Is equal to tau v Interference upper bound->
Due to tau v The highest task in the set of tasks is interfered by the high priority task
Step 4.2: on-line computing priority reversal budget
Step 5: judging feasibility
For task τ v Satisfy the following requirementsThen τ 1 Execution at time t=0 does not destroy τ v Is provided). Due to the fact thatAbsence of priority below τ in the task set v But is higher than tau 1 Is finished, τ 1 The feasibility test was passed.
Step 6: and executing the online job.
Task τ 1 Executing 1 time unit, the next scheduling decision will be initiated at time t=1. And (3) in the subsequent scheduling process, steps 2, 3 and 4 are circularly executed, and the finally obtained scheduling process is shown in fig. 3.
Analysis finds that all untrusted jobs are at τ v As the method presented by the present invention attempts to prevent execution of untrusted jobs during the maximum protection window. Thus, through maximum protection window and online feasibility analysis, the patent can provide better protection than existing coverage-oriented scheduling strategies.
The invention has the advantages that: the invention obviously reduces the proportion of the untrusted tasks in the AEW under the condition of meeting the schedulability of the system, thereby reducing the success rate of attack.
And (3) experimental verification:
in order to verify the effectiveness of the invention, the method provided by the invention is simply called CO++ (PIB), and an existing security scheduling strategy CO++ (BI) based on busy interval is selected (such as a security perception real-time task scheduling method based on-line busy interval analysis of CN 116488905A), wherein the existing coverage-oriented scheduling strategy and fixed priority scheduling strategy are selected: CO scheduling and RM scheduling are used as contrast methods.
In a comparative experiment, the invention generates a task set based on the automobile benchmark to evaluate the safety performance of different scheduling strategies. For each task set, the number of tasks is randomly selected from {5,6, … }. The period of all tasks is randomly extracted from the set {5, 10, 20, 50, 100, 200, 1000 }. The worst execution time of each task is deduced from the period and utilization rate generated by the UUniFast method. The attacked task is randomly selected from the set of tasks, and its AEW length is selected from {10%,30%,50% of its period. Randomly selecting 20% of all tasks in the task set as trusted tasks. The invention generates task sets with the utilization rate from 0.05 to 0.95, the step length is 0.05, and for each utilization rate, the invention generates 1000 task sets.
The evaluation of the present invention has three main objectives: (1) a proportion of untrusted tasks within the AEW; (2) A typical attack success rate of a schedule-based attack ScheduLeak; (3) average online scheduling time.
FIG. 2 shows the ratio of untrusted tasks within an AEW versus different scheduling policies and task set utilization for systems of different AEW lengths. At all AEW sizes, co++ (BI) and co++ (PIB) consistently perform better than existing coverage-oriented algorithms CO. This is because co++ (BI) and co++ (PIB) can be used to strategically schedule trusted and untrusted tasks by limiting estimates and online feasibility tests based on protection capabilities within the protection window, effectively reducing the proportion of coverage that AEWs of systems with uncertain AEW sizes are not trusted. Furthermore, we can find that co++ (PIB) achieves an AEW untrusted coverage ratio similar to co++ (BI) with lower runtime overhead.
Fig. 4 illustrates schedulleak attack defense effects using different scheduling policies for different utilizations. Co++ (BI) and co++ (PIB) consistently perform better than existing coverage-oriented algorithms CO. This is because co++ (BI) and co++ (PIB) can strategically arrange trusted and untrusted tasks by limiting estimates and online feasibility tests based on protection capabilities within the protection window, effectively reducing the proportion of coverage that AEWs of systems with uncertain AEW size are not trusted. Furthermore, we can find that co++ (PIB) achieves an AEW untrusted coverage ratio close to co++ (BI) with lower runtime overhead.
Fig. 5 shows the relationship between average online scheduling time and task set utilization in a supersycle for different algorithms when AEW is 30% of the victim task cycle. We can find that the on-line scheduling time of all scheduling methods is less than 0.04 seconds. Furthermore, we can find that the scheduler overhead of co++ (PIB) is much lower than co++ (BI). Compared to co++ (BI), co++ (PIB) can reduce scheduler overhead by at most 96% relative to co++ (BI) when system utilization is 0.1. The main reason is that co++ (PIB) reduces the on-line computational overhead by offline maximum relaxation analysis, whereas in co++ (BI) all computations are done at run-time and therefore its on-line computational complexity is pseudo-polynomial. Furthermore, we can find that co++ (PIB) and CO are close to scheduler overhead at all task set utilization, because the time complexity of both approaches is polynomial complexity.
Aiming at the attack based on the dispatching in the fixed priority real-time system, the invention provides a safety perception real-time dispatching scheme based on a protection window and on-line priority inversion budget analysis. The core idea of this study is to prevent execution of untrusted tasks within the active attack window of the attacked task to reduce the attack success rate. Aiming at a system with uncertain length of an effective attack window, in order to minimize the proportion of unreliable tasks in the effective attack window, the invention introduces a protection window to characterize the protection capability limitation of the system, and provides an online feasibility test method based on priority reversal budget analysis to increase the probability of priority reversal required by safety perception scheduling and greatly reduce the time complexity. By introducing a protection window and an online feasibility test method based on priority inversion budget analysis, the invention achieves the aims of greatly reducing the proportion of unreliable tasks in an effective attack window and ensuring the real-time requirement of a system, and greatly reduces the time complexity of the algorithm compared with the existing safety perception scheduling algorithm.
Based on the above embodiments, the embodiments of the present application further provide an electronic device, including: one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory, the one or more programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the methods provided by the above embodiments.
Based on the above embodiments, the present application further provides a computer storage medium having stored therein a computer program, which when executed by a computer, causes the computer to perform the method provided in the above embodiments.
Wherein a storage medium may be any available medium that can be accessed by a computer. Taking this as an example but not limited to: the computer readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (8)

1. A safety perception real-time task scheduling method based on-line priority inversion budget analysis is characterized by comprising the following steps:
step 1: offline calculating the maximum protection window length of the attacked task;
step 2: calculating the maximum delay time of the real-time task offline;
step 3: according to the maximum protection window length, determining tasks for feasibility test in the ready queue on line;
step 4: calculating the priority reversal budget of the test task on line according to the maximum delay time, and judging the test feasibility of the task according to the priority reversal budget of the test task calculated on line;
step 5: preempting and executing the current resource through the task of the feasibility test;
wherein:
the step 4 specifically comprises the following steps:
step 4.1: calculation ofInner high priority task hp (tau) k ) For the current task tau k Interference upper bound->Task τ k Indicating a priority higher than the test task tau test Is a task of (1);
step 4.2: according to the maximum delay time V k Upper boundary of interferenceOn-line computing priority higher than test task tau test Current task τ k Priority reversal budget ∈>
Step 4.3: according to the current task tau k Is used for judging the current task tau through the online priority inversion budget k Is feasible for testing;
step 4.3.1: if judging the current task tau k Meeting priority reversal budgetCurrent task τ k The completion time of the test task tau does not exceed the deadline test Execution at time t will not destroy the current task τ k Step 4.3.2 is performed;
if judging the current task tau k Unsatisfied priority inversion budgetThe feasibility test is judged to be ended, and the task tau is tested test Failed feasibility test, test task τ test Information affecting the schedulability of the task set;
step 4.3.2: for tasks tau with priority lower than the current one k But higher than test task tau test Is the next task tau of (1) k Steps 4.1, 4.2 and 4.3.1 are performed until the current task τ k Has been a higher priority than the test task tau test Task set hp (τ) test ) In (a)If the task with the lowest priority is judged to be finished by the feasibility test, the task tau is tested test Through feasibility test, returning to test task tau test Information that does not affect the schedulability of the task set;
wherein: calculation ofInner high priority task hp (tau) k ) For real-time task tau k Interference upper bound->Is expressed by the following formula:
in the method, in the process of the invention,representing real-time task τ k Relative deadlines at time t, real-time task τ k Is hp (tau) test ) In (c) tasks, hp (τ) k ) Representing priority over real-time task tau k Task set, task tau j Is hp (tau) k ) Task in->Representing task τ j The remaining execution time at time t, +.>Representing time t to task τ j The length of the first deadline after the time t, representing task τ j The last arrival time before time t, +.>Representing time t to real-time task tau k The length of the first deadline after time t,/-> Representing real-time task τ k Last arrival time before time T, T k Representing real-time task τ k Is a period of (2);
on-line computing priority higher than test task tau test Task τ k Priority reversal budget for (c)Is expressed by the following formula:
in the method, in the process of the invention,representing task τ k Is the remaining execution time at time t +.>Representing task τ k Is an absolute off-time at time t.
2. The method for secure perceived real-time task scheduling based on online priority reversal budget analysis according to claim 1, wherein in step 1, for task set Γ and attacked task τ v The attacked task tau v Maximum protection window of (2)Length of mouthIs expressed by the following formula:
wherein T is v Representing an attacked task τ v U is the period of (1) i Representing an attacked task tau i U v Representing an attacked task τ v And the utilization rate of Γ untrust Is the set of all untrusted tasks within the task set Γ.
3. The method for secure perceived real-time task scheduling based on online priority reversal budget analysis according to claim 1, wherein in step 2, for real-time tasks τ ordered as k k Maximum delay time V of (2) k Is expressed by the following formula:
V k =argmax(W k (ω))≤d k
wherein d k Representing real-time task τ k Is W k (omega) represents real-time task τ k Busy interval at priority reversal length ω;
wherein the real-time task τ k Busy interval W of (2) k From busy intervalsIterative calculation until convergence, the obtained busy interval is busy interval W k M represents the number of iterations, wherein the busy interval W k Is expressed by the following formula:
in the method, in the process of the invention,C k representing real-time task τ k Worst execution time of->Representing time t to real-time task tau j The length of the first deadline after time t, C j Representing task τ j Worst execution time of T j Representing task τ j Is of the period hp (τ) k ) Representation->Internal high priority task->Representing real-time task τ k Relative deadlines at time t, task τ j Belonging to hp (tau) k ) Is a task in (a).
4. The safety-aware real-time task scheduling method based on-line priority inversion budget analysis according to claim 1 or 2, wherein the current scheduling time t is within the maximum protection window length, and the trusted task in the ready queue is determined to be a feasibility test task;
the current scheduling time t is within the length of the maximum protection window, the ready queue does not have a trusted task, and the idle task in the ready queue is determined to be a feasibility test task;
and determining the untrusted traffic in the ready queue as the feasibility test task when the current scheduling time t is not within the maximum protection window length.
5. The method for secure perceived real-time task scheduling based on online priority reversal budget analysis according to claim 4, wherein the current scheduling time t is within a maximum protection window, represented by the following formula:
wherein f v Representing the completion time of the last job that the attacked task tau completed before the instant t,indicating the maximum guard window length.
6. The method for secure perceived real-time task scheduling based on online priority reversal budget analysis according to claim 1, wherein in step 5,
if the test task passes the feasibility test, the test task passing the feasibility test preempts the current resource and executes omega time units;
if the task fails the feasibility test, executing omega time units by the task with the highest priority in the ready queue, and initiating the next scheduling decision at the time t=t+omega to repeatedly execute the steps 3-5;
wherein:
denoted τ test The remaining execution time at time t.
7. An electronic device, the electronic device comprising: one or more processors, memory, and one or more programs; wherein the one or more programs are stored in the memory, the one or more programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the methods of any of claims 1-6.
8. A computer readable storage medium comprising a computer program which, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1-6.
CN202311074754.7A 2023-08-24 2023-08-24 Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium Active CN117216762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311074754.7A CN117216762B (en) 2023-08-24 2023-08-24 Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311074754.7A CN117216762B (en) 2023-08-24 2023-08-24 Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN117216762A CN117216762A (en) 2023-12-12
CN117216762B true CN117216762B (en) 2024-03-22

Family

ID=89034420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311074754.7A Active CN117216762B (en) 2023-08-24 2023-08-24 Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117216762B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911591A (en) * 2022-04-25 2022-08-16 北京智芯微电子科技有限公司 Task scheduling method and system
CN116010081A (en) * 2022-12-05 2023-04-25 大连理工大学 Real-time system randomization task scheduling method based on-line priority reverse budget analysis
CN116488905A (en) * 2023-04-25 2023-07-25 大连理工大学 Safety perception real-time task scheduling method based on-line busy interval analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10296382B2 (en) * 2017-05-17 2019-05-21 Imam Abdulrahman Bin Faisal University Method for determining earliest deadline first schedulability of non-preemptive uni-processor system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911591A (en) * 2022-04-25 2022-08-16 北京智芯微电子科技有限公司 Task scheduling method and system
CN116010081A (en) * 2022-12-05 2023-04-25 大连理工大学 Real-time system randomization task scheduling method based on-line priority reverse budget analysis
CN116488905A (en) * 2023-04-25 2023-07-25 大连理工大学 Safety perception real-time task scheduling method based on-line busy interval analysis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种新的组优先级动态实时调度算法;巴巍;张大波;李琦;王伟;;计算机科学;20090715(07);全文 *
巴巍 ; 张大波 ; 李琦 ; 王伟 ; .一种新的组优先级动态实时调度算法.计算机科学.2009,(07),全文. *

Also Published As

Publication number Publication date
CN117216762A (en) 2023-12-12

Similar Documents

Publication Publication Date Title
Easwaran Demand-based scheduling of mixed-criticality sporadic tasks on one processor
Pellizzoni et al. A generalized model for preventing information leakage in hard real-time systems
Burns et al. Adaptive mixed criticality scheduling with deferred preemption
Zhao et al. PT-AMC: Integrating preemption thresholds into mixed-criticality scheduling
Yao et al. Feasibility analysis under fixed priority scheduling with fixed preemption points
Su et al. Scheduling algorithms for elastic mixed-criticality tasks in multicore systems
Bertogna et al. Improving feasibility of fixed priority tasks using non-preemptive regions
Yao et al. Feasibility analysis under fixed priority scheduling with limited preemptions
US10769273B2 (en) Electronic control unit
CN116488905A (en) Safety perception real-time task scheduling method based on-line busy interval analysis
CN117216762B (en) Security perception real-time task scheduling method based on online priority inversion budget analysis, electronic equipment and computer readable storage medium
Baek et al. Non-preemptive scheduling for mixed-criticality real-time multiprocessor systems
Phavorin et al. Scheduling with preemption delays: anomalies and issues
Erickson et al. Response time bounds for G-EDF without intra-task precedence constraints
Lee et al. Improvement of real-time multi-coreschedulability with forced non-preemption
CN113961338A (en) Management system and management method of dynamic thread pool and thread task processing method
JP2016091554A (en) Method of operating control device
CN111782378B (en) Adaptive processing performance adjustment method, server and readable storage medium
CN110704206B (en) Real-time computing method, computer storage medium and electronic equipment
Thekkilakattil et al. Multiprocessor fixed priority scheduling with limited preemptions
Negrean et al. Timing analysis of multi-mode applications on AUTOSAR conform multi-core systems
Krüger et al. Improving security for time-triggered real-time systems against timing inference based attacks by schedule obfuscation
Krüger et al. Improving security for time-triggered real-time systems with task replication
Marinho et al. Job phasing aware preemption deferral
Ren et al. Protection Window Based Security-Aware Scheduling against Schedule-Based Attacks

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