CN116430738B - Self-adaptive dynamic scheduling method of hybrid key system - Google Patents

Self-adaptive dynamic scheduling method of hybrid key system Download PDF

Info

Publication number
CN116430738B
CN116430738B CN202310698745.9A CN202310698745A CN116430738B CN 116430738 B CN116430738 B CN 116430738B CN 202310698745 A CN202310698745 A CN 202310698745A CN 116430738 B CN116430738 B CN 116430738B
Authority
CN
China
Prior art keywords
scheduling
function
task
scheduled
functions
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
CN202310698745.9A
Other languages
Chinese (zh)
Other versions
CN116430738A (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.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202310698745.9A priority Critical patent/CN116430738B/en
Publication of CN116430738A publication Critical patent/CN116430738A/en
Application granted granted Critical
Publication of CN116430738B publication Critical patent/CN116430738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
    • 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

Abstract

The invention discloses a self-adaptive dynamic scheduling method of a hybrid key system, which relates to the technical field of task scheduling, and after a function set to be scheduled is acquired, a system ready list is determined according to a system key level of the hybrid key system and a priority sequence corresponding to a function, a first calculation task is taken out from the head of the system ready list for scheduling so as to determine a system scheduling list, and the self-adaptive dynamic scheduling is carried out on the calculation tasks of each function in the function set to be scheduled based on the key level of the function, the mode where the function is located, the system key level, the system ready list, the system scheduling list and the priority sequence, so that optimal allocation of calculation resources can be realized, the utilization rate of the system resources is improved, and the safety of a vehicle is ensured.

Description

Self-adaptive dynamic scheduling method of hybrid key system
Technical Field
The invention relates to the technical field of task scheduling, in particular to a self-adaptive dynamic scheduling method of a heterogeneous distributed platform hybrid key system.
Background
In view of space, weight, power consumption, cost and the like, the automotive electronic and electric architecture is changed from a distributed electronic and electric architecture to a centralized electronic and electric architecture, so that functions originally deployed on different processing units individually are operated on a unified platform formed by a limited number of processing units, and key levels of the functions are not the same, which derives a heterogeneous distributed platform hybrid key system. The key level represents the safety key degree of the function, reveals the severity of the result of the function failing to execute in time, and the higher the key level, the more serious the result of the function failing to execute in time, for example, an automatic driving automobile control system can simultaneously run a high-key-level environment sensing function and a low-key-level communication function, can accept network packet loss to a certain degree, but cannot accept the environment sensing function to miss the deadline, so that a plurality of functions on a heterogeneous distributed platform hybrid key system need to be reasonably scheduled.
With the development of automatic driving technology and vehicle-machine technology, the interaction between an automobile electronic system and the external driving environment and the interaction between the automobile electronic system and a driver are more frequent, the functions are more complex, and the scale is increasing. Meanwhile, a considerable part of the functions are needed in specific occasions, for example, functions related to automatic driving are unnecessary in a manned driving mode, and further, if the functions needed in specific scenes are periodically executed unconditionally if the voice interaction between a driver and a vehicle system is also needed when the driver actively carries out voice interaction, unnecessary energy consumption and hardware resource waste are brought, and the functions in operation tend to be dynamically released and deleted according to actual use scenes and are dynamically scheduled according to the hardware requirements of the functions and the current available resources of the system. However, the conventional real-time scheduling algorithm cannot handle the function scheduling problem of different key levels of dynamic release, so that it is highly desirable to establish an efficient scheduling algorithm to realize optimal allocation of computing resources.
Disclosure of Invention
The invention aims to provide a self-adaptive dynamic scheduling method of a hybrid key system, which can realize optimal allocation of computing resources, thereby improving the utilization rate of system resources and guaranteeing the safety of vehicles.
In order to achieve the above object, the present invention provides the following solutions:
an adaptive dynamic scheduling method of a hybrid critical system, the adaptive dynamic scheduling method comprising:
acquiring a function set to be scheduled; the function set to be scheduled comprises a plurality of functions to be scheduled, and the functions to be scheduled are ordered according to key levels of the functions and scheduling relaxation time of the functions in a normal mode; each function to be scheduled comprises a plurality of calculation tasks;
selecting a plurality of functions to be scheduled of the function set to be scheduled as scheduling functions participating in current round scheduling according to a system key level of a hybrid key system, and taking out a plurality of computing tasks from a priority sequence corresponding to each scheduling function to form a system ready list;
taking out a first computing task from the head of the system ready list as a scheduling task, scheduling the scheduling task to obtain a scheduling result of the scheduling task, and adding the scheduling result into a system scheduling list; the scheduling result comprises a processing unit for executing the scheduling task and a starting time and a finishing time of the scheduling task on the processing unit;
If the function of the scheduling task is in a normal mode, judging whether the scheduling task misses the absolute deadline lower limit of the scheduling task in the normal mode, and obtaining a first judging result; if the first judgment result is yes, updating the system scheduling list and the system ready list, updating the function of the scheduling task to be in a degradation mode, and returning to the step of taking out the first computing task from the head of the system ready list as the scheduling task; if the first judgment result is negative, jumping to a round updating step;
if the function to which the scheduling task belongs is in a degradation mode, judging whether the scheduling task misses the absolute deadline lower limit of the scheduling task in the degradation mode, and obtaining a second judgment result; if the second judgment result is yes, updating the function exceeding budget flag bit of the function of the scheduling task as the key level of the function of the scheduling task, judging whether the key level of the system is lower than the key level of the function of the scheduling task, and obtaining a third judgment result; if the third judging result is yes, updating the system scheduling list, the system ready list and the priority sequence, updating the system key level as the key level of the function of the scheduling task, and jumping to a round updating step; if the third judging result is no or the second judging result is no, judging whether all computing tasks belonging to the functions of the scheduling tasks in the system ready list are scheduled and whether the functions of the scheduling tasks exceed a budget mark bit and are not 1, so as to obtain a fourth judging result; if the fourth judgment result is yes, updating the function exceeding budget flag bit of the function to which the scheduling task belongs to 1, judging whether the key level of the function to which the scheduling task belongs is larger than the maximum value of the function exceeding budget flag bit of all functions, and obtaining a fifth judgment result; if the fifth judging result is yes, updating the system ready list and the priority sequence, updating the system key level to the maximum value of the function exceeding budget mark bits of all functions, and jumping to a round updating step; if the fifth judging result is negative or the fourth judging result is negative, jumping to a round updating step;
The round update steps are as follows: judging whether the computing tasks in the system ready list are all scheduled, if yes, reordering the function sets to be scheduled, and returning to the step of selecting a plurality of functions to be scheduled of the function sets to be scheduled according to the system key level of the hybrid key system as scheduling functions participating in current round scheduling; if not, returning to the step of taking the first computing task from the system ready list head as the scheduling task.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention is used for providing a self-adaptive dynamic scheduling method of a hybrid key system, after a function set to be scheduled is acquired, a system ready list is determined according to a system key level of the hybrid key system and a priority sequence corresponding to a function, a first calculation task is taken out from the head of the system ready list as a scheduling task, the scheduling task is scheduled to determine the system scheduling list, the self-adaptive dynamic scheduling is carried out on the calculation tasks of each function in the function set to be scheduled based on the key level of the function, the mode where the system key level is located, the system ready list, the system scheduling list and the priority sequence, the real-time requirement of the high key level function is ensured, meanwhile, the high-efficiency scheduling of the low key level function is realized by utilizing limited calculation resources as much as possible, the performance of the hybrid key system is improved, the optimal allocation of the calculation resources is realized, the utilization rate of the system resources is improved, and the safety of a vehicle is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a method flowchart of an adaptive dynamic scheduling method according to embodiment 1 of the present invention;
FIG. 2 is a diagram of the overall architecture of the heterogeneous processing platform provided in example 1 of the present invention;
fig. 3 is a schematic diagram of an autopilot control function provided in embodiment 1 of the present invention;
fig. 4 is a schematic node diagram of an autopilot control function represented by DAG according to embodiment 1 of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a self-adaptive dynamic scheduling method of a hybrid key system, which can realize optimal allocation of computing resources, thereby improving the utilization rate of system resources and guaranteeing the safety of vehicles.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Example 1:
the embodiment is used for providing a self-adaptive dynamic scheduling method of a hybrid key system, which comprises the following steps:
step 1: acquiring a function set to be scheduled; the function set to be scheduled comprises a plurality of functions to be scheduled, and the functions to be scheduled are ordered according to key levels of the functions and scheduling relaxation time of the functions in a normal mode; each function to be scheduled comprises a plurality of calculation tasks;
step 2: selecting a plurality of functions to be scheduled of the function set to be scheduled as scheduling functions participating in current round scheduling according to a system key level of a hybrid key system, and taking out a plurality of computing tasks from a priority sequence corresponding to each scheduling function to form a system ready list;
Step 3: taking out a first computing task from the head of the system ready list as a scheduling task, scheduling the scheduling task to obtain a scheduling result of the scheduling task, and adding the scheduling result into a system scheduling list; the scheduling result comprises a processing unit for executing the scheduling task and a starting time and a finishing time of the scheduling task on the processing unit;
step 4: if the function of the scheduling task is in a normal mode, judging whether the scheduling task misses the absolute deadline lower limit of the scheduling task in the normal mode, and obtaining a first judging result; if the first judgment result is yes, updating the system scheduling list and the system ready list, updating the function of the scheduling task to be in a degradation mode, and returning to the step of taking out the first computing task from the head of the system ready list as the scheduling task; if the first judgment result is negative, jumping to a round updating step;
if the function to which the scheduling task belongs is in a degradation mode, judging whether the scheduling task misses the absolute deadline lower limit of the scheduling task in the degradation mode, and obtaining a second judgment result; if the second judgment result is yes, updating the function exceeding budget flag bit of the function of the scheduling task as the key level of the function of the scheduling task, judging whether the key level of the system is lower than the key level of the function of the scheduling task, and obtaining a third judgment result; if the third judging result is yes, updating the system scheduling list, the system ready list and the priority sequence, updating the system key level as the key level of the function of the scheduling task, and jumping to a round updating step; if the third judging result is no or the second judging result is no, judging whether all computing tasks belonging to the functions of the scheduling tasks in the system ready list are scheduled and whether the functions of the scheduling tasks exceed a budget mark bit and are not 1, so as to obtain a fourth judging result; if the fourth judgment result is yes, updating the function exceeding budget flag bit of the function to which the scheduling task belongs to 1, judging whether the key level of the function to which the scheduling task belongs is larger than the maximum value of the function exceeding budget flag bit of all functions, and obtaining a fifth judgment result; if the fifth judging result is yes, updating the system ready list and the priority sequence, updating the system key level to the maximum value of the function exceeding budget mark bits of all functions, and jumping to a round updating step; if the fifth judging result is negative or the fourth judging result is negative, jumping to a round updating step;
The round update steps are as follows: judging whether the computing tasks in the system ready list are all scheduled, if yes, reordering the function sets to be scheduled, and returning to the step of selecting a plurality of functions to be scheduled of the function sets to be scheduled according to the system key level of the hybrid key system as scheduling functions participating in current round scheduling; if not, returning to the step of taking the first computing task from the system ready list head as the scheduling task.
The hybrid key system of the embodiment refers to an automotive heterogeneous distributed platform hybrid key system, where a plurality of heterogeneous processing units are distributed on the same heterogeneous processing platform, and the plurality of processing units are connected in a communication manner, and are matched with each other to execute a plurality of computing tasks included in each of a plurality of functions with different key levels. Heterogeneous processing units refer to processing units that differ in execution tasks and execution times.
As shown in fig. 1, the adaptive dynamic scheduling method of the heterogeneous distributed platform hybrid key system provided in this embodiment includes: firstly, abstract modeling of a hybrid key system; (II) initializing a mixed key system; (III) preprocessing the mixed key system functions; (IV) determining a system ready list; (V) task scheduling; (six) detecting the cut-off time; (seventh) system field recovery; (eight) updating the system priority; and (nine) interrupting the service program.
Here, the adaptive dynamic scheduling method of the present embodiment is further described according to the above nine steps:
hybrid critical system abstraction modeling:
and (1.1) carrying out abstract modeling on a heterogeneous processing platform of a heterogeneous distributed platform hybrid key system to obtain a processing unit set.
The processing unit set is as follows:
wherein P is a processing unit set which comprises a plurality of processing units in communication connection, and the processing units are in communication connection through a vehicle-mounted network in the heterogeneous processing platform; p (P) k For the kth processing unit, k=1, 2,in particular, it is pointed out that, for the number of processing units in the heterogeneous processing platform that are communicatively connected (i.e., interconnected) through the in-vehicle network, an independent processing unit that is not communicatively connected to other processing units through the in-vehicle network cannot participate in task scheduling at the overall system level, and therefore is not considered in the present embodiment, i.e., does not belong to the processing units described in the present embodiment.
As shown in fig. 2, the heterogeneous processing platform is a schematic diagram of a heterogeneous distributed platform hybrid key system, the heterogeneous processing platform adopts a centralized electronic and electric architecture, and a Zonal ECU (zone controller) 1, a Zonal ECU2, a Zonal ECU3, a Zonal ECU4, an HPC (high performance computer) 1, an HPC2 and an HPC3 in fig. 2 are 7 heterogeneous processing units included in the heterogeneous processing platform shown in fig. 2, and the 7 heterogeneous processing units are mutually communicated through a vehicle-mounted network, wherein the vehicle-mounted network includes CANFD (CAN) and ETH/TSH in fig. 2. In particular, since the Normal ECU (conventional ECU) in fig. 2, which is communicatively connected to other processing units via the in-vehicle network, can only realize a specific function and does not participate in task scheduling at the whole system level, it is not within the consideration of the present embodiment, that is, it does not belong to the processing unit described in the present embodiment.
And (1.2) performing abstract modeling on functions to be executed by a heterogeneous processing platform of the heterogeneous distributed platform hybrid key system, namely performing abstract modeling on functions running on the heterogeneous processing platform to obtain a function set.
The function set is as follows:
wherein F is a function set comprising a plurality of functions having different key levels; f (F) m As m-th function, which represents an independent function, m=1, 2,is the number of functions in the vehicle system that run on the heterogeneous processing platform.
(1.3) abstract modeling of individual functions.
For a single function, as shown in fig. 3 and fig. 4, fig. 3 is a schematic diagram of a single function of autopilot control, and it can be seen that the single function includes a plurality of computing tasks, a data transmission process exists between some computing tasks (for example, a result of the computing task, i.e., data acquisition of a camera, needs to be transmitted to a sensor to fuse the computing task), in this embodiment, a data dependency relationship exists between two computing tasks having the data transmission process, a computing task having no data input is defined as an entrance task, a computing task having no data output is defined as an exit task, a function may have a plurality of entrance tasks and a plurality of exit tasks, and specifically, if there is a directed edge from the computing task a to the computing task B, the computing task a is represented as a predecessor task of the computing task B, the computing task B is a successor task of the computing task a, the computing task having no predecessor task is an entrance task, and the computing task having no successor task is an exit task. By abstracting the single function shown in fig. 3 into DAG (directed acyclic graph), fig. 4 can be obtained, and fig. 4 is a node schematic diagram of the single function obtained by abstracting each calculation task of the single function shown in fig. 3 into a node (for example, the calculation task of data collection of a camera is abstracted into a node n 1), and abstracting the data dependency relationship between the calculation tasks into directed edges, wherein the nodes represent the calculation tasks, and the directed edges represent the data dependency relationship between the calculation tasks.
Mth function F m Can be expressed as:
wherein, the liquid crystal display device comprises a liquid crystal display device,in order to calculate the set of tasks,is the firstA computing task including function F m All computing tasks; w (W) N Is a normal execution time matrix, which is oneThe matrix is formed by a matrix of,for the number of processing units,is a function F m The number of included computing tasks, W N Element W of the ith row and the kth column in (a) i,k In normal mode, function F m Computing task N of (1) i At processing unit P k The execution time can be obtained through a timer of an operating system or a debugging tool such as a Latif Bach debugger, and is a known value, particularly, if a certain processing unit does not support a certain calculation task, the corresponding execution time is set to be a positive number which is far greater than the normal execution time, such as + -infinity; w (W) D To downgrade the execution time matrix, which is oneMatrix, W D Element W of the ith row and the kth column in (a) i,k In the degraded mode, function F m Computing task N of (1) i At processing unit P k The execution time can be obtained through a timer of an operating system or a debugging tool such as a Latif Bach debugger, and is a known value, particularly, if a certain processing unit does not support a certain calculation task, the corresponding execution time is set to be a positive number which is far greater than the normal execution time, such as + -infinity; e is a directed edge matrix representing directed edges in the DAG, which is one Ith row in matrix, EElements of columnsIn function F m Computing task N of (1) i Sum function F m Is to be used in the computing task of (a)Taking 1 when data dependency exists, otherwise taking 0; comm defines a data transmission time matrixThe time for transmitting data through the vehicle bus when two computing tasks with data dependence are executed on different processing units is oneMatrix, comm of element in ith row and jth column in Comm i,j Is a function F m Computing task N of (1) i Sum function F m Computing task N of (1) j The time of transmitting data over the onboard bus when executing on the different processing units is a known value; crit is function F m The number of key stages and the key stage of each function can be customized in this embodiment, crit can be defined in function F m According to the ISO-26262 standard, when the critical level of each function is defined according to the ISO-26262 standard in the design phase of the function, then coexistence is performed at 4 critical levels; r is a function F m Is a release time of (2); d is a function F m R and D are determined in the design phase according to the specific action of the function and the actual application scenario of the function. It is specifically noted that the absolute cutoff time of a function is the sum of the release time and the relative cutoff time.
The hybrid key system abstract modeling provided by the embodiment does not need a detailed electronic and electric architecture of a vehicle, has no requirements on the concrete form and arrangement scheme of the vehicle-mounted computing unit, and comprehensively considers the isomerism, parallelism and key level of functions of the hybrid key system.
(II) initializing a hybrid key system:
(2.1) System Key level SYS. Criticity is initialized to 1, the hybrid Key System of this embodiment can have four key levels [1,2,3,4] and the System Key levels are dynamically adjusted during operation of the hybrid Key System.
(2.2) initializing the function set to be scheduled, wherein the function set to be scheduled comprises a function released when the system is powered on and initialized, and the function is determined according to the actual situation of the automobile.
(2.3) initialization of the function out-of-budget flag F_OverRun to 1 |F|×1 ,1 |F|×1 Representing a plurality of elements including |F| and each elementAnd (3) column vectors with values of 1, wherein each element represents a function, and if a certain function misses the corresponding absolute deadline lower limit in a degradation mode in the running process of the hybrid key system, the function corresponding to the function exceeds a budget zone bit and is set as a key level of the function.
(2.4) initialization of the functional Mode flag F_Mode to 0 |F|×1 ,0 |F|×1 Representing a column vector comprising |F| elements, wherein the value of each element is 0, each element represents a function, and represents that all functions default to a normal mode, and when a certain function enters a degraded mode, the function mode flag bit corresponding to the function is set to be 1.
And (III) preprocessing the mixed key system functions:
(3.1) computing function F m The rank (i.e., rank value) of the task.
;(1)
In the formula (1), the components are as follows,is a function F m Computing task N of (1) i Is a grade of (2); />In normal mode, function F m Computing task N of (1) i Average execution time on all processing units in P, which is equal to function F in normal mode m Computing task N of (1) i The average of the execution times over all processing units, in particular, indicates that the calculation task N which is not supported is to be excluded when the average execution time is to be determined i Is a processing unit of (a); />Is a function F m Computing task N of (1) i Is a direct successor to the set of computing tasks, which includes function F m Computing task N of (1) i Is a target of all subsequent tasks; />Is a function F m Computing task N of (1) i Sum function F m Computing task N of (1) j Time of data transmission via on-board bus when executing on different processing units, function F m Computing task N of (1) j Namely function F m Computing task N of (1) i Is a subsequent task of (a); />Is a function F m Computing task N of (1) j Is a class of (c). It is particularly pointed out that the egress task has no successor task, and that the class of egress task is equal to its average execution time on all processing units.
(3.2) computing function F m A corresponding priority sequence.
According to the calculated grade pair function F m All the calculation tasks are arranged in descending order, and all the arranged calculation tasks are stored into the function F m The corresponding priority sequence Fm.task_PriorityList can obtain the function F m And the corresponding priority sequences are used for sequencing the priorities of the computing tasks of the functions according to the data dependence and the parallelism among the computing tasks of each function.
(3.3) calculating the function F according to HEFT algorithm m Scheduling sequences starting from time zero.
According to function F m Corresponding priority sequence sequential computing function F m The earliest start time and earliest finish time of each computing task on each processing unit, and the computing task is distributed to the processing units with the smallest earliest finish time to obtain a scheduling sequence, wherein the scheduling sequence comprises an execution function F m The start time and the finish time of the computing task on the processing unit are taken as the earliest start time and the earliest finish time of the computing task on the processing unit, that is, the actual start time and the actual finish time of the computing task on the processing unit.
Function F m Computing task N of (1) i At processing unit P k The calculation formula of the earliest starting time is as follows:
; (2)
in the formula (2), the amino acid sequence of the compound,is a function F m Computing task N of (1) i At processing unit P k The earliest start time on; />Is a function F m Computing task N of (1) i At processing unit P k The earliest start time when the idea of insertion is not considered above; />Is a function F m Computing task N of (1) i At processing unit P k The earliest start time when the idea of insertion was considered above.
; (3)
In the formula (3), the amino acid sequence of the compound,for processing unit P k Of the available time of (i) the processing unit P k Time of completion of last calculation task of its scheduling sequence, if P k Computing tasks have not been allocated, and their available time is 0; />Is a function F m Computing task N of (1) i A direct-predecessor computing task set of (1) that includes function F m Computing task N of (1) i Is a precursor task to all of the precursor tasks;is a function F m Is to be used in the computing task of (a)N j In the actual completion time of function F m Computing task N of (1) j Namely function F m Computing task N of (1) i Is a precursor task of (a); />Is a function F m Computing task N of (1) j Sum function F m Computing task N of (1) i Communication time between them, particularly if function F m Computing task N of (1) i With its predecessor task (i.e. function F m Computing task N of (1) j ) And the communication time is negligible, otherwise, the communication time is the time for transmitting data through the vehicle-mounted bus when the two computing tasks are executed on different processing units. The ingress task has no predecessor task and its earliest start time is the processing unit P k Is used for the time of availability.
Will beInitializing to infinity, computing processing units P in turn k Every calculation task on->Whether the requirement of the insertion was met before, at which time each calculation task +.>All belong to function F m
If it isIs the first calculation task, it is determined whether the following expression (4) is satisfied,
; (4)
in the formula (4), the amino acid sequence of the compound,to calculate anyBusiness->Is set to be equal to the actual start time of the (c); />Is a function F m Computing task N of (1) i At processing unit P k Execution time on, if function F m In the normal mode, the execution time passes through W N Determining if function F m In the degraded mode, the execution time passes through W D And (5) determining.
If it meets the requirement, then
;(5)
If it isNot the first calculation task, note +.>Is +.>Judging whether the following formula (6) is satisfied,
;(6)
in the formula (6), the amino acid sequence of the compound,for computing tasks->Is used to determine the actual completion time of the process.
If it meets the requirement, then
;(7)
Function F m Computing task N of (1) i At processing unit P k The calculation formula of the earliest completion time is as follows:
; (8)
in the formula (8), the amino acid sequence of the compound,is a function F m Computing task N of (1) i At processing unit P k The earliest completion time above; />Is a function F m Computing task N of (1) i At processing unit P k Execution time on, if function F m In normal Mode, i.e. F_Mode (Fm) is 0, the execution time passes through W N Determining if function F m In the degraded Mode, i.e. F_Mode (Fm) is 1, the execution time passes through W D And (5) determining.
(3.4) computing function F m Lower bound and lower bound for the computing task.
Function F m Is defined as function F m Shortest execution time when exclusive of all computing resources, if function F m Starting execution from 0 time, the completion time of the last calculation task is the function F m Lower boundary of (F), i.e. function F m Can be defined by function F m The actual completion time of the exit task of (c) is determined as follows:
; (9)
in the formula (9), the amino acid sequence of the compound,is a function F m Lower boundary of (2); />Is a function F m An egress task set of (1) comprising a function F m Is a per-unit of a per-unit of a per; />Is a function F m Computing task N of (1) i At this time, calculate task N i For an exit task, the actual completion time is equal to the calculation task N i Minimum of earliest completion times across all processing units.
Function F m The lower boundary of each computing task is determined by the actual completion time of the computing task, and the computing formula is as follows:
; (10)
in the formula (10), the amino acid sequence of the compound,is a function F m Computing task N of (1) i Is defined by the lower boundary of (c).
(3.5) calculation function F m Is used to schedule the slack time.
; (11)
In the formula (11), the amino acid sequence of the compound,is a function F m Is used for scheduling the relaxation time; />Is a function F m Is a relative deadline of (2); />Is a function F m Is defined by the lower boundary of (c).
(3.6) calculation function F m Lower absolute deadline of (2) and function F m The absolute deadline of each of the computing tasks.
The method for calculating the absolute deadline lower limit of the function comprises the following steps: calculating the sum of the release time of the function and the relative cutoff time of the function to obtain the absolute cutoff time lower limit of the function, wherein the calculation formula is as follows:
; (12)
in the formula (12), the amino acid sequence of the compound,is a function F m Lower absolute deadline of (2); />Is a function F m Is a release time of (2); />Is a function F m Is a relative cutoff time of (2).
; (13)
In the formula (13), the amino acid sequence of the compound,is a function F m Computing task N of (1) i Lower absolute deadline of (2); />Is a function F m Is a release time of (2); />Is a function F m Computing task N of (1) i Lower boundary of (2); />Is a function F m Is used to schedule the slack time.
Using the above (3.3) - (3.6), the present embodiment can determine the function F m Scheduled slack time in normal mode, function F m Absolute off time in normal modeLower limit and function F m The absolute deadline of each of the computing tasks in the normal mode is also determined as a function F m Scheduling slack time in degraded mode, function F m Absolute deadline in degraded mode and function F m The absolute deadline for each of the computing tasks in the downgraded mode. Specifically, in order to function F in the normal mode m Computing task N of (1) i At processing unit P k The execution time is used as input, and the function F is calculated in the normal mode by using the formulas (2) - (7) m Computing task N of (1) i At processing unit P k The earliest start time above, function F in normal mode is calculated using equation (8) m Computing task N of (1) i At processing unit P k The earliest completion time above; select function F in normal mode m Computing task N of (1) i The minimum value of the earliest completion time on all processing units as function F in normal mode m Computing task N of (1) i Is calculated by equation (9) m The lower boundary in the normal mode is calculated by equation (10) m Computing task N of (1) i A lower boundary in normal mode; calculating function F using (11) m Scheduling slack time in normal mode; calculating function F using (12) m The absolute cutoff time lower limit in the normal mode is calculated by equation (13) m Computing task N of (1) i The absolute cutoff time in normal mode is lower. Similarly, in order to operate in degraded mode, function F m Computing task N of (1) i At processing unit P k The execution time on the table is taken as input, and the function F is calculated in a degradation mode by using the formulas (2) - (7) m Computing task N of (1) i At processing unit P k The earliest start time above, function F in degraded mode is calculated using equation (8) m Computing task N of (1) i At processing unit P k The earliest completion time above; select function F in degraded mode m Computing task N of (1) i The minimum of earliest completion times on all processing units as atIn the degraded mode, function F m Computing task N of (1) i Is calculated by equation (9) m The lower boundary in degraded mode, function F is calculated using equation (10) m Computing task N of (1) i A lower boundary in a degraded mode; calculating function F using (11) m Scheduling slack time in degraded mode; calculating function F using (12) m The absolute deadline lower limit in the degraded mode, function F is calculated using equation (13) m Computing task N of (1) i The absolute deadline in the degraded mode.
Based on the above (two) and (three), step 1 may be completed in this embodiment, and specifically, obtaining the function set to be scheduled may include: taking an initial release function as a function to be scheduled, wherein the initial release function refers to a function which is released when a hybrid key system is powered on and initialized; and arranging the functions to be scheduled in descending order according to the key level of the functions, and arranging the functions to be scheduled with the same key level in ascending order according to the scheduling relaxation time of the functions in the normal mode to obtain a function set to be scheduled. The scheduling relaxation time of the function to be scheduled in the normal mode can be calculated by using (3.3) - (3.5), namely, the calculation method of the scheduling relaxation time comprises the following steps: calculating the actual completion time of each exit task of the function, selecting the maximum value of the actual completion time as the lower boundary of the function, and calculating the scheduling relaxation time of the function according to the lower boundary of the function, wherein the actual completion time is the minimum value of the earliest completion time of the exit task on each processing unit. It should be noted that, in this embodiment, the preprocessing of all the functions to be scheduled in the set of functions to be scheduled may be completed repeatedly (third).
The lower limit of the absolute deadline of the scheduling relaxation time and the calculation task based on the HEFT algorithm in the third step provided by the embodiment can obviously reduce the deadline miss probability of the function by matching with the deadline detection mechanism in the sixth step.
(IV) determining a system ready list SYS_ReadyList:
the method and the system for determining the system ready list based on the current system key level of the hybrid key system, the inherent parameters of the functions and the execution condition self-adaption of the system key level, and the system ready list are used for determining the number of calculation tasks which are scheduled in the current round by each function to be scheduled in sequence according to the sequence of the functions to be scheduled in the set of functions to be scheduled.
(4.1) if function F m Lower than the system critical level of the hybrid critical system, function F m And the subsequent functions in the function set to be scheduled do not schedule the current round, and jump to the fifth step to start execution; otherwise, execution continues.
(4.2) computing function F m The current round allows the maximum number of computing tasks to be scheduled.
; (14)
In the formula (14), the amino acid sequence of the compound,is a function F m The current round allows the maximum number of scheduled computing tasks; />Is a function F m Key stages of (a); />Is a key level of the system; />Is a function F m The overflow history flag of (2) representing whether the expiration time is exceeded during the time detection process can be judged according to the corresponding mode of the function if the function F m In degraded mode, this indicates that overflow has occurred, at this point +.>Get 1, otherwise->Taking 0.
(4.3) slave function F m Priority of (3)The sequence Fm. Task_PrioritiyList header starts to be fetched in sequenceAnd inserts it into the tail of the system ready list sys_readyist.
It should be noted that the extraction in this embodiment is to take it out from the original place, where the original place no longer includes the content, for example from the function F m Is started to take out from the head of the priority sequence Fm.task_PriorityListComputing task, function F m Is no longer included in the priority sequence Fm.task_PriorityListAnd computing tasks. />
(4.4) if the processing of all functions in the function set to be scheduled is completed, continuing to execute, namely executing (fifth); otherwise, jumping to (4.1) to start execution.
Based on (IV), the present embodiment can complete step 2. Specifically, selecting a plurality of functions to be scheduled of the function set to be scheduled as the scheduling functions participating in the current round scheduling according to the system key level of the hybrid key system, and extracting a plurality of computing tasks from the priority sequence corresponding to each scheduling function to form a system ready list may include: judging whether the key level of the function to be scheduled is lower than the system key level of the mixed key system for each function to be scheduled of the function set to be scheduled, if not, selecting the function to be scheduled as a scheduling function participating in current round scheduling; for each scheduling function, determining the number of computing tasks participating in current round scheduling in the scheduling function according to the system key level and the key level of the scheduling function, and taking out the first N computing tasks from a priority sequence corresponding to the scheduling function, wherein N is the number of computing tasks participating in current round scheduling in the scheduling function; and sequencing the scheduling functions according to the sequence of the scheduling functions in the function set to be scheduled, and sequencing the computing tasks taken out by each scheduling function according to the sequence of the computing tasks in the priority sequence corresponding to the scheduling functions to obtain a system ready list. The method for determining the priority sequence comprises the following steps: the level of each computing task of the computing function is arranged in descending order according to the level, all computing tasks of the function are obtained, a priority sequence corresponding to the function is obtained, and the priority sequence can be determined according to (3.1) - (3.2).
The determination mode of the ready list of the system in each turn provided in the fourth embodiment actively considers the key level of the function, the key level of the system and the execution condition of the function, differentially provides computing resources for different functions, and ensures the real-time requirements of the different functions.
And (V) task scheduling:
(5.1) fetching a computing task from the head of the System Ready list, assuming that the fetched computing task is F m .N i
(5.2) calculation of F m .N i The earliest start time on each processing unit.
Calculating the earliest start time by means of equations (2) - (7), specifically, function F m Computing task N of (1) j The actual completion time of (5.4) is obtained from the previous scheduling process, processing unit P k Each computing task onNot all belonging to one function but determined in (5.4) by the previous scheduling procedure.
(5.3) calculation of F m .N i The earliest completion time on each processing unit.
The earliest completion time is calculated using equation (8).
(5.4) F m .N i Assigned to the processing unit corresponding to the minimum of the earliest completion times, F m .N i The earliest start time on its assigned processing unit as F m .N i At the start time on its assigned processing unit, at F m .N i The processing sheet allocated to the processing sheetEarliest completion time on element as F m .N i Completion time on its assigned processing unit, yielding F m .N i And schedule the F m .N i Is inserted into a position corresponding to a system scheduling list SYS_ScheduleList, wherein F m .N i The starting time on its allocated processing unit is F m .N i F is the actual start time of (F) m .N i The completion time on its assigned processing unit is F m .N i Is used to determine the actual completion time of the process.
Based on the step (v), the step (3) may be completed, and specifically, scheduling the scheduling task may include: calculating the earliest starting time and the earliest finishing time of the dispatching task on each processing unit, distributing the dispatching task to the processing unit with the earliest finishing time, taking the earliest starting time of the dispatching task on the distributed processing unit as the starting time of the dispatching task on the processing unit, and taking the earliest finishing time of the dispatching task on the distributed processing unit as the finishing time of the dispatching task on the processing unit, so as to obtain the dispatching result of the dispatching task.
And (six) detection of the cut-off time:
(6.1) if F m In the normal Mode (at this time f_mode (Fm) =0), execution is continued; otherwise, F m In the degraded Mode (at this time f_mode (Fm) =1), the jump is to (6.6) to start execution.
(6.2) if F m .N i Missing F m .N i The absolute lower cutoff time limit in normal mode (i.e. F m .N i Is greater than F m .N i The absolute deadline lower limit in normal mode), execution continues; otherwise, jumping to (eight) to start execution.
(6.3) canceling the current round schedule in the system schedule list SYS_ScheduleList to be the function F m Temporarily stores it in the cancel_task_set.
(6.4) the totally cancelled calculation tasks Cancel task set are put back into the system ready list sys_readylist in the original order.
(6.5) with F_Mode (Fm) set to 1, jump to (fifth) start execution.
(6.6) if F m .N i Missing F m .N i Lower absolute deadline in degraded mode (i.e. F m .N i Is greater than F m .N i Lower absolute deadlines in degraded mode), then execution continues; otherwise, jumping to (seventh) to begin execution.
(6.7) functional F m The function over budget flag bit F_OverRun (Fm) is set to function F m Critical stage fm.crit.
(6.8) if System Critical level SYS.Criticity is less than function F m Is carried out continuously; otherwise, jumping to (seventh) to begin execution.
(6.9) canceling the calculation tasks which are not executed and are scheduled in the current round and the previous round in the system scheduling list SYS_ScheduleList, and temporarily storing the calculation tasks in the cancel_task_set.
(6.10) canceling the unscheduled calculation task in the system ready list sys_readylist and temporarily storing it in the cancel_task_set.
(6.11) the all cancelled computing tasks Cancel_task_set are put back to the corresponding priority sequence according to the original orderAt this time, each cancelled computing task is placed in the priority sequence of the function to which it belongs.
(6.12) System Critical level SYS. Criticity is set to function F m Critical stage fm.crit, jumps to (eight) to begin execution.
The function degradation mode proposed in the sixth embodiment provides acceptable calculation results with fewer calculation resources, and can significantly reduce the probability that the function misses the deadline. Security is more important than computational refinement, and in practical applications security is also the first.
And (seventh) system field recovery:
(7.1) if function F m Complete dispatch and function F m If the function exceeding budget flag bit F_OverRun (Fm) is not 1, continuing to execute; otherwise, jumping to (eight) to start execution.
(7.2) function F m The function over budget flag bit f_overrun (Fm) is reset to 1.
(7.3) if function F m If critical level Fm.crit is greater than maximum value max (F_OverRun) of the function exceeding budget flag, then continuing execution; otherwise, jumping to (eight) to start execution.
(7.4) canceling the unscheduled computing task in the system ready list SYS_ReadyList, and temporarily storing the unscheduled computing task in the cancer_task_set.
(7.5) the all cancelled computing tasks Cancel_task_set are put back to the corresponding priority sequence according to the original order
(7.6) setting the system critical level SYS.Criticity to the maximum value max (F_OverRun) of the function exceeding budget flag, and jumping to (eight) to start execution.
The system key level upgrading mechanism and the system field recovery mechanism in the step (six) fully consider the system key level, the key level triggering upgrading and downgrading switching functions and the execution condition of the whole system function, adaptively adjust the system key level, ensure the real-time requirement of the high key level function as much as possible, avoid large-scale repeated scheduling work and reduce the time complexity of the algorithm.
(eight) updating system priority:
(8.1) if all the computing tasks in the system ready list SYS_ReadyList have completed scheduling, continuing to execute; otherwise, jumping to (fifth) to start execution.
(8.2) calculating the actual scheduling relaxation time of each function in the set of functions to be scheduled in turn, assuming function F in the set of functions to be scheduled m The current last of them completes the adjustmentThe calculation task of the degree is N i F is then m .N i The calculation formula of the actual scheduling relaxation time in the normal mode is as follows (15), F m .N i The calculation formula of the actual scheduled slack time in the degraded mode is as follows (16):
;(15)
in the formula (15), the amino acid sequence of the compound,is a function F m Is used for the actual scheduling relaxation time;is a function F m Computing task N of (1) i A lower absolute cutoff time limit in normal mode; />Is a function F m Computing task N of (1) i Is used to determine the actual completion time of the process.
;(16)
In the formula (16), the amino acid sequence of the compound,is a function F m Is used for the actual scheduling relaxation time;is a function F m Computing task N of (1) i A lower absolute deadline in a degraded mode; />Is a function F m Computing task N of (1) i Is used to determine the actual completion time of the process.
It is particularly pointed out that,is in five) Is different from ++generated by the pretreatment of the function in (III)>
And (8.3) arranging the functions in the function set to be scheduled in descending order according to the key level of the functions, arranging the functions with the same key level in ascending order according to the actual scheduling relaxation time of the functions to obtain a new function set to be scheduled, and jumping to the fourth step to start execution.
Based on (six) - (eight), this embodiment can complete step 4. Specifically, in step 4, the method for calculating the absolute deadline lower limit of the scheduling task in the normal mode includes: and calculating the sum of the release time of the function of the scheduled task, the lower boundary of the scheduled task in the normal mode and the scheduling relaxation time of the function of the scheduled task in the normal mode, and obtaining the absolute deadline lower limit of the scheduled task in the normal mode. The method for calculating the absolute deadline lower limit of the scheduling task in the degradation mode comprises the following steps: and calculating the sum of the release time of the function of the scheduling task, the lower boundary of the scheduling task in the degradation mode and the scheduling relaxation time of the function of the scheduling task in the degradation mode, and obtaining the absolute deadline lower limit of the scheduling task in the degradation mode. Updating the system schedule list and the system ready list may include: taking out the calculation tasks belonging to the functions of the scheduling tasks and scheduled in the current round in the system scheduling list to obtain a new system scheduling list; and adding all the fetched computing tasks to the system ready list to obtain a new system ready list. Updating the system schedule list, the system ready list, and the priority sequence may include: taking out unexecuted computing tasks of current round scheduling and previous round scheduling in the system scheduling list to obtain a new system scheduling list; taking out unscheduled computing tasks in the system ready list to obtain a new system ready list; and adding all the extracted calculation tasks into the priority sequence to obtain a new priority sequence. Updating the system ready list and the priority sequence may include: taking out unscheduled computing tasks in the system ready list to obtain a new system ready list; and adding all the extracted calculation tasks into the priority sequence to obtain a new priority sequence. Reordering the set of functions to be scheduled may include: calculating the actual scheduling relaxation time of each function to be scheduled of the function set to be scheduled; the functions to be scheduled are arranged in descending order according to the key level of the functions, and the functions to be scheduled with the same key level are arranged in ascending order according to the actual scheduling relaxation time; the calculation method of the actual scheduling relaxation time comprises the following steps: if the function to be scheduled is in the normal mode at the current moment, calculating the difference value between the absolute deadline lower limit of the detection task in the normal mode and the actual completion time of the detection task to obtain the actual scheduling relaxation time of the function to be scheduled; if the function to be scheduled is in the degradation mode at the current moment, calculating the difference value between the absolute deadline lower limit of the detection task in the degradation mode and the actual completion time of the detection task to obtain the actual scheduling relaxation time of the function to be scheduled; and detecting the task as the last calculation task which is corresponding to the function to be scheduled at the current time and completes scheduling.
The priority order of different functions is updated after each round of scheduling is completed, so that the high-key-level functions and the overall deadline miss rate of the system can be obviously reduced, and the time efficiency of the system is improved.
In the operation process of the hybrid key system of the embodiment, a new release function may be generated according to the actual operation of the driver, and the new release function needs to be added to the function set to be scheduled at this time to schedule again, so the adaptive dynamic scheduling method of the embodiment further includes:
and (nine) an interrupt service routine for handling the newly released function FNew:
(9.1) canceling the computing task with the key level lower than FNuse in the system ready list SYS_ReadyList, and temporarily storing the computing task in the cancer_task_set.
(9.2) Cancel the calculation task whose key level in the system ready list sys_readylist is the same as FNew and whose function does not miss its absolute deadline lower bound, and temporarily store it in cancer_task_set.
(9.3) canceling the computing task with the key level lower than FNew, which is not executed in the system scheduling list SYS_ScheduleList, and temporarily storing the computing task in the cancer_task_set.
(9.4) canceling the calculation task which has the same key level as FNew and whose function does not miss the lower limit of the absolute deadline and temporarily storing the calculation task in the cancer_task_set.
(9.5) the all cancelled computing tasks Cancel_task_set are put back to the corresponding priority sequence according to the original order
(9.6) updating the scheduled slack time of all the functions because the actual scheduled slack time of the functions is changed by canceling part of the function put back into the priority sequence.
The actual scheduled relaxation time of the function is calculated using equation (15) and equation (16).
And (9.7) adding the FNew into the function set to be scheduled, and finishing the pretreatment of the function FNew according to the third step.
(9.8) arranging the functions in the function set to be scheduled according to the descending order of the key levels of the functions, and arranging the functions with the same key levels according to the ascending order of the actual scheduling relaxation time. In particular, the actual scheduled slack time of the new function is the scheduled slack time of the new function in the normal mode.
(9.9) returning to the main program, and jumping to (fourth) and continuing to execute.
Based on the step (nine), if there is a new release function, the adaptive dynamic scheduling method of this embodiment further includes: taking out the calculation tasks of the scheduling functions with the key level lower than the key level of the newly released function and the calculation tasks of the scheduling functions with the key level identical to the key level of the newly released function and without missing the absolute deadline lower limit of the function from the system ready list, and obtaining a new system ready list; the method comprises the steps of taking out unexecuted calculation tasks of scheduling functions with key levels lower than the key level of a newly released function and unexecuted calculation tasks of scheduling functions with key levels identical to the key level of the newly released function and without missing the absolute deadline lower limit of the function in a system scheduling list, and obtaining a new system scheduling list; adding all the extracted calculation tasks into the priority sequence to obtain a new priority sequence; calculating the actual scheduling relaxation time of each function to be scheduled of the function set to be scheduled, taking the scheduling relaxation time of the newly released function in the normal mode as the actual scheduling relaxation time of the newly released function, adding the newly released function to the function set to be scheduled, arranging a plurality of functions to be scheduled in the function set to be scheduled in descending order according to the key level of the function, arranging the functions to be scheduled with the same key level in ascending order according to the actual scheduling relaxation time, obtaining the new function set to be scheduled, and returning to the step of selecting a plurality of functions to be scheduled of the function set to be scheduled according to the system key level of the hybrid key system as the scheduling function participating in the current round scheduling.
The interrupt service routine provided in the embodiment (nine) dynamically updates the function set to be scheduled along with the system operation, and can adaptively process the scheduled unexecuted calculation tasks and the random dynamic release function, thereby taking into account the performance and time efficiency of the scheduling strategy.
The adaptive dynamic scheduling method of the hybrid key system provided by the embodiment actively considers the key level of the function in the scheduling process, fuses the degradation mode of the function, adopts the function of processing random dynamic release by using the system interrupt service, combines an efficient cancel rescheduling mechanism, ensures orderly execution of the functions of each key level, and improves the overall safety of the vehicle and the utilization efficiency of computing resources. Aiming at the hybrid key system, the self-adaptive dynamic scheduling method has the advantages that the optimal allocation of the computing resources of the whole control system of the vehicle can be realized, the utilization rate of the system resources is improved, and the safety of the vehicle is ensured.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (10)

