High energy efficiency task allocation method and apparatus for heterogeneous multi-core systems
By optimizing the task allocation order and execution frequency in a heterogeneous multi-core system and combining it with a secure core architecture model, the problem of task allocation algorithms failing to reduce energy consumption in secure scenarios is solved, achieving both high energy efficiency and improved security of the system.
Patent Information
- Application Number
- CN202311189140.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-14
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-09-14
AI Technical Summary
Existing task allocation algorithms for heterogeneous multi-core systems have failed to effectively reduce energy consumption in security scenarios and cannot meet the energy-saving requirements of the system.
A high-energy-efficiency task allocation method for heterogeneous multi-core systems is proposed. By setting the task allocation order, execution time and frequency, and combining a secure core architecture model, the allocation and execution of tasks on processor cores are optimized. A directed acyclic graph is used to represent task dependencies and communication time overhead, thereby achieving high-energy-efficiency task allocation.
In security scenarios, it effectively reduces system energy consumption, enhances system security, improves task execution efficiency, and meets task deadline requirements.
Smart Images

Figure CN117215749B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer architecture, specifically relating to a high-energy-efficiency task allocation method and apparatus for heterogeneous multi-core systems. Background Technology
[0002] Heterogeneous multi-core systems comprise multiple processor cores capable of executing different types of tasks simultaneously, and are widely used in embedded real-time systems and Internet of Things (IoT) technologies. In heterogeneous multi-core systems, different tasks need to be assigned to appropriate processor cores for execution; task allocation algorithms are a crucial technology in heterogeneous multi-core on-chip systems.
[0003] Heterogeneous multi-core systems reduce energy consumption primarily through two methods at both the hardware and software levels when executing tasks. At the hardware level, Dynamic Voltage and Frequency Scaling (DVFS) is used to reduce voltage and alter execution frequency during task execution, thereby lowering energy consumption. At the software level, leveraging the heterogeneity of processor cores and combining it with energy-efficient task scheduling algorithms, tasks are allocated and scheduled based on their varying execution efficiencies and energy consumption across different processor cores. This aims to minimize system energy consumption while ensuring the system meets task deadlines.
[0004] The task dependency model is a commonly used task allocation model for heterogeneous multi-core systems. It typically uses a directed acyclic graph (DAG) to represent information such as the number of tasks, execution time, execution order dependencies, and inter-task communication overhead. Existing algorithms for applying the task dependency model mainly include:
[0005] The Heterogeneous Earliest Finish Time (HEFT) algorithm first calculates the upward weight of each task, then arranges the upward weights of the tasks in descending order as the order of task allocation, and finally assigns the task to the core with the earliest finish time.
[0006] The Critical Path on Processor (CPOP) algorithm first calculates the up and down weights of each task, sums the two weights to find all tasks on the critical path, then allocates the tasks on the critical path as a whole to the core with the shortest execution time, and finally allocates the remaining tasks to the core with the earliest completion time.
[0007] The Energy Aware Scheduling Algorithm (EASLA) with priority constraints first uses the Earliest Task First (ETF) algorithm to obtain an initial scheduling scheme. On the initial scheduling scheme, the execution frequency of tasks is reduced by keeping the task graph span unchanged. Secondly, the existing scheduling scheme is extended by the pre-agreed target span of the task graph. Finally, the execution frequency of tasks is reduced on the extended scheduling scheme.
[0008] The Linear Programming Dynamic Voltage Frequency Adjustment Algorithm (LP-DVFS) uses system energy consumption as the objective function, and uses task execution frequency proportion factor and task time interval as constraints. It also combines DVFS technology to solve the allocation of tasks to cores and the decision of execution frequency.
[0009] The Minimum Scheduling Length (MSLCEC) algorithm minimizes the span by pre-allocating minimum energy consumption to each unscheduled task by passing energy consumption constraints to each task.
[0010] The aforementioned existing technical solutions are all designed for task allocation in general heterogeneous multi-core systems. They do not take into account task allocation in security scenarios where tasks have security service requirements, and therefore cannot meet the system energy-saving requirements of heterogeneous multi-core systems in security scenarios. Summary of the Invention
[0011] To address the aforementioned problems in the existing technology, this invention provides a high-energy-efficiency task allocation method and apparatus for heterogeneous multi-core systems, offering a technical solution that better suits actual task scenarios and enhances system security.
[0012] The high-energy-efficiency task allocation method for heterogeneous multi-core systems of the present invention includes:
[0013] A high-energy-efficiency task allocation method for heterogeneous multi-core systems, characterized by comprising:
[0014] Step 1: Set the assignment order of each task based on the critical path length from each task to the virtual exit task;
[0015] Step 2: According to the task allocation order, assign the regular part of each task to the processor core with the earliest completion time and available idle time slots.
[0016] Step 3: Based on the start time sequence of the regular components of each task, set the execution order of the security components of each task on the security processor core.
[0017] Furthermore, step one also includes:
[0018] Computation task τ i Execution time of the regular portion on each processor core and average execution time
[0019]
[0020]
[0021] Calculate the average communication time for each task
[0022]
[0023] Calculate the upweight rank for each task. u (τ i );
[0024]
[0025]
[0026] The tasks are arranged in descending order of their upward weights to obtain the task allocation order;
[0027] Among them, wc i For task τ i The worst-case execution instruction cycle of the normal part. For task τ i In processor π j Execution efficiency; f i j For task τ i In processor π j Execution frequency; This represents the average communication startup time cost; This refers to the average data transfer rate between processor cores; data i,q For task τ q and τ i The size of the communication data between them; τ q For task τ i The direct successor task, τ I+1 For virtual export tasks, succ i For task τ i The set of direct successor tasks, where i is the task number, j is the processor core number, and J is the number of processor cores.
[0028] The tasks are arranged in descending order of their upward weights to obtain the task allocation order;
[0029] Furthermore, step two also includes:
[0030] Unassigned tasks are selected sequentially according to the allocation order. i ;
[0031] Computation task τ i Start time AST(τ) on each processor core i ,π j );
[0032]
[0033]
[0034] If the processor core π j There is a task τ that satisfies i The available idle time slots, which meet the start time and execution time requirements and can satisfy the common deadline D of the tasks, will be allocated to the processor core π. j Included in task τ i Allocable processor cores;
[0035] Task τ i Allocate to the earliest available processor core that completes;
[0036] Among them, the For processor core π j The earliest available start time of an idle time slot; τ m For task τ i The direct precursor mission, π n For task τ m The allocated processor cores For task τ m In processor core π n Execution time on AST(τ) m ,π n ) for task τ m The start time, AFT(τ) m ,π n ) for task τ m The completion time, c m,i For task τ m and task τ i Communication time between them For processor core π j The earliest available idle time slot ends.
[0037] Preferably, the method includes:
[0038] Step 4: Extend the execution time of each task;
[0039]
[0040] Step 5: Transfer the virtual export task τ I+1 The completion time is set to the common deadline D for the tasks, and the virtual exit task τ is set to... I+1 Each direct precursor task is placed into the execution time extended task set;
[0041] Step 6: Set the completion time of the task based on the start time of the direct successor task of each task in the execution time extension task set.
[0042]
[0043] If task τ iExtended execution time The execution time of the task is greater than the minimum execution frequency of the processor core where the task resides; the task τ i The start time has been updated to:
[0044]
[0045] Remove the task with the set start and finish times from the execution time extension task set, and add the task's direct predecessor to the execution time extension task set;
[0046] Where Makespan is the task execution span; c i,q For task τ i and τ q Communication time between them; For task τ i The execution time at the lowest execution frequency of its processor core.
[0047] Preferably, the method further includes:
[0048] Calculate the execution frequency f of each task. j,i ;
[0049]
[0050] If the f j,i Belongs to processor core π j The frequency set; set task τ i The final execution frequency is f j,i Otherwise, choose π. j The set of frequencies less than f j,i highest frequency and greater than f j,i The lowest frequency
[0051] Calculate τ i In frequency Execution time percentage t i,x and The percentage of execution time t under the following conditions i,x+1 ;
[0052] t i,x +t i,x+1 =1
[0053]
[0054] Set τ i The final execution frequency is;
[0055]
[0056] The high-efficiency task allocation device for heterogeneous multi-core systems of the present invention includes:
[0057] The task allocation order setting module is used to set the allocation order of each task based on the critical path length from each task to the virtual exit task.
[0058] The task allocation module is used to allocate the regular parts of each task to each processor core according to the task allocation order.
[0059] The Task Safety Execution Order Setting Module is used to set the execution order of the safety components of each task on the safety processor core according to the start time order of the regular components of each task.
[0060] Furthermore, the task allocation order setting module includes:
[0061] The execution time calculation unit is used to calculate the execution time of the regular part of each task on each processor core. and the average execution time of the regular portion of each task on each processor core.
[0062]
[0063]
[0064] The communication time calculation unit is used to calculate the average communication time of each task.
[0065]
[0066] The upward weight calculation unit is used to calculate the upward weight (rank) for each task. u (τ i ):
[0067]
[0068]
[0069] The task allocation order setting unit is used to sort the tasks in descending order according to their upward weights to obtain the task allocation order.
[0070] Among them, wc i For task τ i The worst-case execution instruction cycle of the normal part. For task τ i In processor π j Execution efficiency; f i j For task τ i In processor π jExecution frequency; This represents the average communication startup time cost; This refers to the average data transfer rate between processor cores; data i,q For task τ q and τ i The size of the communication data between them; τ q For task τ i The direct successor task, τ I+1 For virtual export tasks, succ i For task τ i The set of direct successor tasks, where i is the task number, j is the processor core number, and J is the number of processor cores.
[0071] Furthermore, the task allocation module includes:
[0072] The task selection unit is used to select unassigned tasks τ sequentially according to the allocation order Rank. i ;
[0073] The task start time calculation unit is used to calculate task τ. i Start time AST(τ) on each processor core i ,π j );
[0074]
[0075]
[0076] Allocable processor core filtering unit, used to determine processor core π j Does the above satisfy task τ? i If the available idle time slots for the start time and execution time requirements can meet the common deadline D of the tasks, then the processor core π will be allocated. j Included in task τ i Allocable processor cores;
[0077] The task allocation unit is used to assign tasks τ i Allocate to the earliest available processor core that completes;
[0078] Among them, the For processor core π j The earliest available start time of an idle time slot; τ m For task τ i The direct precursor mission, π n For task τ m The allocated processor cores For task τ m In processor core π n Execution time on AST(τ)m ,π n ) for task τ m The start time, AFT(τ) m ,π n ) for task τ m The completion time, c m,i For task τ m and task τ i Communication time between them For processor core π j The earliest available idle time slot ends.
[0079] Preferably, the device further includes:
[0080] The execution time extension module is used to extend the execution time of each task based on the common deadline D and the task execution span.
[0081]
[0082] The task start time setting module is used to set the start and completion times of each task based on the extended execution time of each task, including;
[0083] The export task completion time setting unit is used to set the virtual export task τ. I+1 The completion time is set as the common deadline D for the tasks;
[0084] The task selection unit is used to select the virtual exit task τ I+1 Each direct precursor task is placed into the execution time extended task set;
[0085] The task completion time setting unit is used to set the completion time of the task based on the start time of the direct successor task of each task in the extended task set according to the execution time.
[0086]
[0087] The task start time setting unit is used to set the start time of the task based on the completion time of each task in the extended task set and the length of the extended execution time.
[0088] If task τ i Extended execution time The execution time of the task is greater than the minimum execution frequency of the processor core where the task resides; set task τ. i The start time is:
[0089]
[0090] The task update unit is used to remove tasks with completed start and finish time settings from the execution time extension task set and add the task's direct predecessor to the SET.
[0091] Where Makespan is the task execution span; c i,q For task τ i and τ q Communication time between them; For task τ i The execution time at the lowest execution frequency of its processor core.
[0092] Preferably, the device further includes:
[0093] The final execution frequency setting module is used to set the final execution frequency of each task based on its start and finish times. include;
[0094] The execution frequency calculation unit is used to calculate the execution frequency f of each task. j,i ;
[0095]
[0096] The final execution frequency setting unit is used to set the frequency according to the f of each task. j,i Set the final execution frequency for each task;
[0097] If the f j,i Does it belong to processor core π? j The frequency set, setting task τ i The final execution frequency is f j,i Otherwise, set τ i The final execution frequency is:
[0098]
[0099] t i,x +t i,x+1 =1
[0100]
[0101] in, For π j The set of frequencies less than f j,i The highest frequency, For π j The set of frequencies greater than f j,i The lowest frequency; t i,x For τ i At frequency f j x The percentage of execution time, t i,x+1For τ i In frequency The percentage of execution time.
[0102] In the technical solution of this invention, a security architecture model using a secure kernel is adopted to achieve dedicated kernel for dedicated use and improve the system security level. A directed acyclic graph is used to represent the execution order dependency relationship between tasks and the communication time overhead between tasks, which is more in line with the actual task scenario. Attached Figure Description
[0103] Figure 1 This is a schematic diagram of the task model of the present invention;
[0104] Figure 2 This is a flowchart of the method in specific embodiment 1 of the present invention;
[0105] Figure 3 This is a flowchart of the task start and end time setting process after the extension of specific embodiment 1 of the present invention;
[0106] Figure 4 This is a schematic diagram of the device structure in specific embodiment 2 of the present invention;
[0107] Figure 5 This is a schematic diagram of the task allocation order setting module structure in specific embodiment 2 of the present invention;
[0108] Figure 6 This is a schematic diagram of the task allocation module structure in specific embodiment 2 of the present invention;
[0109] Figure 7 This is a schematic diagram of the task start time setting module structure in specific embodiment 2 of the present invention. Detailed Implementation
[0110] To better illustrate the technical solution of the present invention, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0111] In the following specific embodiments of the present invention, the application scenario of the method and apparatus is a secure heterogeneous multi-core system architecture. The system's security architecture provides security services to tasks by using secure computing units (secure cores), isolates hardware security devices as private devices of the secure cores, and differentiates the regular and secure parts of the tasks. The system processor core set Π={π 1 ,π 2 ,…π j ,…π J This includes J processor cores, which are interconnected via an internal high-speed bus for data communication. The startup cost and bandwidth for communication between processor cores are the same, and each core can independently adjust its power supply voltage and frequency during task execution using DVFS technology. The operating voltage and frequency of each processor are represented as follows: Where j is the processor number, M is the number of voltages and frequencies that the processor can operate at, and v j 1 <v j 2 <…… <v j M f j 1 <f j 2 <…… <f j M .
[0112] In the following specific embodiments of the present invention, the set of tasks to be assigned is Γ={τ1,τ2,…,τ i …,τ I}, including I tasks to be assigned, task τ i In processor core π j The execution efficiency is i is the task number, j is the processor core number, and β j is the architecture coefficient of processor j, and its value is a constant related to the processor design and process.
[0113] The set of tasks to be assigned and the virtual entry task τ0 and virtual exit task τ I+1 This forms a task model. Virtual entry and exit tasks execute at zero time on any processor core, have zero communication overhead, do not affect scheduling results, and cannot preempt each other. (succ) i For task τ i The direct successor task group, succ i All tasks can only be performed in τ i This can only be executed after the previous one has been completed; pred i For task τ i The direct precursor mission group, τ i Only in pred i This task can only be executed after all other tasks in the task list have been completed. i and its direct predecessor or direct successor mission τ m The communication time overhead between them is:
[0114]
[0115] Where L is the core startup communication time cost, and data m,i For task τ m and τ i The amount of communication data between them, where B is the communication bandwidth.
[0116] See Figure 1 , Figure 1A schematic structure of a task model according to a specific embodiment of the present invention is given, which includes 10 tasks to be assigned, as well as a virtual entry task τ0 and a virtual exit task τ0. 11 As shown in the figure, the direct successor task group of task τ1 is succ1 = {τ3, τ4}, and the direct predecessor task group of task τ9 is pred9 = {τ6, τ7}. Specific Implementation Example 1
[0118] This embodiment is a preferred implementation of the high-energy-efficiency task allocation method for heterogeneous multi-core systems of the present invention.
[0119] See Figure 2 ,like Figure 2 As shown, the method in this embodiment includes:
[0120] S101. The system powers on and starts up, setting the execution frequency of each processor core to its highest frequency; the task set to be assigned is Γ = {τ1, τ2, ..., τ...}. i …,τ I} was assigned to the system;
[0121] S102. Set the allocation order of each task according to the critical path length from each task to the virtual exit task;
[0122] In this specific embodiment, this step may further include:
[0123] S1021, Calculation task τ i Execution time of the regular portion on each processor core
[0124]
[0125] Among them, wc i For task τ i The worst-case execution cycle of the normal part, f i j For task τ i In processor π j The execution frequency.
[0126] S1022, Calculation task τ i Average execution time of the regular part
[0127]
[0128] S1023. Calculate the average communication time for each task.
[0129]
[0130] in, This represents the average communication startup time cost; This refers to the average data transfer rate between processor cores; data i,q Represents task τ q and τ i The size of the communication data between them.
[0131] S1024. Calculate the upweight rank for each task. u (τ i ):
[0132]
[0133]
[0134] Where, τ q For task τ i The direct successor task, τ I+1 For export tasks; the task τ i The upward weights represent the values from task τ i To export mission τ I+1 The critical path length, including task τ i The average computing cost and average communication time overhead.
[0135] S1025. Arrange the tasks in descending order according to their upward weights to obtain the task allocation order Rank;
[0136] S103. Allocate the routine parts of each task to each processor core in sequence according to the task allocation order;
[0137] In this specific embodiment, this step may further include:
[0138] S1031. Select unassigned tasks τ in sequence according to the allocation order Rank. i ;
[0139] S1032, according to Select processor cores in descending order of size;
[0140] S1033, Calculation task τ i Start time AST(τ) on each processor core i ,π j );
[0141]
[0142]
[0143] Among them, the For processor core π jThe earliest available start time of an idle time slot; τ m For task τ i The direct precursor mission, π n For task τ m The allocated processor cores For task τ m In processor core π n Execution time on AST(τ) m ,π n ) for task τ m The start time, AFT(τ) m ,π n ) for task τ m The completion time, c m,i For task τ m and task τ i Communication time between them For processor core π j The earliest available idle time slot ends;
[0144] The available idle time slot refers to an idle time slot that satisfies the following:
[0145]
[0146]
[0147] S1034, Determine the processor core π j Does the above satisfy task τ? i If the available idle time slots for the start time and execution time requirements can meet the common deadline D of the tasks, then the processor core π will be allocated. j Included in task τ i If the allocable processor core is available, proceed to step S1035; otherwise, proceed to step S1032. The common deadline D for the tasks is:
[0148] AFT(τ i ,π j )≤D
[0149]
[0150] Among them, AFT(τ) i ,π j ) for task τ i In processor core π j Completion time;
[0151] S1035, Task τ i Assigned to completion time AFT(τ) i ,π j The earliest allocatable processor core;
[0152] Repeat step S103 until all task assignments are completed.
[0153] S104. Based on the order of start times of the regular parts of each task, set the execution order of the security parts of each task on the security processor core.
[0154] As a preferred implementation of this specific embodiment, this embodiment may further include a task execution time extension step:
[0155] S105. Based on the common deadline D of the tasks and the task execution span, extend the execution time of each task.
[0156] In this specific embodiment, this step may further include:
[0157] S1051. Calculate the extent_ratio, the extension coefficient for the execution time of each task;
[0158]
[0159] Makespan represents the task execution span;
[0160] S1052. Extend the execution time of each task;
[0161]
[0162] S106. Set the start and finish times for each task based on the extended execution time of each task.
[0163] See Figure 3 ,like Figure 3 As shown in this specific embodiment, this step may further include:
[0164] S1061, The virtual export task τ I+1 The completion time is set as the common deadline D for the tasks;
[0165] S1062, Select Virtual Exit Task τ I+1 Each direct predecessor task is placed into the execution time extended task set SET;
[0166] S1063. Set the completion time of the task based on the start time of the direct successor task of each task in the execution time extension task set SET.
[0167]
[0168] Where, τ q For τ i The direct successor task of πk For τ q The allocated processor core; c i,q For task τ i and τ q The communication time between them.
[0169] S1064. Based on the execution duration of the task and the execution time of the task at the lowest execution frequency of the processor core where the task resides, set the start time of the task.
[0170] If task τ i Extended execution time If the execution time of the task exceeds the minimum execution frequency of the processor core where the task resides, set task τ. i The start time is:
[0171]
[0172] in, For task τ i The execution time at the lowest execution frequency of its processor core;
[0173]
[0174] S1065. Remove the task with the set start time and finish time from SET and add the task's direct predecessor to SET.
[0175] Repeat steps S1063 to S1065 until the start and finish times of all tasks are set.
[0176] As another preferred implementation of this specific embodiment, this embodiment may further include:
[0177] S107. Based on the start and finish times of each task, set the final execution frequency of each task.
[0178] In this specific embodiment, this step may further include:
[0179] S1071. Calculate the execution frequency f of each task. j,i ;
[0180]
[0181] S1072, according to the f of each task j,i Set the final execution frequency for each task;
[0182] The final execution frequency of each task mentioned in this step can be, where task τ is the execution frequency of the task. i The final execution frequency is set to processor π.j Among the selectable frequencies, not less than f j,i The lowest frequency;
[0183] As a preferred embodiment of this specific example, the final execution frequency of each task in this step can also be:
[0184] S10721, Determine the f j,i Does it belong to processor core π? j The frequency set; if so, set task τ. i The final execution frequency is f j,i Otherwise, proceed to step S10722;
[0185] S10722, Select π j The frequency set is less than f j,i highest frequency and greater than f j,i The lowest frequency
[0186] S10723, Calculate τ i In frequency Execution time percentage t i,x and The percentage of execution time t under the following conditions i,x+1 ;
[0187] t i,x +t i,x+1 =1
[0188]
[0189] S1073, Set τ i The final execution frequency is,
[0190] Specific Implementation Example 2
[0192] This embodiment is a preferred implementation of the high-efficiency task allocation device for heterogeneous multi-core systems of the present invention.
[0193] See Figure 4 ,like Figure 4 As shown, the apparatus of this embodiment includes:
[0194] The task allocation order setting module is used to set the allocation order of each task based on the critical path length from each task to the virtual exit task.
[0195] See Figure 5 ,if Figure 5 As shown in this specific embodiment, this module may further include:
[0196] The execution time calculation unit is used to calculate the execution time of the regular part of each task on each processor core. and the average execution time of the regular portion of each task on each processor core.
[0197]
[0198]
[0199] Among them, wc i For task τ i The worst-case execution cycle of the normal part, f i j For task τ i In processor π j The execution frequency.
[0200] The communication time calculation unit is used to calculate the average communication time of each task.
[0201]
[0202] in, This represents the average communication startup time cost; This refers to the average data transfer rate between processor cores; data i,q For task τ q and τ i The size of the communication data between them;
[0203] The upward weight calculation unit is used to calculate the upward weight rank for each task. u (τ i ):
[0204]
[0205]
[0206] Where, τ q For task τ i The direct successor task, τ I+1 For export tasks; the task τ i The upward weights represent the values from task τ i To export mission τ I+1 The critical path length, including task τ i The average computing cost and average communication time overhead;
[0207] The task allocation order setting unit is used to sort the tasks in descending order according to their upward weights to obtain the task allocation order Rank.
[0208] The task allocation module is used to allocate the regular parts of each task to each processor core according to the task allocation order.
[0209] See Figure 6 ,like Figure 6 As shown in this specific embodiment, this module may further include:
[0210] The task selection unit is used to select unassigned tasks τ sequentially according to the allocation order Rank. i ;
[0211] Processor core selection unit, used to select cores based on processor core selection unit. Select processor cores in descending order of size;
[0212] The task start time calculation unit is used to calculate task τ. i Start time AST(τ) on each processor core i ,π j );
[0213]
[0214]
[0215] Among them, the For processor core π j The earliest available start time of an idle time slot; τ m For task τ i The direct precursor mission, π n For task τ m The allocated processor cores For task τ m In processor core π n Execution time on AST(τ) m ,π n ) for task τ m The start time, AFT(τ) m ,π n ) for task τ m The completion time, c m,i For task τ m and task τ i Communication time between them For processor core π j The earliest available idle time slot ends;
[0216] The available idle time slot refers to an idle time slot that satisfies the following:
[0217]
[0218]
[0219] Allocable processor core filtering unit, used to determine processor core π j Does the above satisfy task τ? i If the available idle time slots for the start time and execution time requirements can meet the common deadline D of the tasks, then the processor core π will be allocated. j Included in task τ i Allocable processor cores;
[0220] The common deadline D for the tasks is:
[0221] AFT(τ i ,π j )≤D
[0222]
[0223] Among them, AFT(τ) i ,π j ) for task τ i In processor core π j Completion time;
[0224] The task allocation unit is used to assign tasks τ i Assigned to completion time AFT(τ) i ,π j The earliest allocatable processor core;
[0225] The Task Safety Execution Order Setting Module is used to set the execution order of the safety components of each task on the safety processor core according to the start time order of the regular components of each task.
[0226] As a preferred implementation of this specific embodiment, the apparatus may further include:
[0227] The execution time extension module is used to extend the execution time of each task based on the common deadline D and the task execution span.
[0228] Calculate the extent_ratio, the extension factor for the execution time of each task;
[0229]
[0230] The execution time of each task is extended based on the extension ratio extent_ratio;
[0231]
[0232] Makespan represents the task execution span;
[0233] The task start time setting module is used to set the start and end times of each task based on the extended execution time of each task.
[0234] See Figure 7 ,like Figure 7 As shown in this specific embodiment, this module may further include:
[0235] The export task completion time setting unit is used to set the virtual export task τ. I+1 The completion time is set as the common deadline D for the tasks;
[0236] Task selection unit, select virtual exit task τ I+1 Each direct predecessor task is placed into the execution time extended task set SET;
[0237] The task completion time setting unit sets the completion time of the task based on the start time of the direct successor task of each task in the extended task set SET.
[0238]
[0239] Where, τ q For τ i The direct successor task of π k For τ q The allocated processor core; c i,q For task τ i and τ q The communication time between them.
[0240] The task start time setting unit is used to set the start time of the task based on the completion time of each task in the task set SET and the extended execution time.
[0241] If task τ i Extended execution time The execution time of the task is greater than the minimum execution frequency of the processor core where the task resides; set task τ. i The start time is:
[0242]
[0243] in, For task τ i The execution time at the lowest execution frequency of its processor core;
[0244]
[0245] The task update unit is used to remove tasks with completed start and finish time settings from the SET and add the task's direct predecessor to the SET.
[0246] The final execution frequency setting module is used to set the final execution frequency of each task based on its start and finish times.
[0247] In this specific embodiment, this module may further include:
[0248] The execution frequency calculation unit is used to calculate the execution frequency f of each task. j,i ;
[0249]
[0250] The final execution frequency setting unit is used to set the frequency according to the f of each task. j,i Set the final execution frequency for each task;
[0251] If the f j,i Does it belong to processor core π? j The frequency set, setting task τ i The final execution frequency is f j,i Otherwise, set τ i The final execution frequency is:
[0252]
[0253] t i,x +t i,x+1 =1
[0254]
[0255] in, For π j The set of frequencies less than f j,i The highest frequency, For π j The set of frequencies greater than f j,i The lowest frequency; t i,x For τ i In frequency The percentage of execution time, t i,x+1 For τ i In frequency The percentage of execution time.
[0256] In this specific embodiment, the final execution frequency execution unit can also execute task τ. i The final execution frequency is set to processor π. j Among the selectable frequencies, not less than f j,i The lowest frequency.
[0257] In the above-described specific embodiments of the present invention, a security architecture model using a secure core is adopted to achieve dedicated cores for specific tasks and enhance the system's security level. A directed acyclic graph is used to represent the execution order dependencies between tasks and the communication time overhead between tasks, which is more consistent with actual task scenarios. In one limited implementation of the above-described specific embodiments of the present invention, the execution time of the allocated tasks is extended according to the common deadline of the tasks to make full use of the system's idle time and effectively reduce the system's static power consumption. In another limited implementation of the above-described specific embodiments of the present invention, the execution frequency is set specifically for each task based on the extended execution time of each task. Furthermore, different execution frequencies can be set for the same task at different execution time periods, making the task execution frequency setting more precise and further reducing system energy consumption.
[0258] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A high-energy-efficiency task allocation method for heterogeneous multi-core systems, characterized in that, include: Step 1: Set the assignment order of each task based on the critical path length from each task to the virtual exit task; including: Computational tasks Execution time of the regular portion on each processor core and average execution time ; ; ; Calculate the average communication time for each task ; ; Calculate the upward weights for each task. ; ; ; The tasks are arranged in descending order of their upward weights to obtain the task allocation order; Among them, among them, For the task The worst-case execution instruction cycle of the normal part. For the task In processor On the execution efficiency; For the task In processor Execution frequency; This represents the average communication startup time cost; This represents the average data transfer rate between processor cores. For the task and The size of the communication data between them; For the task The direct successor task, For virtual export tasks, For the task The set of direct successor tasks, where i is the task number, j is the processor core number, and J is the number of processor cores; Step 2: Based on the task allocation order, assign the routine portion of each task to the processor core with the earliest completion time and available idle time slots; including: Unassigned tasks are selected sequentially according to the allocation order. ; Computational tasks Start time on each processor core ; ; ; If the processor core There are tasks to be completed. The available idle time slots, which meet the start time and execution time requirements and can satisfy the common deadline D of the tasks, will be allocated to the processor cores. Included in the task Allocable processor cores; The task Allocate to the earliest available processor core that completes; Among them, the For processor core The earliest available idle time slot start time; For the task The direct precursor mission. For the task The allocated processor cores For the task In processor core Execution time on For the task The start time, For the task Completion time, For the task and tasks Communication time between them For processor core The earliest available idle time slot ends; Step 3: Based on the start time sequence of the regular components of each task, set the execution order of the security components of each task on the security processor core.
2. The method according to claim 1, characterized in that, The method includes: Step 4: Extend the execution time of each task; ; Step 5: Transfer the virtual exit task The completion time is set to the common deadline D for the task, and the virtual exit task is set. Each direct precursor task is placed into the execution time extended task set; Step 6: Set the completion time of the task based on the start time of the direct successor task of each task in the execution time extension task set. ; If the task Extended execution time The execution time of the task is greater than the minimum execution frequency of the processor core where the task resides; the task The start time has been updated to: ; Remove the task with the set start and finish times from the execution time extension task set, and add the task's direct predecessor to the execution time extension task set; in, For the task execution span; For the task and Communication time between them; For the task The execution time at the lowest execution frequency of its processor core.
3. The method according to claim 2, characterized in that, The method includes: Calculate the execution frequency of each task. : ; If the above Belongs to processor core Frequency set; Set task The final execution frequency is Otherwise, choose The frequency set less than highest frequency And greater than The lowest frequency ; calculate In frequency Execution time percentage and The percentage of execution time ; ; ; set up The final execution frequency is; 。 4. A high-energy-efficiency task allocation device for a heterogeneous multi-core system, characterized in that, include: The task allocation order setting module is used to set the allocation order of each task based on the critical path length from each task to the virtual exit task; it includes: The execution time calculation unit is used to calculate the execution time of the regular part of each task on each processor core. and the average execution time of the regular portion of each task on each processor core. ; ; ; The communication time calculation unit is used to calculate the average communication time of each task. ; ; The upward weight calculation unit is used to calculate the upward weight of each task. : ; ; The task allocation order setting unit is used to sort the tasks in descending order according to their upward weights to obtain the task allocation order. in, For the task The worst-case execution instruction cycle of the normal part. For the task In processor On the execution efficiency; For the task In processor Execution frequency; This represents the average communication startup time cost; This represents the average data transfer rate between processor cores. For the task and The size of the communication data between them; For the task The direct successor task, For virtual export tasks, For the task The set of direct successor tasks, where i is the task number, j is the processor core number, and J is the number of processor cores; The task allocation module is used to allocate the regular portions of each task to each processor core according to the task allocation order; it includes: The task selection unit is used to select unassigned tasks sequentially according to the allocation order Rank. ; The task start time calculation unit is used to calculate the task. Start time on each processor core ; ; ; Allocable processor core filtering unit, used to determine processor core Is there a task that can be completed? If the available idle time slots for the start time and execution time requirements can meet the common deadline D of the tasks, then the processor cores will be allocated accordingly. Included in the task Allocable processor cores; Task allocation unit, used to assign tasks Allocate to the earliest available processor core that completes; Among them, the For processor core The earliest available idle time slot start time; For the task The direct precursor mission. For the task The allocated processor cores For the task In processor core Execution time on For the task The start time, For the task Completion time, For the task and tasks Communication time between them For processor core The earliest available idle time slot ends; The Task Safety Execution Order Setting Module is used to set the execution order of the safety components of each task on the safety processor core according to the start time order of the regular components of each task.
5. The apparatus according to claim 4, characterized in that, The device includes: The execution time extension module is used to extend the execution time of each task based on the common deadline D and the task execution span. ; The task start time setting module is used to set the start and completion times of each task based on the extended execution time of each task, including; The export task completion time setting unit is used to set the virtual export task. The completion time is set as the common deadline D for the tasks; The task selection unit is used to select virtual exit tasks. Each direct precursor task is placed into the execution time extended task set; The task completion time setting unit is used to set the completion time of the task based on the start time of the direct successor task of each task in the extended task set according to the execution time. ; The task start time setting unit is used to set the start time of the task based on the completion time of each task in the extended task set and the length of the extended execution time. If the task Extended execution time The execution time of the task is greater than the minimum execution frequency of the processor core where the task resides; set the task. The start time is: ; The task update unit is used to remove tasks with completed start and finish time settings from the execution time extension task set and add the task's direct predecessor to the SET. in, For the task execution span; For the task and Communication time between them; For the task The execution time at the lowest execution frequency of its processor core.
6. The apparatus according to claim 5, characterized in that, The device includes: The final execution frequency setting module is used to set the final execution frequency of each task based on its start and finish times. ,include; The execution frequency calculation unit is used to calculate the execution frequency of each task. ; ; The final execution frequency setting unit is used to set the frequency according to each task. Set the final execution frequency for each task; If the above Does it belong to the processor core? Frequency set, set task The final execution frequency is Otherwise, set The final execution frequency is: ; ; ; in, for The frequency set less than The highest frequency, For The frequency set greater than The lowest frequency; for In frequency The percentage of execution time, for In frequency The percentage of execution time.
Citation Information
Patent Citations
Method for high-efficiency task scheduling of heterogeneous multi-core processor
CN102193826A
Task allocation method based on heterogeneous multi-cores
CN111190729A