Mixed critical task scheduling method for many-core processor
By defining task attribute relationships in a multi-core processor and using comprehensive influencing factors to calculate priorities, the problem of low resource utilization in mixed-task scenarios is solved, and reliable execution of high-criticality tasks and improved system efficiency are achieved.
Patent Information
- Application Number
- CN202510698277.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional task scheduling methods are difficult to adapt to the mixed task scenarios of multi-core processors, cannot fully utilize resources, and lack dynamic perception and response to changes in task runtime characteristics and the real-time status of the system, resulting in unreasonable resource allocation and affecting the overall efficiency of the system.
By defining the relationship between different attributes of tasks, using comprehensive influencing factors to calculate task priorities, and allowing low-criticality tasks to be migrated to lighter-loaded processors for execution when the system criticality changes, global scheduling of mixed-criticality tasks is achieved.
It improves the resource utilization of multi-core processors, ensures the reliable execution of high-criticality tasks, improves the overall efficiency of the system, and solves the problem of high task migration overhead.
Smart Images

Figure CN120653387A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer hardware and integrated circuits, and in particular to a method for scheduling hybrid critical tasks of a many-core processor. Background Art
[0002] With the advancement of semiconductor technology, multi-core processors, with their parallel processing capabilities, have become key to improving computing performance. From smartphones and data centers to industrial control systems, multi-core processors are widely used in various scenarios. However, in practical applications, multi-core processors often need to handle multiple types of tasks simultaneously, including hard real-time tasks with extremely high real-time requirements (such as autonomous driving decision-making and industrial control instruction processing), soft real-time tasks that allow a certain amount of latency (such as video streaming processing), and non-real-time tasks (such as background data backup). These tasks vary in criticality and resource requirements, forming a complex mixed task environment.
[0003] Traditional task scheduling methods are mostly designed for a single type of task and struggle to adapt to the demands of mixed-task scenarios. For example, while fixed-priority scheduling can guarantee the execution of hard real-time tasks, it can cause non-real-time tasks to wait for extended periods of time. Earliest deadline-first scheduling can also impact overall system efficiency due to irrational resource allocation when handling multiple tasks. Furthermore, these methods often rely on static task information and fixed scheduling strategies, lacking the ability to dynamically perceive and respond to changes in task runtime characteristics and the real-time state of the system, and therefore fail to fully leverage the performance advantages of many-core processors.
[0004] In a multi-core environment, issues such as inter-core load balancing, cache coherence, and inter-core communication overhead further complicate task scheduling. Improving resource utilization and ensuring reliable execution of critical tasks while meeting diverse task requirements are key challenges in scheduling mixed tasks on multi-core processors. New scheduling methods and strategies are urgently needed to adapt to complex and changing application scenarios. Summary of the Invention
[0005] To address the above technical issues, the present invention provides a method for scheduling mixed-criticality tasks on a many-core processor. By analyzing the relationships between the different attributes of each task, several factors influencing task priority determination are defined, and a global task scheduling method is implemented based on these combined influencing factors. Furthermore, to address the high task migration overhead associated with global scheduling, when the system criticality changes during task execution, some lower-criticality tasks are allowed to migrate to lighter-loaded processors for continued execution.
[0006] The technical solution of the present invention is:
[0007] A mixed-criticality task scheduling method for many-core processors effectively partitions tasks to fully utilize the performance of many-core processors. By considering the relationships between the various attributes of each task, several factors influencing task priority determination are defined and calculated, resulting in a global scheduling method for mixed-criticality tasks based on comprehensive influencing factors. Furthermore, to address the high migration overhead of mixed-criticality tasks, when the system criticality changes between task executions, a small number of lower-criticality tasks are allowed to migrate to less-loaded processors to maintain performance.
[0008] Mission criticality can be categorized based on its importance to the system. This is typically measured by whether the system can function properly, or how many other tasks will be disrupted if the current task fails. These levels can be categorized as catastrophic: causing the system to fail to function properly; critical: enabling normal startup but causing 80% of subsequent tasks to fail; high critical: enabling normal startup but causing 60% of subsequent tasks to fail; medium critical: enabling normal startup but causing 30% of subsequent tasks to fail; and low critical: enabling normal startup but only impacting the current task.
[0009] Going further,
[0010] Taking into account multiple influencing factors, the comprehensive impact factor of each task at different critical levels is calculated, aiming to ensure that high-criticality tasks can be scheduled while increasing the execution ratio of low-criticality tasks.
[0011] First, the generated task set is read and stored in the task array. Then, the values of the five parameters, namely, the proportion of system critical level, the proportion of task critical level, the critical factor, the idle window, and the comprehensive impact factor, are calculated according to the calculation formula. Then, the value of the comprehensive impact factor corresponding to the task at different critical levels is calculated and stored.
[0012] Next, the tasks are prioritized and sorted, and then added to the ready queue (initially sorted according to the priority of tasks at the low criticality level).
[0013] Finally, the tasks in the ready queue are scheduled. During the scheduling process, the system is initially at a low criticality level, and the tasks in the ready queue are taken out in order for execution. If a high-criticality task exceeds the worst-case execution time corresponding to the current criticality level during execution, the system will increase the criticality level. At this time, the tasks in the ready queue need to be re-sorted (according to the value of the comprehensive impact factor corresponding to the high criticality level) and then continue execution.
[0014] Going further,
[0015] The task priority comparison process first determines task priority based on the combined impact factor values of the two tasks. If the combined impact factor values of the two tasks differ, the task with the larger value receives higher priority. If the combined impact factor values of the two tasks are the same, the current system criticality and the task's own criticality are determined. If the system criticality is the same but the task's own criticality is different, the task with the larger criticality receives higher priority. If both are the same, the task's deadline is compared; the shorter the deadline, the higher the priority.
[0016] To save the size, cost, power consumption, and computing resources of embedded systems, this invention integrates multiple functions or subsystems with different criticality levels onto a single hardware platform, creating a mixed-criticality system. Systems and tasks can be divided into different levels based on their importance. In a mixed-criticality system, not only does the system itself have different criticality levels, but the tasks running within it also have different criticality levels. High-criticality tasks often have a higher importance within the system, so their completion needs to be prioritized during task scheduling.
[0017] In the mixed-criticality task scheduling method, the utilization of each processor is improved by ensuring the high-criticality tasks and reducing the passive processing of low-criticality tasks.
[0018] By considering the relationship between different attributes of each task, several factors affecting task priority determination are defined, and a global scheduling method for mixed critical tasks based on comprehensive influencing factors is implemented.
[0019] The beneficial effects of the present invention are
[0020] While studying how to ensure the execution of high-criticality tasks in mixed-criticality systems, we also improve the passive handling of low-criticality tasks, thereby improving the utilization of individual processors in a many-core processor and enhancing overall system efficiency. By analyzing the relationships between the different attributes of each task, we define the factors that influence task priority determination and calculate the comprehensive impact factors to achieve scheduling of mixed-criticality tasks.
[0021] In the task scheduling research process of multi-core processors, the task priority is calculated by comprehensive influencing factors to ensure that the utilization of each processor is in a relatively balanced state. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0023] Figure 2 It is a flowchart of task priority comparison;
[0024] Figure 3It is a routine diagram that divides the task into specific stages;
[0025] Figure 4 It is a flowchart of the specific execution phase of the task. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0027] This paper proposes a method for scheduling mixed-criticality tasks in many-core processors based on comprehensive impact factors. While studying how to ensure the execution of high-criticality tasks in mixed-criticality systems, it also improves the passive handling of low-criticality tasks, thereby improving the utilization of individual processors in the many-core processor and enhancing overall system efficiency. By defining the relationships between the different attributes of each task, factors influencing task priority determination are defined, and scheduling of mixed-criticality tasks is achieved by calculating comprehensive impact factors.
[0028] Taking into account various influencing factors, the comprehensive impact factor of each task at different critical levels is calculated, aiming to ensure that high-criticality tasks can be scheduled while increasing the execution ratio of low-criticality tasks. Figure 1 As shown in the figure, it is a task scheduling process flow chart. First, the generated task set is read and stored in the task array. Then, according to the calculation formula of the five parameters of system critical level ratio, task critical level ratio, critical factor, idle window, and comprehensive impact factor, the respective values are calculated. Then, the value of the comprehensive impact factor corresponding to the task at different critical levels is calculated and stored. Next, the priority of the tasks is judged and sorted, and then they are added to the ready queue (initially sorted according to the priority of the tasks at the low critical level). Finally, the tasks in the ready queue are scheduled. During the scheduling process, at the beginning, the system is at a low critical level, and the tasks in the ready queue are taken out in order for execution. When a high critical level task exceeds the worst execution time corresponding to the current critical level during the execution process, the system will increase the critical level. At this time, the tasks in the ready queue need to be re-sorted (according to the value of the comprehensive impact factor corresponding to the high critical level) and then continue to execute.
[0029] As attached Figure 2The figure shows the task priority comparison process. When determining task priorities, the two tasks are first compared based on their combined impact factor values. If the values for the two tasks differ, the task with the larger value receives higher priority. If the values for the two tasks are the same, the current system criticality and the task's own criticality are determined. If the system criticality is the same but the tasks themselves are different, the task with the larger criticality receives higher priority. If both are the same, the task deadlines are compared; the shorter the deadline, the higher the priority.
[0030] The following is a specific embodiment:
[0031] This paper proposes a mixed-criticality task scheduling algorithm for many-core processors. It implements global scheduling by calculating comprehensive impact factors, solves the problem of passive treatment of low-criticality tasks, and solves the problem of high task migration overhead by improving the mixed-criticality half-partitioning algorithm.
[0032] Mixed mission critical model:
[0033] The mixed criticality system contains a set of finite and independent periodic tasks, namely Γ = {τ1, τ2..., τ n}, each task can be composed of a four-tuple
[0034] τ i =( T i, D i , L i , C i ) means, where:
[0035] (1)T i ∈N + is the task period, which represents the minimum time interval between any two adjacent operations in task τi.
[0036] (2)D i ∈N + is the relative deadline of task τi, which indicates the maximum allowed response time of each job released by task τi. It uses an implicit deadline, i.e. D i =T i .
[0037] (3)L i ∈{1, 2, ..., l} represents the criticality of task τi. A larger value indicates a higher criticality. This shows the maximum criticality in a mixed-criticality system. To facilitate subsequent research, this paper focuses on mixed-criticality systems with only two criticality levels (l = 2), using LO to denote the low criticality level and HI to denote the high criticality level.
[0038] (4)C i ∈(C i (1),Ci (2),...,C i (k)) is a k-dimensional vector, corresponding to the worst execution time of task Ti at different critical levels. As the critical level of the system increases, its value also increases, that is: C i (1) <C i (2)<…C i (k).
[0039] Mixed-criticality job model:
[0040] An execution of a mixed-criticality task τi is called a job, and the job sequence in each task τi is infinite and released periodically. A mixed-criticality job can be represented by a four-tuple
[0041] J i =(r i ,d i ,x i ,c i ) means, where:
[0042] (1) ri represents the job release time, at which the job can start execution;
[0043] (2) di represents the absolute deadline of the job, that is, the job is required to be completed before this time. Its value is equal to the sum of the job release time and the relative deadline, that is, di = ri + Di;
[0044] (3)xi represents the criticality level of the job, which is consistent with the criticality level of the corresponding task. The larger the value, the higher the criticality level;
[0045] (4) ci represents a two-dimensional vector group, that is, ci = [ci(LO), ci(HI)], where c represents the worst execution time of job Ji when the critical level is LO, and ci(HI) represents the worst execution time of job Ji when the critical level is HI.
[0046] Based on the different criticality levels of each mixed-criticality task (taking dual criticality as an example) and the corresponding real-time parameters, its comprehensive impact factor is determined and used as the main indicator for determining task priority. The relevant definitions are as follows:
[0047] The system criticality ratio Si is determined based on the value of the current task criticality Li to determine the proportion of the task in a system with k (k = 2) criticality levels and n mixed criticality tasks, expressed as
[0048]
[0049] The mission criticality ratio Mi is determined based on the criticality level k of the current system to determine the proportion of each mixed criticality task in the mission system, which is expressed as:
[0050]
[0051] The critical factor θi is determined based on the system criticality ratio Si, the task criticality ratio Mi, and the utilization rate Ui (Ui = Ci / Ti):
[0052] θ i =S i M i U i
[0053] Idle window Iik, the period between the worst execution time Cki and the deadline dik of the task in the current cycle when the critical level is k is called the idle window:
[0054] I i =d i -C i
[0055] Comprehensive impact factor ωi, the ratio of the critical factor θi to the idle window Ii is defined as the comprehensive impact factor, which is used as an indicator to determine the final priority of a task, and is expressed as follows:
[0056] ω i =θ i / I i
[0057] And 0≤ωi≤1, the larger the value, the higher the urgency of the task, that is, the higher the priority. Improved mixed key half partitioning algorithm:
[0058] 1. Task division stage
[0059] First, each high-criticality task is assigned to an idle processor. Then, the remaining tasks are sorted in descending order of utilization and the corresponding Si,m,fi,m are calculated. The processors that have not yet been assigned tasks are given priority and assigned to each processor in turn until the task is assigned. The flowchart of the specific division stage is shown in the attached figure. Figure 3As shown. At the beginning of task partitioning, the relevant variables are first initialized and the task set is read. FixedNum and MigNum are used to record the number of fixed tasks and the number of migration tasks. During the partitioning process, high-criticality tasks are prioritized and assigned to separate processors (there is no need to re-partition high-criticality tasks after the criticality switch). The remaining tasks are then divided on the unused processor cores in descending order of task utilization. During this process, if the resources on a certain processor are insufficient to fully partition the task, the task is divided into two processors based on the relationship between the value of si,m and the size of the remaining resources on the current processor. This is called a migration task, and the fi,m value of the task is calculated based on the value of si,m. Similarly, if the task is divided into a fixed task, the value of fi,m is 1.
[0060] 2. Task execution phase
[0061] In the execution phase, the priority order of tasks on each processor is determined. Choosing the right execution order is also the most direct reflection of the algorithm's schedulability. In mixed-criticality systems, high-criticality tasks are more important, and errors in execution may have serious consequences. The specific execution phase process is shown in the attached figure. Figure 4 shown.
[0062] The priorities of the tasks are sorted according to the following rules, which are discussed in two cases:
[0063] 1) In low-key mode:
[0064] (1) If there are both fixed tasks and migration tasks on the same processor, the migration task has a higher priority than the fixed task. (2) If there are multiple migration tasks or multiple fixed tasks on the same processor, the task that selects the processor other than the first one to be assigned will be executed with the highest priority. Among multiple fixed tasks, the priority of the task with the earlier deadline is higher.
[0065] 2) In high-key mode:
[0066] (1) If there is a high-criticality task among the fixed tasks on the same processor, its priority is raised to the highest. For tasks with the same low-criticality level or the same high-criticality level, the priority is determined according to the earliest deadline.
[0067] (2) Among multiple migration tasks on the same processor, the task whose processor is not the first allocated processor is still selected to be executed with the highest priority.
[0068] (3) If there are both fixed tasks (low-criticality tasks) and migration tasks on the same processor, the migration task has a higher priority than the fixed task.
[0069] During the task execution process, it should be noted that the system initially runs in low-criticality mode. At this time, the task execution priority on the same processor core is executed according to the rules of low-criticality mode. When the execution time of a high-criticality task exceeds the worst execution time corresponding to the current criticality, the system criticality will switch to high-criticality mode, and the next execution must be executed according to the rules of high-criticality mode.
[0070] The above description is only a preferred embodiment of the present invention and is only used to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A method for scheduling mixed-criticality tasks on a multi-core processor, characterized in that: The task division utilizes the performance of the multi-core processor. By considering the relationship between the different attributes of each task, several factors affecting the task priority determination are defined and calculated, and global scheduling of mixed-criticality tasks based on comprehensive influencing factors is achieved.
2. The method according to claim 1, characterized in that The mission criticality level is divided according to its importance to the system. The importance is reflected in whether the normal operation of the current system can be guaranteed, or whether the abnormality of the current task will cause other tasks to be unable to be executed normally. The criticality level can be divided into catastrophic: causing the system to be unable to operate normally; Crisis: It can start normally, but 80% of the tasks cannot be run in the subsequent operation; High criticality: It can start normally, but 60% of the tasks cannot run normally in the subsequent operation; Medium criticality: It can start normally, but 30% of the tasks cannot be run in the subsequent operation; Low criticality: It can start normally, and only the current task function is affected.
3. The method according to claim 2, characterized in that If the migration overhead of mixed-criticality tasks is higher than a predetermined value, when the system criticality changes during task execution, some low-criticality tasks are allowed to migrate to processors with a load below a predetermined value to continue to maximize performance.
4. The method according to claim 1 or 3, characterized in that First, the generated task set is read and stored in the task array. Then, the values of the five parameters, namely, the proportion of system critical level, the proportion of task critical level, the critical factor, the idle window, and the comprehensive impact factor, are calculated according to the calculation formula. Then, the value of the comprehensive impact factor corresponding to the task at different critical levels is obtained and stored.
5. The method according to claim 4, characterized in that Next, the tasks are prioritized and sorted, and then added to the ready queue; Finally, the tasks in the ready queue are scheduled. During the scheduling process, at the beginning, the system is at a low criticality level, and the tasks in the ready queue are taken out in order for execution. When a high-criticality task exceeds the worst execution time corresponding to the current criticality level during execution, the system will increase the criticality level. At this time, the tasks in the ready queue need to be re-sorted and then continue to be executed.
6. The method according to claim 5, characterized in that Tasks added to the ready queue are initially sorted according to the priority of tasks at the low criticality level.
7. The method according to claim 5 or 6, characterized in that The tasks in the ready queue are reordered according to the value of the comprehensive impact factor corresponding to the high criticality level.
8. The method according to claim 7, characterized in that Task priority comparison process,When judging the priority of a task, a comparison is made based on the value of the comprehensive impact factor of the two tasks.
9. The method according to claim 8, characterized in that If the values of two tasks are different, the task with the larger value has a higher priority; If the values of two tasks are the same, it is necessary to determine the current system criticality and the criticality of the task itself. If the system criticality is the same but the tasks themselves are different, the task with the higher criticality has a higher priority. If both are the same, they are compared based on the task deadline. The smaller the deadline, the higher the priority.