An Inaccurate Hybrid Task Energy-Saving Scheduling Method Based on Genetic Algorithm
By using an inaccurate hybrid critical task scheduling method based on genetic algorithms, the allocation of tasks to multiprocessors is optimized, which solves the problem of high energy consumption of hybrid critical systems on multiprocessor platforms and achieves energy reduction and task deadline satisfaction.
Patent Information
- Application Number
- CN202310163206.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-02-24
AI Technical Summary
Existing hybrid critical systems struggle to reduce energy consumption while maintaining real-time performance on multiprocessor platforms, and traditional scheduling methods do not adequately consider energy optimization.
An inaccurate hybrid critical task scheduling method based on genetic algorithms is adopted. By establishing an inaccurate hybrid critical task model, formulating a fitness function, performing encoding, crossover and mutation operations on task mapping, optimizing the allocation of tasks to multiprocessors, calculating energy consumption and scheduling task sets.
It achieved a 10.88% reduction in system energy consumption while meeting task deadlines, and provided degradation services for low-criticality tasks in high mode.
Smart Images

Figure CN116185591B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to real-time scheduling of real-time systems, industrial control systems, and hybrid critical systems, and particularly to an inaccurate hybrid critical task energy-saving scheduling method based on a genetic algorithm. Background Technology
[0002] With the development of embedded real-time systems, system functions are becoming increasingly complex, and more functions need to be executed in systems with limited processing performance, energy consumption, and resources. In order to make full use of limited resources, integrating multiple functions into a single system has become a major trend. Such integrated systems are called hybrid critical systems and are widely used in the automotive and avionics industries. For example, the avionics standard ARINC and the European automotive software standard AUTOSAR both emphasize the hybrid criticality of systems.
[0003] In recent years, hybrid critical systems have become a hot research topic. To meet increasingly diverse and complex needs, improving the quality of service (QoS) of low-critical tasks has been a key focus of academia. With the slowdown of Moore's Law, multiprocessor platforms have gradually replaced single-processor platforms as the mainstream computing platforms. Simultaneously, hybrid critical systems are being deployed on higher-performance multiprocessor systems. However, multiprocessor systems require greater energy consumption, and reducing energy consumption while ensuring system real-time performance has become a challenge. Existing research on hybrid critical scheduling mainly focuses on system scheduleability, with relatively little research considering energy consumption. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an energy-saving scheduling method for inaccurate hybrid critical tasks based on genetic algorithms. This method, based on an inaccurate hybrid critical task model, encodes the mapping of inaccurate hybrid critical tasks to multiple processors, formulates a fitness function to evaluate and select task-to-processor mapping schemes, and performs crossover and mutation operations on existing task mapping schemes to find the optimal load-balanced task mapping scheme. Finally, it calculates the energy-efficient speed of each processor's task set to ensure that all tasks meet deadline requirements and reduce system energy consumption.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] An inaccurate hybrid energy-saving scheduling method for critical tasks based on genetic algorithms includes:
[0007] Establish an imprecise hybrid mission scheduling model;
[0008] Encode the inaccurate mixed-critical task-to-multiprocessor mapping;
[0009] Define a fitness function to evaluate and select task mapping schemes from tasks to processors;
[0010] Perform cross-operation and mutation operations on existing task mapping schemes;
[0011] Calculate the energy-optimized speed for each processor task set and schedule the task set at the corresponding speed.
[0012] The establishment of the semi-perspective, non-precise hybrid critical task scheduling model includes:
[0013] The main difference between the inaccurate hybrid mission-critical model and the traditional hybrid mission-critical model lies in how the system handles low-critical-level tasks in high mode: the inaccurate hybrid mission-critical model does not abandon the execution of any low-critical-level tasks when the system is in high mode, while the traditional hybrid mission-critical model completely abandons the execution of low-critical-level tasks when the system is in high mode.
[0014] Considering an inaccurate mixed critical cyclic task set Γ={τ1,τ2,…,τ on a multiprocessor system n The task set is scheduled using a preemptive fixed-priority strategy; mixed critical cycle tasks τ i (1≤i≤n, where i is an integer) is represented by the quintuple {T} i D i ξ i C i (LO), C i (HI)} is composed of, where T i Represents a hybrid critical cycle task τ i The period; D i Table of Hybrid Key Cyclic Tasks τ i The relative deadline, and it is equal to T. i ξ i Represents hybrid critical mission τ i The key level, whose value is ξ i= {LO, HI}, Hybrid critical cycle task τ i When the critical level is LO, it is a low-critical-level task, and the mixed-critical-cycle task τ i When the critical level is HI, it is a high-critical-level task; C i (LO) and C i (HI) represent hybrid critical cycle tasks τ, respectively. i Worst execution time in system low and high modes; system in low mode means any task τ i Their execution time does not exceed C i (LO); The system being in high mode means that there are high-critical-level tasks τ. i Its execution time exceeds Ci (LO) but not exceeding C i (HI) and provide degradation services for low-critical-level tasks; if mixed-critical-cycle tasks τ i For low-criticality tasks, then C i (HI)≤C i (LO); if the mixed critical cycle tasks τ i For high-criticality tasks, then C i (HI)≥C i (LO); Processor set P = {P1, P2, ..., P...} m Furthermore, these m processors have the same architecture and operate independently without interfering with each other; the so-called fixed priority strategy means that once the priority of a task is determined, its priority remains unchanged during execution.
[0015] Preferably, the encoding of the inaccurate hybrid mission-critical mapping to multiprocessor specifically includes:
[0016] When the system is in low-level mode, the task mapping scheme is encoded using a two-dimensional matrix A, and the corresponding chromosome encoding formula is as follows:
[0017]
[0018] Where A is an m×n two-dimensional matrix, and its element a ij The value of a can only be 0 or 1 (1≤j≤m, where j is an integer), and a ij =1 indicates a hybrid critical cycle task τ j Assign it to processor i; let K represent the total number of task mapping schemes in the population, A k (1≤k≤K, where k is an integer) represents the kth task mapping scheme when the system is in low mode;
[0019] When the system is in high mode, the task mapping scheme is encoded using a two-dimensional matrix B, and the corresponding chromosome encoding formula is as follows:
[0020]
[0021] B is an m×n two-dimensional matrix, where the elements b ij The value of b can only be 0 or 1, and b ij =1 indicates a hybrid critical cycle task τ j Assigned to processor i; B k This represents the k-th task mapping scheme in high mode of the system;
[0022] Preferably, the step of formulating a fitness function to evaluate and select a task-to-multiprocessor mapping scheme specifically includes:
[0023] The load standard deviation of each processor under different system modes is selected as the fitness value of the task mapping scheme for calculation. The corresponding calculation formula is as follows:
[0024]
[0025] Where α (0≤α≤1, α is a decimal) and β (β=1-α, β is a decimal) represent the proportions of low mode and high mode in the task set Γ supercycle, respectively; and Let represent the standard deviations of the processor load for the k-th task mapping scheme in low mode and high mode, respectively. The corresponding calculation formulas are as follows:
[0026]
[0027]
[0028] in, In low mode, task mapping scheme A k The load of the j-th processor; In low mode, task mapping scheme A k The corresponding average processor load; This indicates that in high mode, task mapping scheme B... k The load of the j-th processor; This indicates that in high mode, task mapping scheme B... k The corresponding average processor load;
[0029] The fitness value, calculated using a fitness function, determines the probability of selecting a task mapping scheme. The corresponding calculation formula is as follows:
[0030]
[0031] Preferably, the crossover and mutation operations on the existing task mapping scheme specifically include:
[0032] The crossover operation involves selecting two task mapping schemes from all available options and crossing them. Let k1 (1≤k1≤k, k1 is an integer) and k2 (1≤k2≤k, k2 is an integer and k1≠k2) represent the selected task mapping schemes, and c (1≤c≤n, c is an integer) represent the index of the selected crossover point to generate a new task mapping. The corresponding crossover operation formula in low-level mode is as follows:
[0033]
[0034] Among them, k3 and k4 are the new task mapping schemes generated after the crossover operation. and These are the encodings of the k3 (k3 is an integer) and k4 (k4 is an integer) mapping schemes in low mode, respectively; I n (c) and I′ n (c) The corresponding formula is as follows:
[0035]
[0036]
[0037] Among them, I c and I (n-c) These are identity matrices of length c and (nc), respectively.
[0038] The crossover operation formula corresponding to the high mode is as follows:
[0039]
[0040] in, and These are the encodings of the k3 and k4 mapping schemes in high mode, respectively;
[0041] The mutation operation involves selecting one task mapping scheme from all available options for mutation. Let k5 (1 ≤ k5 ≤ K, where k5 is an integer) represent a randomly selected task mapping. One of the tasks in this mapping is then reassigned to another processor. Assume the selected task is τ. x Then x (1≤x≤n, where x is an integer) is the mutation point. Then, another randomly selected processor index r (1≤r≤m, where r is an integer) is used as the new processor index. The corresponding mutation operation in low mode is formulated as follows:
[0042]
[0043] Where k6 (k6 is an integer) is the new task mapping scheme generated after the mutation operation. Encoding of the k6 mapping scheme in low mode; I″ n (x) is an n×n matrix containing the following elements: a yy =1 and y≠x, all other elements are 0; and These are unit vectors whose r-th and x-th elements are both 1, respectively.
[0044] The mutation operation in high mode is formulated as follows:
[0045]
[0046] in Encoding of the k6 mapping scheme in high mode;
[0047] Preferably, the step of calculating the energy consumption optimization speed of each processor task set and scheduling the task set at the corresponding speed specifically includes:
[0048] The task mapping scheme with the highest fitness value in the population is encoded and decoded, and its energy-optimized speed S is calculated based on the task set allocated to each processor. j The calculation formula is as follows:
[0049]
[0050] in, To be allocated to processor P j The task set; For task set The utilization rate of low-critical-level tasks in the medium-low mode is calculated using the following formula:
[0051]
[0052] For task set The utilization rate of high-critical-level tasks in the medium-to-high mode is calculated using the following formula:
[0053]
[0054] N j For task set Number of tasks; F(N) j The above-mentioned utilization upper bound for the monotonic rate invocation of inaccurate hybrid critical tasks is given by the following formula:
[0055]
[0056] The energy consumption calculation formula for the inaccurate hybrid mission set Γ is as follows:
[0057]
[0058] Among them, P ind It is the power consumption independent of processor speed; θ is the ratio of the processor's maximum dynamic power consumption to its static power consumption; LCM is the time-to-cycle of the task set Γ, i.e., all tasks.
[0059] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:
[0060] (1) The method of the present invention can ensure that all tasks meet the deadline requirements;
[0061] (2) The method of the present invention saves 10.88% of energy compared with other algorithms;
[0062] (3) The method of the present invention can provide degradation services for low-critical-level tasks when the system is in high mode.
[0063] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention’s non-precise hybrid critical task energy-saving scheduling method based on genetic algorithm is not limited to the embodiments. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating the method of the present invention. Detailed Implementation
[0065] The technical solutions in the embodiments of the present invention will be described and discussed in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0066] See Figure 1 As shown, the present invention provides an inaccurate hybrid critical task energy-saving scheduling method based on a genetic algorithm, comprising the following steps:
[0067] S1. Establish an imprecise hybrid critical task scheduling model.
[0068] Specifically, the main difference between the inaccurate hybrid mission-critical model and the traditional hybrid mission-critical model lies in how the system handles low-critical-level tasks in high mode: the inaccurate hybrid mission-critical model does not abandon the execution of any low-critical-level tasks when the system is in high mode, while the traditional hybrid mission-critical model completely abandons the execution of low-critical-level tasks when the system is in high mode.
[0069] Considering an inaccurate mixed critical cyclic task set Γ={τ1,τ2,…,τ on a multiprocessor system n The task set is scheduled using a preemptive fixed-priority strategy; mixed critical cycle tasks τ i (1≤i≤n, where i is an integer) is represented by the quintuple {T} i D i ξ i C i (LO), C i (HI)} is composed of, where T i Represents a hybrid critical cycle task τ i The period; D i Table of Hybrid Key Cyclic Tasks τ i The relative deadline, and it is equal to T. i ξ i Represents hybrid critical mission τ i The key level, whose value is ξ i ={LO, HI}, Hybrid critical cycle task τ iWhen the critical level is LO, it is a low-critical-level task, and the mixed-critical-cycle task τ i When the critical level is HI, it is a high-critical-level task; C i (LO) and C i (HI) represent hybrid critical cycle tasks τ, respectively. i Worst execution time in system low and high modes; system in low mode means any task τ i Their execution time does not exceed C i (LO); The system being in high mode means that there are high-critical-level tasks τ. i Its execution time exceeds C i (LO) but not exceeding C i (HI) and provide degradation services for low-critical-level tasks; if mixed-critical-cycle tasks τ i For low-criticality tasks, then C i (HI)≤C i (LO); if the mixed critical cycle tasks τ i For high-criticality tasks, then C i (HI)≥C i (LO); Processor set P = {P1, P2, ..., P...} m}, and these m processors have the same architecture and operate independently without interfering with each other; the so-called fixed priority strategy means that once the priority of a task is determined, its priority remains unchanged during execution; task τ i Priority and its period T i Inversely proportional, the shorter the period, the higher the priority of the task; for tasks with the same period, the smaller the task index, the higher the priority of the task.
[0070] S2 encodes the inaccurate hybrid mission-critical mapping to multiprocessor.
[0071] Specifically, in low-level system mode, the task mapping scheme is encoded using a two-dimensional matrix A, and the corresponding chromosome encoding formula is as follows:
[0072]
[0073] Where A is an m×n two-dimensional matrix, and its element a ij The value of a can only be 0 or 1 (1≤j≤m, where j is an integer), and a ij =1 indicates a hybrid critical cycle task τ j Assign it to processor i; let K represent the total number of task mapping schemes in the population, A k (1≤k≤K, where k is an integer) represents the kth task mapping scheme when the system is in low mode;
[0074] When the system is in high mode, the task mapping scheme is encoded using a two-dimensional matrix B, and the corresponding chromosome encoding formula is as follows:
[0075]
[0076] B is an m×n two-dimensional matrix, where the elements b ij The value of b can only be 0 or 1, and b ij =1 indicates a hybrid critical cycle task τ j Assigned to processor i; B k This represents the k-th task mapping scheme in the system's high mode.
[0077] S3 defines the fitness function to evaluate and select task mapping schemes from tasks to multiprocessors.
[0078] The load standard deviation of each processor under different system modes is selected as the fitness value of the task mapping scheme for calculation. The corresponding calculation formula is as follows:
[0079]
[0080] Where α (0≤α≤1, α is a decimal) and β (β=1-α, β is a decimal) represent the proportions of low mode and high mode in the task set Γ supercycle, respectively; and Let represent the standard deviations of the processor load for the k-th task mapping scheme in low mode and high mode, respectively. The corresponding calculation formulas are as follows:
[0081]
[0082]
[0083] in, In low mode, task mapping scheme A k The load of the j-th processor; In low mode, task mapping scheme A k The corresponding average processor load; This indicates that in high mode, task mapping scheme B... k The load of the j-th processor; This indicates that in high mode, task mapping scheme B... k The corresponding average processor load;
[0084] The fitness value, calculated using a fitness function, determines the probability of selecting a task mapping scheme. The corresponding calculation formula is as follows:
[0085]
[0086] S4 performs crossover and mutation operations on existing task mapping schemes.
[0087] The crossover operation involves selecting two task mapping schemes from all available options and crossing them. Let k1 (1≤k1≤k, k1 is an integer) and k2 (1≤k2≤k, k2 is an integer and k1≠k2) represent the selected task mapping schemes, and c (1≤c≤n, c is an integer) represent the index of the selected crossover point to generate a new task mapping. The corresponding crossover operation formula in low-level mode is as follows:
[0088]
[0089] Among them, k3 and k4 are the new task mapping schemes generated after the crossover operation. and These are the encodings of the k3 (k3 is an integer) and k4 (k4 is an integer) mapping schemes in low mode, respectively; I n (c) and I′ n (c) The corresponding formula is as follows:
[0090]
[0091]
[0092] Among them, I c and I (n-c) These are identity matrices of length c and (nc), respectively.
[0093] The crossover operation formula corresponding to the high mode is as follows:
[0094]
[0095] in, and These are the encodings of the k3 and k4 mapping schemes in high mode, respectively;
[0096] The mutation operation involves selecting one task mapping scheme from all available options for mutation. Let k5 (1 ≤ k5 ≤ K, where k5 is an integer) represent a randomly selected task mapping. One of the tasks in this mapping is then reassigned to another processor. Assume the selected task is τ. x Then x (1≤x≤n, where x is an integer) is the mutation point. Then, another randomly selected processor index r (1≤r≤m, where r is an integer) is used as the new processor index. The corresponding mutation operation in low mode is formulated as follows:
[0097]
[0098] Where k6 (k6 is an integer) is the new task mapping scheme generated after the mutation operation. Encoding of the k6 mapping scheme in low mode; I″ n (x) is an n×n matrix containing the following elements: a yy =1 and y≠x, all other elements are 0; and These are unit vectors whose r-th and x-th elements are both 1, respectively.
[0099] The mutation operation in high mode is formulated as follows:
[0100]
[0101] in This is the encoding of the k6 mapping scheme in high mode.
[0102] S5 calculates the energy-optimized speed of each processor task set and schedules the task set at the corresponding speed.
[0103] The task mapping scheme with the highest fitness value in the population is encoded and decoded, and its energy-optimized speed S is calculated based on the task set allocated to each processor. j The calculation formula is as follows:
[0104]
[0105] in, To be allocated to processor P j The task set; For task set The utilization rate of low-critical-level tasks in the medium-low mode is calculated using the following formula:
[0106]
[0107] For task set The utilization rate of high-critical-level tasks in the medium-to-high mode is calculated using the following formula:
[0108]
[0109] N j For task set Number of tasks; F(N) j The above-mentioned utilization upper bound for the monotonic rate invocation of inaccurate hybrid critical tasks is given by the following formula:
[0110]
[0111] Processor P j According to the monotonic rate algorithm, with speed S j Scheduling task set Finally, the energy consumption calculation formula for scheduling the inaccurate hybrid critical task set Γ is as follows:
[0112]
[0113] Among them, P ind It is the power consumption independent of processor speed; θ is the ratio of the processor's maximum dynamic power consumption to its static power consumption; LCM is the time-to-cycle of the task set Γ, i.e., all tasks.
[0114] In this embodiment, the hybrid periodic task set Γ = {τ1, τ2, ..., τ6} contains 6 periodic tasks, and their parameters are shown in Table 1 below:
[0115] Table 1 Task Set of Examples
[0116]
[0117] Processor P = {P1, P2} contains two homogeneous processors. Based on the selection, crossover, and mutation methods of the genetic algorithm presented in this paper, all tasks are mapped. When the system is always in low-mode, the final load-balanced task mapping scheme is as follows: Task set of processor P1... Processor P2's task set By using the upper bound of the monotonic rate, it is determined that this task mapping is schedulable. Finally, through calculation, it is found that the energy consumption optimization speeds of processors P1 and P2 are S1 = 0.69 and S2 = 0.63, and the energy consumption of the method of the present invention is 252.64.
[0118] The CA-BFD algorithm, or Key-Aware Best-Priority Descending Algorithm, first allocates tasks at the highest key level, then allocates tasks at the lowest key level; in allocating tasks at the highest key level... i First, tasks are sorted according to their utilization in high mode, and then allocated from highest to lowest. Next, based on the remaining high utilization of each processor, it is determined from lowest to highest whether task τ can be allocated. i Assign it to the current judgment processor; if possible, proceed with the assignment; otherwise, continue judging downwards; in the allocation of low-criticality tasks τ... i First, tasks are sorted according to their utilization in low mode, and then allocated from highest to lowest. Next, based on the remaining low utilization of each processor, it is determined from lowest to highest whether task τ can be allocated. i Assign the task to the currently determining processor. If possible, proceed with the assignment; otherwise, continue the process. The task mapping scheme for the CA-BFD algorithm is as follows: Task set of processor P1... Processor P2's task set Calculations show that the energy-optimized speeds of processors P1 and P2 are S1 = 0.89 and S2 = 0.43, respectively, while the energy consumption of the CA-BFD method is 283.47. This invention saves 10.88% of energy compared to the CA-BFD method.
[0119] The above is merely a preferred embodiment of the present invention. However, the present invention is not limited to the above embodiment. Any equivalent changes and modifications made according to the present invention, provided that the resulting functional effects do not exceed the scope of the present invention, shall fall within the protection scope of the present invention.
Claims
1. A non-precise hybrid energy-saving scheduling method for critical tasks based on genetic algorithms, characterized in that, include: Establish an imprecise hybrid mission scheduling model; Encode the inaccurate mixed-critical task-to-multiprocessor mapping; Define a fitness function to evaluate and select task mapping schemes from tasks to multiprocessors; Perform cross-operation and mutation operations on existing task mapping schemes; Calculate the energy-optimized speed of each processor task set and schedule the task set at the corresponding speed; The establishment of the non-precise hybrid critical task scheduling model includes: Considering an inaccurate mixed critical cyclic task set Γ={τ1,τ2,…,τ on a multiprocessor system n The task set is scheduled using a preemptive fixed-priority strategy; mixed critical cycle tasks τ i The quintuple {T i D i ξ i C i (LO), C i The structure consists of (HI)}, where 1≤i≤n, i is an integer, and T i Represents a hybrid critical cycle task τ i The period; D i Represents a hybrid critical cycle task τ i The relative deadline, and it is equal to T. i ξ i Representing hybrid critical mission τ i The key level, whose value is ξ i ={LO, HI}, Hybrid critical cycle task τ i When the critical level is LO, it is a low-critical-level task, and the mixed-critical-cycle task τ i When the critical level is HI, it is a high-criticality task; C i (LO) and C i (HI) represent hybrid critical cycle tasks τ, respectively. i Worst execution time in system low and high modes; system in low mode means any task τ i Their execution time does not exceed C i (LO); The system being in high mode means that there are high-critical-level tasks τ. i Its execution time exceeds C i (LO) but not exceeding C i (HI) and provide degradation services for low-critical-level tasks; if mixed-critical-cycle tasks τ i For low-criticality tasks, then C i (HI)≤C i (LO); if the mixed critical cycle tasks τ i For high-criticality tasks, then C i (HI)≥C i (LO); Processor set P = {P i P2, ..., P m Furthermore, these m processors have the same architecture, but they operate independently of each other without interfering with each other; the fixed priority strategy means that once the priority of a task is determined, its priority remains unchanged during execution. Encoding the inaccurate hybrid mission-critical mapping to multiprocessors includes: When the system is in low-level mode, the task mapping scheme is encoded using a two-dimensional matrix A, and the corresponding chromosome encoding formula is as follows: Where A is an m×n two-dimensional matrix, and its element a ij The value of a can only be 0 or 1, 1≤j≤m, where j is an integer, and a ij =1 indicates a hybrid critical cycle task τ j Assign it to processor i; let K represent the total number of task mapping schemes in the population, A k , 1≤k≤K, where k is an integer, representing the k-th task mapping scheme in the low-mode system; When the system is in high mode, the task mapping scheme is encoded using a two-dimensional matrix B, and the corresponding chromosome encoding formula is as follows: Where B is an m×n two-dimensional matrix, and its elements b ij The value of b can only be 0 or 1, and b ij =1 indicates a hybrid critical cycle task τ j Assigned to processor i; B k This represents the k-th task mapping scheme in high mode of the system; Develop a fitness function to evaluate and select task mapping schemes to multiprocessors; specifically, this includes: The load standard deviation of each processor under different system modes is selected as the fitness value of the task mapping scheme for calculation. The corresponding calculation formula is as follows: Where α represents the proportion of low mode in the task set Γ supercycle, 0≤α≤1, and α is a decimal; β represents the proportion of high mode in the task set Γ supercycle, β=1-α, and β is a decimal; This represents the standard deviation of the processor load for the k-th task mapping scheme in low mode; The standard deviation of the processor load for the k-th task mapping scheme in high mode is represented by the following formulas: in, In low mode, task mapping scheme A k The load of the j-th processor; In low mode, task mapping scheme A k The corresponding average processor load; This indicates that in high mode, task mapping scheme B... k The load of the j-th processor; This indicates that in high mode, task mapping scheme B... k The corresponding average processor load; The fitness value, calculated using a fitness function, determines the probability of selecting a task mapping scheme. The corresponding calculation formula is as follows:
2. The inaccurate hybrid critical task energy-saving scheduling method based on genetic algorithm as described in claim 1, characterized in that, Perform crossover and mutation operations on existing task mapping schemes, specifically including: The crossover operation involves selecting two task mapping schemes from all available options and crossing them. Let k1 and k2 represent the selected task mapping schemes, and c represent the index of the selected crossover point to generate a new task mapping. The corresponding crossover operation formula in low-level mode is as follows: Where 1 ≤ k1 ≤ k, k1 is an integer; 1 ≤ k2 ≤ k, k2 is an integer and k1 ≠ k2; 1 ≤ c ≤ n, c is an integer; k3 and k4 are the new task mapping schemes generated after the crossover operation. Encoding of the k3 mapping scheme in low mode. This is the encoding of the k4 mapping scheme in low mode, where k3 is an integer and k4 is an integer; I n (c) and I′ n (c) The corresponding formula is as follows: Among them, I c Let I be an identity matrix of length c. (n-c) Let be an identity matrix of length (nc); The crossover operation formula corresponding to the high mode is as follows: in, Encoding of the k3 mapping scheme in high mode. Encoding of the k4 mapping scheme in high mode; The mutation operation involves selecting one task mapping scheme from all available options for mutation. Let k5 represent a randomly selected task mapping, where one of the tasks is reassigned to another processor. Assume the selected task is τ. x If x is the mutation point, then another randomly selected processor index r is used as the new processor index to be mapped. The corresponding mutation operation in low mode is formulated as follows: Where 1 ≤ k5 ≤ K, k5 is an integer; 1 ≤ x ≤ n, x is an integer; 1 ≤ r ≤ m, r is an integer; k6 is the new task mapping scheme generated after the mutation operation, k6 is an integer. Encoding of the k6 mapping scheme in low mode; I″ n (x) is an n×n matrix, containing elements a yy =1 and y≠x, all other elements are 0; It is a unit vector whose r-th element is 1. It is a unit vector whose x-th element is 1; The mutation operation in high mode is formulated as follows: in, This is the encoding of the k6 mapping scheme in high mode.
3. The inaccurate hybrid critical task energy-saving scheduling method based on genetic algorithm as described in claim 2, characterized in that, Calculate the energy-optimized speed for each processor task set and schedule the task set at the corresponding speed, specifically including: The task mapping scheme with the highest fitness value in the population is encoded and decoded, and its energy-optimized speed S is calculated based on the task set allocated to each processor. j The calculation formula is as follows: in, To be allocated to processor P j The task set; For task set Utilization rate of low-critical-level tasks in medium-low mode; For task set Utilization rate of high-critical-level tasks in medium-to-high mode; N j For task set Number of tasks; F(N) j The above-mentioned utilization upper bound for the monotonic rate invocation of inaccurate hybrid critical tasks is given by the following formula: The energy consumption calculation formula for the inaccurate hybrid mission set Γ is as follows: Among them, P ind It is the power consumption independent of processor speed; θ is the ratio of the processor's maximum dynamic power consumption to its static power consumption; LCM is the time-to-cycle of the task set Γ, i.e., all tasks.
Citation Information
Patent Citations
Heterogeneous multi-core energy-saving task schedule method based on improved genetic algorithm
CN102508708A
Multi-path joint scheduling method in time-sensitive network
CN115460130A