1. The adaptive dynamic scheduling method of the hybrid key system is characterized by comprising the following steps of:
acquiring a function set to be scheduled; the function set to be scheduled comprises a plurality of functions to be scheduled, and the functions to be scheduled are ordered according to key levels of the functions and scheduling relaxation time of the functions in a normal mode; each function to be scheduled comprises a plurality of calculation tasks;
selecting a plurality of functions to be scheduled of the function set to be scheduled as scheduling functions participating in current round scheduling according to a system key level of a hybrid key system, and taking out a plurality of computing tasks from a priority sequence corresponding to each scheduling function to form a system ready list;
taking out a first computing task from the head of the system ready list as a scheduling task, scheduling the scheduling task to obtain a scheduling result of the scheduling task, and adding the scheduling result into a system scheduling list; the scheduling result comprises a processing unit for executing the scheduling task and a starting time and a finishing time of the scheduling task on the processing unit;
if the function of the scheduling task is in a normal mode, judging whether the scheduling task misses the absolute deadline lower limit of the scheduling task in the normal mode, and obtaining a first judging result; if the first judgment result is yes, updating the system scheduling list and the system ready list, updating the function of the scheduling task to be in a degradation mode, and returning to the step of taking out the first computing task from the head of the system ready list as the scheduling task; if the first judgment result is negative, jumping to a round updating step;
If the function to which the scheduling task belongs is in a degradation mode, judging whether the scheduling task misses the absolute deadline lower limit of the scheduling task in the degradation mode, and obtaining a second judgment result; if the second judgment result is yes, updating the function exceeding budget flag bit of the function of the scheduling task as the key level of the function of the scheduling task, judging whether the key level of the system is lower than the key level of the function of the scheduling task, and obtaining a third judgment result; if the third judging result is yes, updating the system scheduling list, the system ready list and the priority sequence, updating the system key level as the key level of the function of the scheduling task, and jumping to a round updating step; if the third judging result is no or the second judging result is no, judging whether all computing tasks belonging to the functions of the scheduling tasks in the system ready list are scheduled and whether the functions of the scheduling tasks exceed a budget mark bit and are not 1, so as to obtain a fourth judging result; if the fourth judgment result is yes, updating the function exceeding budget flag bit of the function to which the scheduling task belongs to 1, judging whether the key level of the function to which the scheduling task belongs is larger than the maximum value of the function exceeding budget flag bit of all functions, and obtaining a fifth judgment result; if the fifth judging result is yes, updating the system ready list and the priority sequence, updating the system key level to the maximum value of the function exceeding budget mark bits of all functions, and jumping to a round updating step; if the fifth judging result is negative or the fourth judging result is negative, jumping to a round updating step;
The round update steps are as follows: judging whether the computing tasks in the system ready list are all scheduled, if yes, reordering the function sets to be scheduled, and returning to the step of selecting a plurality of functions to be scheduled of the function sets to be scheduled according to the system key level of the hybrid key system as scheduling functions participating in current round scheduling; if not, returning to the step of taking the first computing task from the system ready list head as the scheduling task.
2. The adaptive dynamic scheduling method according to claim 1, wherein the obtaining the set of functions to be scheduled specifically includes:
taking the initial release function as a function to be scheduled;
and arranging the functions to be scheduled in descending order according to the key level of the functions, and arranging the functions to be scheduled with the same key level in ascending order according to the scheduling relaxation time of the functions in the normal mode to obtain a function set to be scheduled.
3. The adaptive dynamic scheduling method according to claim 1 or 2, wherein the scheduling relaxation time calculation method comprises: calculating the actual completion time of each outlet task of a function, and selecting the maximum value of the actual completion time as the lower boundary of the function; and calculating the scheduling relaxation time of the function according to the lower boundary of the function.
4. The adaptive dynamic scheduling method according to claim 1, wherein the selecting, according to the system key level of the hybrid key system, the plurality of functions to be scheduled of the set of functions to be scheduled as scheduling functions participating in current round scheduling, and extracting a plurality of computing tasks from the priority sequence corresponding to each scheduling function to form a system ready list specifically includes:
judging whether the key level of the function to be scheduled is lower than the system key level of a hybrid key system for each function to be scheduled of the function set to be scheduled; if not, selecting the function to be scheduled as a scheduling function participating in current round scheduling;
for each scheduling function, determining the number of computing tasks participating in current round scheduling in the scheduling function according to the system key level and the key level of the scheduling function, and taking out the first N computing tasks from a priority sequence corresponding to the scheduling function; n is the number of calculation tasks participating in current round scheduling in the scheduling function;
and sequencing the scheduling functions according to the sequence of the scheduling functions in the to-be-scheduled function set, and sequencing the computing tasks taken out by each scheduling function according to the sequence of the computing tasks in the priority sequence corresponding to the scheduling functions to obtain a system ready list.
5. The adaptive dynamic scheduling method according to claim 1 or 4, wherein the method for determining the priority sequence comprises: a level of each computing task of the computing function; and descending order arrangement is carried out on all the calculation tasks of the functions according to the grades, so that a priority sequence corresponding to the functions is obtained.
6. The adaptive dynamic scheduling method according to claim 1, wherein the scheduling task to obtain the scheduling result of the scheduling task specifically includes: calculating the earliest starting time and the earliest finishing time of the dispatching task on each processing unit, distributing the dispatching task to the processing unit with the earliest finishing time, taking the earliest starting time of the dispatching task on the processing unit as the starting time of the dispatching task on the processing unit, and taking the earliest finishing time of the dispatching task on the processing unit as the finishing time of the dispatching task on the processing unit to obtain a dispatching result of the dispatching task.
7. The adaptive dynamic scheduling method of claim 1, wherein,
The updating the system scheduling list and the system ready list specifically comprises: taking out the calculation tasks belonging to the function to which the scheduling task belongs, which are scheduled by the current round in the system scheduling list, so as to obtain a new system scheduling list; adding all the fetched computing tasks to the system ready list to obtain a new system ready list;
the updating the system schedule list, the system ready list and the priority sequence specifically comprises: taking out unexecuted computing tasks of current round scheduling and previous round scheduling in the system scheduling list to obtain a new system scheduling list; taking out unscheduled computing tasks in the system ready list to obtain a new system ready list; adding all the extracted calculation tasks into the priority sequence to obtain a new priority sequence;
the updating the system ready list and the priority sequence specifically comprises: taking out unscheduled computing tasks in the system ready list to obtain a new system ready list; and adding all the extracted calculation tasks into the priority sequence to obtain a new priority sequence.
8. The adaptive dynamic scheduling method according to claim 1, wherein the reordering the to-be-scheduled function set specifically comprises:
Calculating the actual scheduling relaxation time of each function to be scheduled of the function set to be scheduled; the functions to be scheduled are arranged in descending order according to the key level of the functions, and the functions to be scheduled with the same key level are arranged in ascending order according to the actual scheduling relaxation time;
the calculation method of the actual scheduling relaxation time comprises the following steps:
if the function to be scheduled is in a normal mode at the current moment, calculating a difference value between the lower limit of the absolute deadline of the detection task in the normal mode and the actual completion time of the detection task to obtain the actual scheduling relaxation time of the function to be scheduled; if the function to be scheduled is in a degradation mode at the current moment, calculating a difference value between the absolute deadline lower limit of the detection task in the degradation mode and the actual completion time of the detection task to obtain the actual scheduling relaxation time of the function to be scheduled; and the detection task is the last calculation task which is corresponding to the function to be scheduled at the current time and is used for completing scheduling.
9. The adaptive dynamic scheduling method according to claim 2, wherein if there is a newly released function, the computing task of the scheduling function having a lower key level than the key level of the newly released function in the system ready list and the computing task of the scheduling function having the same key level as the key level of the newly released function and not missing the absolute deadline lower limit of the function are fetched to obtain a new system ready list; extracting unexecuted calculation tasks of the scheduling functions with the key level lower than the key level of the newly released function and unexecuted calculation tasks of the scheduling functions with the key level identical to the key level of the newly released function and without missing the absolute deadline lower limit of the functions from the system scheduling list to obtain a new system scheduling list; adding all the extracted calculation tasks into the priority sequence to obtain a new priority sequence; calculating the actual scheduling relaxation time of each function to be scheduled of the function set to be scheduled, taking the scheduling relaxation time of the newly released function in a normal mode as the actual scheduling relaxation time of the newly released function, adding the newly released function to the function set to be scheduled, arranging a plurality of functions to be scheduled in the function set to be scheduled in a descending order according to the key level of the function, and arranging the functions to be scheduled with the same key level in an ascending order according to the actual scheduling relaxation time to obtain a new function set to be scheduled, and returning to the step of selecting a plurality of functions to be scheduled of the function set to be scheduled according to the system key level of a hybrid key system as the scheduling function participating in current round scheduling.
10. The adaptive dynamic scheduling method of claim 9, wherein the method for calculating the absolute deadline of the function comprises: calculating the sum of the release time of the function and the relative cut-off time of the function to obtain the absolute cut-off time lower limit of the function;
the method for calculating the absolute deadline lower limit of the scheduling task in the normal mode comprises the following steps: calculating the sum of the release time of the function to which the scheduling task belongs, the lower boundary of the scheduling task in the normal mode and the scheduling relaxation time of the function to which the scheduling task belongs in the normal mode, and obtaining the absolute deadline lower limit of the scheduling task in the normal mode;
the method for calculating the absolute deadline lower limit of the scheduling task in the degradation mode comprises the following steps: and calculating the sum of the release time of the function to which the scheduling task belongs, the lower boundary of the scheduling task in the degradation mode and the scheduling relaxation time of the function to which the scheduling task belongs in the degradation mode to obtain the absolute deadline lower limit of the scheduling task in the degradation mode.
CN202310698745.9A 2023-06-14 2023-06-14 Self-adaptive dynamic scheduling method of hybrid key system Active CN116430738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310698745.9A CN116430738B (en) 2023-06-14 2023-06-14 Self-adaptive dynamic scheduling method of hybrid key system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310698745.9A CN116430738B (en) 2023-06-14 2023-06-14 Self-adaptive dynamic scheduling method of hybrid key system

Publications (2)

Publication Number Publication Date
CN116430738A CN116430738A (en) 2023-07-14
CN116430738B true CN116430738B (en) 2023-08-15

Family

ID=87083705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310698745.9A Active CN116430738B (en) 2023-06-14 2023-06-14 Self-adaptive dynamic scheduling method of hybrid key system

Country Status (1)

Country Link
CN (1) CN116430738B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116755865B (en) * 2023-08-15 2023-11-10 北京理工大学 Hybrid key system deployment method and device based on automobile embedded platform

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508708A (en) * 2011-11-30 2012-06-20 湖南大学 Heterogeneous multi-core energy-saving task schedule method based on improved genetic algorithm
CN105700941A (en) * 2015-12-18 2016-06-22 西安工业大学 Three-dimensional scheduler model and scheduling algorithm thereof
CN109799805A (en) * 2019-01-17 2019-05-24 湖南大学 A kind of high-performing car electronic schedule algorithm of reliability perception
CN110008013A (en) * 2019-03-28 2019-07-12 东南大学 A kind of Spark method for allocating tasks minimizing operation completion date
CN111736959A (en) * 2020-07-16 2020-10-02 南京南软科技有限公司 Spark task scheduling method considering data affinity under heterogeneous cluster
CN113485801A (en) * 2021-06-25 2021-10-08 中国科学技术大学苏州高等研究院 Real-time DNN scheduling system and method based on neural network similarity modeling
CN116244073A (en) * 2023-02-06 2023-06-09 中山大学 Resource-aware task allocation method for hybrid key partition real-time operating system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4124949A1 (en) * 2021-07-27 2023-02-01 Tata Consultancy Services Limited Systems and methods for dynamic task schedulng and rescheduling using heterogenous multi agent fleet

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508708A (en) * 2011-11-30 2012-06-20 湖南大学 Heterogeneous multi-core energy-saving task schedule method based on improved genetic algorithm
CN105700941A (en) * 2015-12-18 2016-06-22 西安工业大学 Three-dimensional scheduler model and scheduling algorithm thereof
CN109799805A (en) * 2019-01-17 2019-05-24 湖南大学 A kind of high-performing car electronic schedule algorithm of reliability perception
CN110008013A (en) * 2019-03-28 2019-07-12 东南大学 A kind of Spark method for allocating tasks minimizing operation completion date
CN111736959A (en) * 2020-07-16 2020-10-02 南京南软科技有限公司 Spark task scheduling method considering data affinity under heterogeneous cluster
CN113485801A (en) * 2021-06-25 2021-10-08 中国科学技术大学苏州高等研究院 Real-time DNN scheduling system and method based on neural network similarity modeling
CN116244073A (en) * 2023-02-06 2023-06-09 中山大学 Resource-aware task allocation method for hybrid key partition real-time operating system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于虚拟化策略的多核混合关键性系统调度技术研究;杨涛;中国博士学位论文全文数据库(信息科技辑)(第4期);35-85 *

Also Published As

Publication number Publication date
CN116430738A (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN116430738B (en) Self-adaptive dynamic scheduling method of hybrid key system
Zheng et al. Definition of task allocation and priority assignment in hard real-time distributed systems
US20100262971A1 (en) Multi core system, vehicular electronic control unit, and task switching method
US20110113431A1 (en) Method and apparatus for scheduling tasks to control hardware devices
US10572748B2 (en) Autonomous vehicle adaptive parallel image processing system
CN101452404A (en) Task scheduling apparatus and method for embedded operating system
CN109799805B (en) Reliability-aware high-performance automobile electronic scheduling algorithm
JP2011028559A (en) Relay program and electronic control device
KR101073428B1 (en) Method for scheduling task in embedded operating system of automobile
CN111367644A (en) Task scheduling method and device for heterogeneous fusion system
CN113835866B (en) Multithreading task scheduling optimization method
Xie et al. A high-performance dag task scheduling algorithm for heterogeneous networked embedded systems
CN111061565B (en) Two-section pipeline task scheduling method and system in Spark environment
JP4985662B2 (en) Program and control device
CN111209094A (en) Request processing method and device, electronic equipment and computer readable storage medium
CN115033357A (en) Micro-service workflow scheduling method and device based on dynamic resource selection strategy
CN109871270B (en) Scheduling scheme generation method and device
CN115220787A (en) Driving control instruction generation method, heterogeneous calculation method, related device and system
CN115421735A (en) Heterogeneous deployment method and device for deep learning task and electronic equipment
CN111352713A (en) Automatic driving reasoning task workflow scheduling method for time delay optimization in edge environment
CN115619002A (en) Flexible dynamic mixed key system scheduling method
JP2011170619A (en) Multithread processor
CN115248724A (en) Real-time scheduling for heterogeneous multi-core systems
CN111597018B (en) Robot job scheduling method and device
CN116339957B (en) Task scheduling method and system for heterogeneous distributed platform hybrid key system

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