A Typed Task Co-scheduling System and Method Based on Heterogeneous Multi-core Architecture
By using a typed task joint scheduling system with a heterogeneous multi-core architecture, combined with particle swarm optimization and Lagrange convex optimization methods, the processor speed is dynamically adjusted, solving the problem of typed task joint scheduling in heterogeneous multi-core processors and achieving low-power and high-efficiency task response.
Patent Information
- Application Number
- CN202310146100.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-02-21
AI Technical Summary
Existing technologies have failed to effectively solve the task-type joint scheduling problem in heterogeneous multi-core processors, leading to task overload and waiting latency, and performance improvement is limited under energy consumption constraints.
A typed task joint scheduling system based on a heterogeneous multi-core architecture is adopted. Through the task requester, task manager, global scheduler, queue buffer, and task scheduler, combined with the inertial weight coefficient particle swarm optimization method and the Lagrange convex optimization method, the processor speed is dynamically adjusted to optimize task allocation and response time.
It effectively reduced the average response time of tasks, achieved optimal load distribution of the system, met the time limit requirements of real-time tasks, reduced energy consumption, and improved task processing capacity and real-time response.
Smart Images

Figure CN116401023B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of multi-task joint scheduling of multi-processors, and particularly relates to a type-based task joint scheduling system and method based on a heterogeneous multi-core architecture. BACKGROUND
[0002] In recent years, heterogeneous multi-core processors are widely used in mobile embedded electronic products such as smart phones, automated robots and wearable devices due to their excellent computing performance and parallel task processing capability. However, due to the slow development of battery technology, mobile devices need to meet certain energy consumption limits while improving performance. Traditional performance improvement techniques mainly rely on increasing core frequency to improve performance, but also increase energy consumption. Therefore, under certain energy consumption conditions, we need to explore how to improve the performance of heterogeneous multi-core processors as much as possible.
[0003] The performance of a heterogeneous multi-core system can be optimized through load balancing. At present, a large number of studies model the system as different queuing models and use load balancing methods based on queuing theory. The main goal of this type of research is to minimize the average response time of tasks, and all consider the task queuing system to be of infinite capacity. However, when the number of tasks is too large, the processor system will be overloaded, and the tasks that arrive later will be in an infinite waiting state, ultimately causing additional waiting delay.
[0004] On the other hand, task types have gradually become the main focus of performance optimization in multi-processor systems. Some studies focus on one type of task, while others focus on multiple types of tasks. Related studies focusing on multiple types of tasks consider performance optimization or power optimization of type-based tasks, but most studies consider a certain type of task as pre-loadable, and then research the load scheduling strategy of another type of task based on this. Few documents mention the joint scheduling problem of type-based tasks. However, the constraint relationship between type-based tasks is crucial for task scheduling.
[0005] Therefore, in view of the above problems, the prior art needs a type-based task joint scheduling system and method that considers the constraints of system energy and task priority and takes into account the limited capacity. SUMMARY
[0006] The present application provides a type-based task joint scheduling system and method based on a heterogeneous multi-core architecture, which solves the technical problem of how to effectively reduce the average response time of tasks under the constraints of system energy and task priority, and achieve optimal load distribution of the system.
[0007] To address the above technical problems, this invention provides a typed task joint scheduling system based on a heterogeneous multi-core architecture, including a task requester, a task manager, a global scheduler, a queue buffer, and a task scheduler.
[0008] The task request terminal is used to submit real-time task requests and non-real-time task requests from different terminal users to the task manager, and to set real-time tasks to have high priority and strong preemption characteristics, and non-real-time tasks to have low priority.
[0009] The task manager is used to receive the real-time task request and the non-real-time task request, and form a mixed-type task flow including real-time task flow and non-real-time task flow according to the arrival time of the two types of tasks, and then send the mixed-type task flow to the global scheduler.
[0010] The global scheduler is used to receive the hybrid typed task flow, divide it into multiple real-time task sub-flows and non-real-time task sub-flows according to the joint scheduling mechanism, and determine the task parameters of each task sub-flow and the execution order between each task sub-flow.
[0011] The queue buffer is used to cache the two types of task sub-streams in a limited manner, and sorts the queues according to the task execution order to obtain multiple waiting queues;
[0012] The task scheduler is used to receive multiple waiting queues in parallel, allocate task substreams in the multiple waiting queues to multiple local schedulers, and dynamically adjust the speed of each processor in each local scheduler according to system energy.
[0013] Preferably, the joint scheduling process of the joint scheduling mechanism is as follows:
[0014] Given n multi-core local schedulers S1, S2, ..., S... n average task size Total arrival rate of real-time tasks λ′, total arrival rate of non-real-time tasks λ″, and deadline T for real-time tasks. dead and available power supply Find the real-time task arrival rates λ′1,λ′2,...,λ′ on the local scheduler. n Non-real-time task arrival rate λ″1,λ″2,...,λ″ n And processor speeds s1, s2, ..., s n This minimizes the average response time of non-real-time tasks under system energy constraints, while ensuring that the maximum response time of real-time tasks does not exceed their deadlines, where the local scheduler S... i Having c i The speed is s i The capacity is mi The static power consumption is P i * Homogeneous multi-core processors, i = 1, 2, ..., n.
[0015] Specifically, the joint scheduling process of the joint scheduling mechanism is mathematically expressed as a typed task joint scheduling problem:
[0016]
[0017] in, T″ represents the average response time of non-real-time tasks in the system. i This indicates that non-real-time tasks are handled by the local scheduler S. i Average response time in; ρ″ i This indicates that the local scheduler S i Total core utilization of real-time and non-real-time tasks; Constraint C1 represents the constraints that bring the system to equilibrium, i.e. Where 1≤i≤n; C2 represents the total arrival rate constraint for real-time tasks; C3 represents the total arrival rate constraint for non-real-time tasks; and C4 represents the maximum response time T′ for real-time tasks. max Not exceeding the deadline T dead That is, the time constraint of real-time tasks, where The real-time task distribution is λ′1,λ′2,...,λ′ n and processor speeds s1, s2, ..., s n The function, T′ i This indicates that the real-time task is in the local scheduler S i The average response time in the system, where i∈N={1,2,...,n}; C5 indicates that the average power consumption P of the system does not exceed the available power of the system. This refers to the energy constraints of the system; min indicates taking the minimum, and max indicates taking the maximum.
[0018] Specifically, based on the priority constraints between tasks, the typed task joint scheduling problem is decomposed into a real-time task scheduling problem and a non-real-time task scheduling problem. The load distribution of real-time tasks and non-real-time tasks in the local scheduler is obtained by solving the real-time task scheduling problem and the non-real-time task scheduling problem respectively.
[0019] The real-time task scheduling problem is: while considering the deadlines and load balancing requirements of real-time tasks, optimize the maximum response time of real-time tasks and solve the load distribution of real-time tasks in the local scheduler.
[0020] The real-time task scheduling problem is represented as follows:
[0021] P2:min T′max (λ′1,λ′2,...,λ′ n )=max{T′1(λ′1),T′2(λ′2),...,T′ n (λ′ n )}
[0022] stC6:F′(λ′1,λ′2,...,λ′ n )=λ′
[0023] C7:T′ max (λ′1,λ′2,...,λ′ n )≤T dead
[0024] C8:σ≤ε
[0025] Here, constraint C6 is a variation of C2, and F′ represents the sum of the arrival rates of each real-time task sub-stream, i.e., F′(λ′1,λ′2,...,λ′). n )=λ′1+λ′2+...+λ′ n Constraint C7 is a variation of C4; Constraint C8 is a real-time task load balancing constraint, where ε is the load balancing factor, with a value range of 0 ≤ ε ≤ 10. -2 σ represents the load balancing effectiveness, expressed as: in This represents the average task completion time for real-time tasks in the system.
[0026] The load balancing strategy is iteratively updated using the particle swarm optimization method with inertia weight coefficients to solve the real-time task scheduling problem while satisfying the task time limit constraints.
[0027] Specifically, the non-real-time task scheduling problem is: under system power constraints, load allocation is performed with the objective of minimizing the average response time of non-real-time tasks;
[0028] The non-real-time task scheduling problem is represented as follows:
[0029]
[0030] Among them, constraints C9, C10, C11, and C12 are variations of C1, C3, C4, and C5, respectively. In constraint C10, F represents the sum of the arrival rates of each non-real-time task sub-stream, i.e., F(λ″1, λ″2, ..., λ″). n )=λ″1+λ″2+...+λ″ n In constraint C11, G represents the maximum response time of the real-time task, i.e. And 0 ≤ β < T dead, i∈N={1,2,...,n}; To consider the limiting case of the problem, assume that the energy consumption P in constraint C12 is equal to the available power of the system.
[0031] This invention also provides a typed task joint scheduling method based on a heterogeneous multi-core architecture, comprising the following steps:
[0032] S1. Obtain real-time task requests and non-real-time task requests from different terminal users, and set real-time tasks to have high priority and strong preemption characteristics, and non-real-time tasks to have low priority.
[0033] S2. Form a hybrid typed task flow, including real-time task flow and non-real-time task flow, according to the arrival time of real-time task and non-real-time task respectively.
[0034] S3. Divide it into multiple real-time task sub-streams and non-real-time task sub-streams according to the joint scheduling mechanism, and determine the task parameters of each task sub-stream and the execution order between each task sub-stream.
[0035] S4. The two types of task sub-streams are buffered and sorted according to the task execution order to obtain multiple waiting queues;
[0036] S5. Receive multiple waiting queues in parallel, allocate task substreams in the multiple waiting queues to multiple local schedulers, and dynamically adjust the speed of each processor in each local scheduler according to system energy.
[0037] Furthermore, in step S3, the joint scheduling process of the joint scheduling mechanism is as follows:
[0038] Given n multi-core local schedulers S1, S2, ..., S... n average task size Total arrival rate of real-time tasks λ′, total arrival rate of non-real-time tasks λ″, and deadline T for real-time tasks. dead and available power supply Find the real-time task arrival rates λ′1,λ′2,...,λ′ on the local scheduler. n Non-real-time task arrival rate λ″1,λ″2,...,λ″ n And processor speeds s1, s2, ..., s n This minimizes the average response time of non-real-time tasks under system energy constraints, while ensuring that the maximum response time of real-time tasks does not exceed their deadlines, where the local scheduler S... i Having c i The speed is s i The capacity is m i The static power consumption is P i* Homogeneous multi-core processors, i = 1, 2, ..., n.
[0039] Furthermore, the joint scheduling process of the joint scheduling mechanism is mathematically expressed as a typed task joint scheduling problem:
[0040]
[0041] in, T″ represents the average response time of non-real-time tasks in the system. i This indicates that non-real-time tasks are handled by the local scheduler S. i Average response time in; ρ″ i This indicates that the local scheduler S i Total core utilization of real-time and non-real-time tasks; Constraint C1 represents the constraints that bring the system to equilibrium, i.e. Where 1≤i≤n; C2 represents the total arrival rate constraint for real-time tasks; C3 represents the total arrival rate constraint for non-real-time tasks; and C4 represents the maximum response time T′ for real-time tasks. max Not exceeding the deadline T dead That is, the time constraint of real-time tasks, where The real-time task distribution is λ′1,λ′2,...,λ′ n and processor speeds s1, s2, ..., s n The function, T′ i This indicates that the real-time task is in the local scheduler S i The average response time in the system, where i∈N={1,2,...,n}; C5 indicates that the average power consumption P of the system does not exceed the available power of the system. This refers to the energy constraints of the system; min indicates taking the minimum, and max indicates taking the maximum.
[0042] Furthermore, step S3 specifically includes the following steps:
[0043] S31. Based on the priority constraints between tasks, the typed task joint scheduling problem is decomposed into a real-time task scheduling problem and a non-real-time task scheduling problem.
[0044] The real-time task scheduling problem is: while considering the deadlines and load balancing requirements of real-time tasks, optimize the maximum response time of real-time tasks and solve the load distribution of real-time tasks in the local scheduler.
[0045] The real-time task scheduling problem is represented as follows:
[0046] P2:min T′ max (λ′1,λ′2,...,λ′ n)=max{T′1(λ′1),T′2(λ′2),...,T′ n (λ′ n )}
[0047] stC6:F′(λ′1,λ′2,...,λ′ n )=λ′
[0048] C7:T′ max (λ′1,λ′2,...,λ′ n )≤T dead
[0049] C8:σ≤ε
[0050] Here, constraint C6 is a variation of C2, and F′ represents the sum of the arrival rates of each real-time task sub-stream, i.e., F′(λ′1,λ′2,...,λ′). n )=λ′1+λ′2+...+λ′ n Constraint C7 is a variation of C4; Constraint C8 is a real-time task load balancing constraint, where ε is the load balancing factor, with a value range of 0 ≤ ε ≤ 10. -2 σ represents the load balancing effectiveness, expressed as: in This represents the average task completion time for real-time tasks in the system.
[0051] The non-real-time task scheduling problem is represented as follows:
[0052]
[0053] Among them, constraints C9, C10, C11, and C12 are variations of C1, C3, C4, and C5, respectively. In constraint C10, F represents the sum of the arrival rates of each non-real-time task sub-stream, i.e., F(λ″1, λ″2, ..., λ″). n )=λ″1+λ″2+...+λ″ n In constraint C11, G represents the maximum response time of the real-time task, i.e. And 0 ≤ β < T dead , i∈N={1,2,...,n}; To consider the limiting case of the problem, assume that the energy consumption P in constraint C12 is equal to the available power of the system.
[0054] S32. The load balancing strategy is iteratively updated using the particle swarm optimization method with inertia weight coefficients. Under the constraint of task time limit, the real-time task scheduling problem is solved to obtain the load distribution of real-time tasks in the local scheduler.
[0055] S33. The non-real-time task scheduling problem is simplified by using a Lagrange-based convex optimization method, and the simplified non-real-time task scheduling problem is solved by using a binary search method that satisfies energy constraints, so as to obtain the load distribution of real-time tasks in the local scheduler.
[0056] Further, step S32 specifically includes the following steps:
[0057] S321. Initialize the particle population and parameter settings according to the scheduling rules;
[0058] S322. Calculate the fitness value f for each particle based on the fitness function;
[0059] S323, Solving for the optimal fitness value of an individual and the group's optimal fitness value
[0060] S324. Update the inertia weight coefficient ω according to the inertia weight coefficient update formula, that is...
[0061]
[0062] Where, ω ini and ω end Let f represent the initial value of ω and the value at the maximum number of iterations, respectively. avg and f min This represents the average and minimum target values of the current particle;
[0063] S325. Update the velocity and position of each particle according to the formula, where the velocity update formula is:
[0064]
[0065] The position update formula is
[0066] x i+1 =x i +v i+1 ,
[0067] Among them, v i+1 and x i+1 Let v represent the updated particle velocity and position, respectively. i and x i R1 and R2 represent the velocity and position of the particle before the update, respectively; R1 and R2 represent random values between (0,1); C1 and C2 are learning factors.
[0068] S326. Determine if the maximum number of iterations L has been reached. s If the condition is not met, proceed to step S322; if the condition is met, end the iteration and proceed to step S327.
[0069] S327. Obtain the global optimal position, that is, the optimal load distribution of real-time tasks in the local scheduler;
[0070] Step S33 specifically includes the following steps:
[0071] S331. Using the Lagrange multiplier method to minimize T″, we obtain the equation. Where φ, ψ, τ are three Lagrange multipliers. For the derivative sign;
[0072] S332: Based on the right side of the equation in step S331, the load distribution variable λ″ of the non-real-time task. i and processor speed i Find the partial derivatives, where 1 ≤ i ≤ n;
[0073] S333: For the load distribution variable λ″ in the left-hand side T″ of equation S331 i and processor speed i Find the partial derivatives, where 1 ≤ i ≤ n;
[0074] S334: Combining the derivatives from steps S332 and S333, we obtain the theorem: For the energy-constrained non-real-time task scheduling problem, when all multi-core processors have the same speed, the average response time T″ of non-real-time tasks on n multi-core processors is minimized, i.e., s1 = s2 = ... = s n =s, and
[0075]
[0076] From the above formula, it can be seen that when the system energy When (available power) changes, the multi-core processor speed s i The corresponding changes can be made to find the optimal execution rate s to efficiently complete the task, thereby meeting the schedulability requirements of real-time tasks while minimizing the average response time of non-real-time tasks, where α i Indicates the local scheduler S i The power factor is such that 1 ≤ i ≤ n;
[0077] S335: Initialize available power supply and the upper bound λ″ of the load distribution for non-real-time tasks. max and the lower bound of load distribution λ″ min ;
[0078] S336: Determine λ″ max -λ″ min If ≥ν is true, proceed to step S337; otherwise, proceed to step S3312, where ν is a very small number with a value range of 10. -8 ≤ν≤10 -6;
[0079] S337: Take the average value λ″ of the current upper and lower bounds of the load distribution. mid As the load distribution for the current iteration, i.e.
[0080] S338: Determine whether the arrival rate of the assigned tasks is greater than the total arrival rate of the non-real-time tasks. If it is greater, proceed to step S339; if it is less, proceed to step S3310.
[0081] S339: Update the upper bound of load distribution λ″ max =λ″ mid ;
[0082] S3310: Update the lower bound λ″ of load distribution min =λ″ mid ;
[0083] S3311: Increment the iteration count by 1, go to step S336, and start a new round of iteration;
[0084] S3312: Obtain the optimal load distribution and average response time for non-real-time tasks in the local scheduler.
[0085] The present invention provides a typed task joint scheduling system and method based on a heterogeneous multi-core architecture, which has the following advantages and beneficial effects:
[0086] (1) A joint scheduling mechanism is introduced to divide and sort tasks according to task size and task priority. Based on this, for the time-limited characteristics of real-time tasks, the inertial weight coefficient particle swarm optimization method is used to iteratively update the load balancing strategy, so as to minimize the maximum response time of real-time tasks while meeting the schedulability requirements of real-time tasks. At the same time, for the low priority characteristics of non-real-time tasks, the problem is simplified by using the convex optimization idea based on Lagrange, and a binary search algorithm that satisfies energy constraints is adopted to effectively reduce the average response time of non-real-time tasks and achieve the optimal load distribution of the system.
[0087] (2) By dynamically adjusting the processor speed according to the system energy and completing tasks in parallel at the optimal execution speed, the requirements of large task processing volume and high real-time processing response in the multi-task scheduling system are effectively solved, ensuring the flexibility and real-time performance of various tasks.
[0088] (3) By limiting the capacity of the queue system, it consumes less processor resources and has a lower response time latency than the existing task scheduling system, which can better meet the needs of the embedded platform engineering application environment. Attached Figure Description
[0089] Figure 1This is an architecture diagram of a typed task joint scheduling system based on a heterogeneous multi-core architecture provided by an embodiment of the present invention;
[0090] Figure 2 This is a flowchart of a typed task joint scheduling method based on a heterogeneous multi-core architecture provided by an embodiment of the present invention;
[0091] Figure 3 This is a schematic diagram illustrating the steps for solving the real-time task scheduling problem provided in an embodiment of the present invention;
[0092] Figure 4 This is a schematic diagram illustrating the steps for solving the non-real-time task scheduling problem provided in an embodiment of the present invention;
[0093] Figure 5 This is a graph showing the relationship between the real-time task arrival rate and the maximum response time of the real-time task under different schemes provided in the embodiments of the present invention.
[0094] Figure 6 This is a graph showing the relationship between the arrival rate of non-real-time tasks and the average response time of non-real-time tasks under different schemes provided in the embodiments of the present invention. Detailed Implementation
[0095] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The embodiments are given for illustrative purposes only and should not be construed as limiting the present invention. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0096] Please see Figure 1 This invention provides a typed task joint scheduling system based on a heterogeneous multi-core architecture, including a task requester, a task manager, a global scheduler, a queue buffer, and a task scheduler.
[0097] The task request client is used to submit real-time and non-real-time task requests from different terminal users to the task manager, and to set the priority of real-time tasks to high and have strong preemption characteristics, while non-real-time tasks have low priority.
[0098] The task manager receives real-time task requests and non-real-time task requests, and forms a mixed-type task flow that includes real-time task flows and non-real-time task flows according to the arrival time of these two types of tasks. Then, the mixed-type task flow is sent to the global scheduler.
[0099] The global scheduler receives mixed-type task flows and divides them into multiple real-time task subflows and non-real-time task subflows according to the joint scheduling mechanism. It also determines the task parameters of each task subflow and the execution order between each task subflow.
[0100] The queue buffer is used to buffer two types of task sub-streams in a limited manner, and sorts the queues according to the task execution order to obtain multiple waiting queues. The queue buffer is a set of M / M / c / m queuing systems with limited capacity.
[0101] The task scheduler is used to receive multiple waiting queues in parallel, distribute the task sub-streams in the multiple waiting queues to multiple local schedulers, and dynamically adjust the speed of each processor in each local scheduler according to the system energy to complete tasks in parallel at the optimal execution rate. It can effectively solve the requirements of large task processing volume and high real-time processing response in multi-task scheduling systems, and ensure the flexibility and real-time performance of various types of tasks.
[0102] The number of local schedulers is n, and they have c i The speed is s i The capacity is m i Homogeneous processors, based on queuing theory, can achieve real-time tasks with strong preemption priority in the local scheduler S. i The average response time is:
[0103]
[0104] Among them, Ls′ i For local scheduler S i The average number of processors executing real-time tasks, Lq′ i For waiting queue L i The real-time queue length, λ′ i For real-time tasks in the local scheduler S i The load distribution in the equation is such that 1 ≤ i ≤ n.
[0105] In addition, real-time tasks have strong preemption priority, and the core utilization rate of real-time tasks is only related to the arrival rate λ′ of real-time tasks. i Related to:
[0106]
[0107] Remember T i For real-time and non-real-time tasks on the local scheduler S i The average response time of each task in the middle follows a negative exponential distribution. Because when a high-priority real-time task arrives, a low-priority non-real-time task, even if it is being executed, is interrupted and rejoins the queue. However, the distribution of its execution time is not affected by previously executed tasks or their execution times; that is, it still follows a negative exponential distribution. Therefore, T... i It can be based on the arrival rate λ′ i +λ″ i The M / M / c / m queuing model formula is calculated as follows:
[0108]
[0109] Among them, L i λ″ represents the average number of typed tasks currently being executed or awaiting execution in the system. i This indicates that non-real-time tasks are scheduled locally by the scheduler S. i The load distribution in the equation is such that 1 ≤ i ≤ n.
[0110] According to the formula (λ′) i +λ″ i )T i =λ′ i T′ i +λ″ i T″ i Non-real-time tasks with low priority can be obtained in the local scheduler S. i The average response time is:
[0111]
[0112] In addition, the local scheduler S i The total core utilization of real-time and non-real-time tasks is expressed as follows:
[0113]
[0114] Where 1≤i≤n.
[0115] Assume P = κCV 2 f represents the processor's dynamic power consumption, where κ is the activity factor, C is the load capacitance, V is the supply voltage, and f is the clock frequency. Since s ∝ f (∝ means proportional to), where s is the processor speed, and... in From this, we can obtain the processor power consumption P∝s. α ,in For ease of discussion, this invention will use the local scheduler S i The dynamic power consumption model of a processor core is as follows The static power consumption is P i * Therefore, the speed is s i The power model of the processor can be expressed as: This invention considers a variable frequency energy model in which the processor consumes only static power P when idle. i * In the local scheduler S i In the middle, ρ″ i The average percentage of time a processor is executing a task per unit of time is represented by 1-ρ″. iThis represents the average percentage of time a processor is idle. Therefore, the local scheduler S... i c i The average power consumption of a processor core per unit time can be modeled as:
[0116]
[0117] Where 1≤i≤n.
[0118] Based on the above analysis, the joint scheduling mechanism of the global scheduler is established as follows:
[0119] Given n multi-core local schedulers S1, S2, ..., S... n average task size Total arrival rate of real-time tasks λ′, total arrival rate of non-real-time tasks λ″, and deadline T for real-time tasks. dead and available power supply Find the real-time task arrival rates λ′1,λ′2,...,λ′ on the local scheduler. n Non-real-time task arrival rate λ″1,λ″2,...,λ″ n And processor speeds s1, s2, ..., s n This minimizes the average response time of non-real-time tasks under system energy constraints, while ensuring that the maximum response time of real-time tasks does not exceed their deadlines, where i = 1, 2, ..., n. The mathematical formula is:
[0120]
[0121] Among them, among them, T″ represents the average response time of non-real-time tasks in the system. i This indicates that non-real-time tasks are scheduled locally by the scheduler S. i Average response time in; ρ″ i Indicates the local scheduler S i Total core utilization of real-time and non-real-time tasks; Constraint C1 represents the constraints that bring the system to equilibrium, i.e. Where 1≤i≤n; C2 represents the total arrival rate constraint for real-time tasks; C3 represents the total arrival rate constraint for non-real-time tasks; and C4 represents the maximum response time T′ for real-time tasks. max Not exceeding the deadline T dead That is, the time constraint of real-time tasks, where The real-time task distribution is λ′1,λ′2,...,λ′ n and processor speeds s1, s2, ..., s n The function, T′ i This indicates that real-time tasks are scheduled locally by the scheduler S.i The average response time in the system, where i∈N={1,2,...,n}; C5 indicates that the average power consumption P of the system does not exceed the available power of the system. This refers to the energy constraints of the system; min indicates taking the minimum, and max indicates taking the maximum.
[0122] Based on the priority constraints between tasks, the typed task joint scheduling problem is decomposed into a real-time task scheduling problem and a non-real-time task scheduling problem. The load distribution of real-time and non-real-time tasks in the local scheduler is obtained by solving the real-time task scheduling problem and the non-real-time task scheduling problem respectively.
[0123] The real-time task scheduling problem is as follows: While considering the deadlines and load balancing requirements of real-time tasks, optimize the maximum response time of real-time tasks and solve for the load distribution of real-time tasks in the local scheduler. Specifically, the real-time task scheduling problem is expressed as:
[0124] P2:min T′ max (λ′1,λ′2,...,λ′ n )=max{T′1(λ′1),T′2(λ′2),...,T′ n (λ′ n )}
[0125] stC6:F′(λ′1,λ′2,...,λ′ n )=λ′
[0126] C7:T′ max (λ′1,λ′2,...,λ′ n )≤T dead
[0127] C8:σ≤ε
[0128] Here, constraint C6 is a variation of C2, and F′ represents the sum of the arrival rates of each real-time task sub-stream, i.e., F′(λ′1,λ′2,...,λ′). n )=λ′1+λ′2+...+λ′ n Constraint C7 is a variation of C4; Constraint C8 is a real-time task load balancing constraint, where ε is the load balancing factor, with a value range of 0 ≤ ε ≤ 10. -2 σ represents a custom load balancing effectiveness (measured to the difference in real-time task processing time between heterogeneous systems; a smaller σ value indicates more balanced processor processing time and better overall processor performance), expressed as: in This represents the average task completion time for real-time tasks in the system.
[0129] This problem is a multivariable, multi-constraint nonlinear minimax problem, and direct solution can easily lead to unbalanced load distribution. A particle swarm optimization method with inertia weight coefficients is used to iteratively update the load balancing strategy, solving the real-time task scheduling problem while satisfying task time constraints. The specific solution process is described in detail below.
[0130] The non-real-time task scheduling problem is: under system power constraints, to allocate load with the objective of minimizing the average response time of non-real-time tasks. The non-real-time task scheduling problem is expressed as:
[0131]
[0132] Among them, constraints C9, C10, C11, and C12 are variations of C1, C3, C4, and C5, respectively. In constraint C10, F represents the sum of the arrival rates of each non-real-time task sub-stream, i.e., F(λ″1, λ″2, ..., λ″). n )=λ″1+λ″2+...+λ″ n In constraint C11, G represents the maximum response time of the real-time task, i.e. And 0 ≤ β < T dead , i∈N={1,2,...,n}; To consider the limiting case of the problem, assume that the energy consumption P in constraint C12 is equal to the available power of the system.
[0133] The non-real-time task scheduling problem is a multivariable and multi-constraint optimization problem, which can be solved using the classic Lagrange multiplier method. However, this introduces a system of nonlinear equations with 2n+3 variables, namely λ″1,λ″2,...,λ″ n ,s1,s2,...,s n The presence of three Lagrange multipliers makes it difficult to obtain a joint closed-form solution. Therefore, this invention, guided by the principle of load balancing and focusing on problem simplification, fully explores the mathematical relationship between processor speed and load distribution, thereby deriving the optimal processor speed configuration for heterogeneous multiprocessor systems under energy constraints. Specifically, this invention employs a Lagrange-based convex optimization method to simplify the non-real-time task scheduling problem, and uses a binary search method satisfying energy constraints to solve the simplified non-real-time task scheduling problem. The specific solution process is described in detail below.
[0134] Based on the above system, embodiments of the present invention also provide a typed task joint scheduling method based on a heterogeneous multi-core architecture, such as... Figure 2 As shown, the steps include:
[0135] S1. Obtain real-time task requests and non-real-time task requests from different terminal users, and set real-time tasks to have high priority and strong preemption characteristics, and non-real-time tasks to have low priority.
[0136] S2. Form a hybrid typed task flow, including real-time task flow and non-real-time task flow, according to the arrival time of real-time task and non-real-time task respectively.
[0137] S3. Divide it into multiple real-time task sub-streams and non-real-time task sub-streams according to the joint scheduling mechanism, and determine the task parameters of each task sub-stream and the execution order between each task sub-stream.
[0138] S4 and two types of task sub-streams with limited buffers are combined and the task execution order is sorted to obtain multiple waiting queues;
[0139] S5 receives multiple waiting queues in parallel, distributes the task substreams in the multiple waiting queues to multiple local schedulers, and dynamically adjusts the speed of each processor in each local scheduler according to system energy.
[0140] Corresponding to the system, in step S3, the joint scheduling process of the joint scheduling mechanism is as follows:
[0141] Given n multi-core local schedulers S1, S2, ..., S... n average task size Total arrival rate of real-time tasks λ′, total arrival rate of non-real-time tasks λ″, and deadline T for real-time tasks. dead and available power supply Find the real-time task arrival rates λ′1,λ′2,...,λ′ on the local scheduler. n Non-real-time task arrival rate λ″1,λ″2,...,λ″ n And processor speeds s1, s2, ..., s n This minimizes the average response time of non-real-time tasks under system energy constraints, while ensuring that the maximum response time of real-time tasks does not exceed their deadlines, where the local scheduler S... i Having c i The speed is s i The capacity is m i The static power consumption is P i * Homogeneous multi-core processors, i = 1, 2, ..., n.
[0142] The joint scheduling mechanism can be mathematically expressed as a typed task joint scheduling problem, as follows:
[0143]
[0144] in, T″ represents the average response time of non-real-time tasks in the system. i This indicates that non-real-time tasks are scheduled locally by the scheduler S. i Average response time in; ρ″ i Indicates the local scheduler S i Total core utilization of real-time and non-real-time tasks; Constraint C1 represents the constraints that bring the system to equilibrium, i.e. Where 1≤i≤n; C2 represents the total arrival rate constraint for real-time tasks; C3 represents the total arrival rate constraint for non-real-time tasks; and C4 represents the maximum response time T′ for real-time tasks. max Not exceeding the deadline T dead That is, the time constraint of real-time tasks, where The real-time task distribution is λ′1,λ′2,...,λ′ n and processor speeds s1, s2, ..., s n The function, T′ i This indicates that real-time tasks are scheduled locally by the scheduler S. i The average response time in the system, where i∈N={1,2,...,n}; C5 indicates that the average power consumption P of the system does not exceed the available power of the system. That is, the energy constraint of the system.
[0145] Specifically, step S3 includes the following steps:
[0146] S31. Based on the priority constraints between tasks, the typed task joint scheduling problem is decomposed into a real-time task scheduling problem and a non-real-time task scheduling problem.
[0147] S32. The load balancing strategy is iteratively updated using the particle swarm optimization method with inertia weight coefficients. Under the constraint of task time limit, the real-time task scheduling problem is solved to obtain the load distribution of real-time tasks in the local scheduler.
[0148] S33. The non-real-time task scheduling problem is simplified by using a Lagrange-based convex optimization method, and the simplified non-real-time task scheduling problem is solved by using a binary search method that satisfies energy constraints, so as to obtain the load distribution of real-time tasks in the local scheduler.
[0149] In step S31, the real-time task scheduling problem is: while considering the deadlines and load balancing requirements of real-time tasks, optimize the maximum response time of real-time tasks and solve the load distribution of real-time tasks in the local scheduler.
[0150] The real-time task scheduling problem is represented as:
[0151] P2:min T′ max (λ′1,λ′2,...,λ′n )=max{T′1(λ′1),T′2(λ′2),...,T′ n (λ′ n )}
[0152] stC6:F′(λ′1,λ′2,...,λ′ n )=λ′
[0153] C7:T′ max (λ′1,λ′2,...,λ′ n )≤T dead
[0154] C8:σ≤ε
[0155] Here, constraint C6 is a variation of C2, and F′ represents the sum of the arrival rates of each real-time task sub-stream, i.e., F′(λ′1,λ′2,...,λ′). n )=λ′1+λ′2+...+λ′ n Constraint C7 is a variation of C4; Constraint C8 is a real-time task load balancing constraint, where ε is the load balancing factor, with a value range of 0 ≤ ε ≤ 10. -2 σ represents the load balancing effectiveness, expressed as: in This represents the average task completion time for real-time tasks in the system.
[0156] The non-real-time task scheduling problem is represented as:
[0157]
[0158] Among them, constraints C9, C10, C11, and C12 are variations of C1, C3, C4, and C5, respectively. In constraint C10, F represents the sum of the arrival rates of each non-real-time task sub-stream, i.e., F(λ″1, λ″2, ..., λ″). n )=λ″1+λ″2+...+λ″ n In constraint C11, G represents the maximum response time of the real-time task, i.e. And 0 ≤ β < T dead , i∈N={1,2,...,n}; To consider the limiting case of the problem, assume that the energy consumption P in constraint C12 is equal to the available power of the system.
[0159] like Figure 3 As shown, step S32 specifically includes the following steps:
[0160] S321. According to the scheduling rules, initialize the particle population and parameter settings (population size S, iteration count L). sLearning factors c1 and c2, inertia weight ω ini and ω end );
[0161] S322. Calculate the fitness value f for each particle based on the fitness function;
[0162] S323, Solving for the optimal fitness value P of an individual. besti and the optimal fitness value G of the group besti P besti It is a locally optimal solution, G besti It is the optimal solution among all local solutions in the solution space;
[0163] S324. Update the inertia weight coefficient ω according to the inertia weight coefficient update formula, that is...
[0164]
[0165] Where, ω ini and ω end Let f represent the initial value of ω and the value at the maximum number of iterations, respectively. avg and f min This represents the average and minimum target values of the current particle;
[0166] S325. Update the velocity and position of each particle according to the formula, where the velocity update formula is:
[0167] v i+1 =ωv i +c1r1(P besti -x i )+c2r2(G besti -x i ),
[0168] The position update formula is
[0169] x i+1 =x i +v i+1 ,
[0170] Among them, v i+1 and x i+1 Let v represent the updated particle velocity and position, respectively. i and x i R1 and R2 represent the velocity and position of the particle before the update, respectively; R1 and R2 represent random values between (0,1); C1 and C2 are learning factors.
[0171] S326. Determine if the maximum number of iterations L has been reached. s If the condition is not met, proceed to step S322; if the condition is met, end the iteration and proceed to step S327.
[0172] S327. Obtain the global optimal position, that is, the optimal load distribution of real-time tasks in the local scheduler.
[0173] like Figure 4 As shown, step S33 specifically includes the following steps:
[0174] S331. Using the Lagrange multiplier method to minimize T″, we obtain the equation. Where φ, ψ, τ are three Lagrange multipliers. For the derivative sign;
[0175] S332: Based on the right side of the equation in step S331, the load distribution variable λ″ of the non-real-time task. i and processor speed i Find the partial derivatives, where 1 ≤ i ≤ n;
[0176] S333: For the load distribution variable λ″ in the left-hand side T″ of equation S331 i and processor speed i Find the partial derivatives, where 1 ≤ i ≤ n;
[0177] S334: Combining the derivatives from steps S332 and S333, we obtain the theorem: For the energy-constrained non-real-time task scheduling problem, when all multi-core processors have the same speed, the average response time T″ of non-real-time tasks on n multi-core processors is minimized, i.e., s1 = s2 = ... = s n =s, and
[0178]
[0179] From the above formula, it can be seen that when the system energy When (available power) changes, the multi-core processor speed s i The corresponding changes can be made, and the optimal execution rate s can be found to efficiently complete the task, so as to meet the schedulability requirements of real-time tasks while minimizing the average response time of non-real-time tasks, where 1≤i≤n;
[0180] S335: Initialize available power supply and the upper bound λ″ of the load distribution for non-real-time tasks. max and the lower bound of load distribution λ″ min ;
[0181] S336: Determine λ″ max -λ″ min If ≥ν is true, proceed to step S337; otherwise, proceed to step S3312, where ν is a very small number with a value range of 10. -8 ≤ν≤10 -6 ;
[0182] S337: Take the average value λ″ of the current upper and lower bounds of the load distribution. mid As the load distribution for the current iteration, i.e.
[0183] S338: Determine whether the arrival rate of the assigned tasks is greater than the total arrival rate of the non-real-time tasks. If it is greater, proceed to step S339; if it is less, proceed to step S3310.
[0184] S339: Update the upper bound of load distribution λ″ max =λ″ mid ;
[0185] S3310: Update the lower bound λ″ of load distribution min =λ″ mid ;
[0186] S3311: Increment the iteration count by 1, go to step S336, and start a new round of iteration;
[0187] S3312: Obtain the optimal load distribution and average response time for non-real-time tasks in the local scheduler.
[0188] In other implementations, other effective solution methods can also be used to solve the real-time task scheduling problem and the non-real-time task scheduling problem.
[0189] In summary, the typed task joint scheduling system and method based on a heterogeneous multi-core architecture provided by the embodiments of the present invention have the following advantages and beneficial effects:
[0190] (1) A joint scheduling mechanism is introduced to divide and sort tasks according to task size and task priority. Based on this, for the time-limited characteristics of real-time tasks, the inertial weight coefficient particle swarm optimization method is used to iteratively update the load balancing strategy, so as to minimize the maximum response time of real-time tasks while meeting the schedulability requirements of real-time tasks. At the same time, for the low priority characteristics of non-real-time tasks, the problem is simplified by using the convex optimization idea based on Lagrange, and a binary search algorithm that satisfies energy constraints is adopted to effectively reduce the average response time of non-real-time tasks and achieve the optimal load distribution of the system.
[0191] (2) By dynamically adjusting the processor speed according to the system energy and completing tasks in parallel at the optimal execution speed, the requirements of large task processing volume and high real-time processing response in the multi-task scheduling system are effectively solved, ensuring the flexibility and real-time performance of various tasks.
[0192] (3) By limiting the capacity of the queue system, it consumes less processor resources and has a lower response time latency than the existing task scheduling system, which can better meet the needs of the embedded platform engineering application environment.
[0193] To verify the technical effects of the present invention, the following simulation experiment is designed to further illustrate the process.
[0194] Consider a set of heterogeneous multi-core local schedulers S1, S2, ..., Sn = 7 n Each local scheduler has c processors. i =2i, system capacity is m i = 4i, where 1 ≤ i ≤ n. The basic power consumption of each local scheduler is set to P. i * =0.2W, where 1≤i≤n. The average task execution size is set as r = 0.25 (billion instructions), and the total task arrival rate in the system is λ = [25:5:50]. This invention divides real-time tasks and non-real-time tasks into a 2:3 ratio, so the real-time task arrival rate is λ′ = [10:2:20], and the non-real-time task arrival rate is λ″ = [15:3:30]. Simultaneously, it is assumed that the available power of the system is... The deadline for real-time tasks is T. dead =1s. Finally, the present invention sets the simulation parameters of the particle swarm optimization algorithm with inertia weight coefficient, including population dimension S=7, number of particles P s =30, number of iterations L s =200, learning factor c1=c2=2.0, etc.
[0195] The specific simulation parameter settings are shown in Table 1:
[0196] Table 1 Specific simulation parameters
[0197]
[0198] This embodiment uses MATLAB software to compare the proposed joint scheduling optimization scheme for typed tasks based on heterogeneous multi-core architecture with different scheduling schemes:
[0199] ①OLB does not consider the time-limited characteristics of dedicated tasks in heterogeneous multiprocessor systems, and dedicated tasks are pre-loaded. It uses the optimal load balancing strategy to achieve load distribution of general tasks. See reference: Huang J, Liu Y, Li R, et al. Optimal power allocation and load balancing for non-dedicated heterogeneous distributed embedded computing systems[J]. Journal of Paralleland Distributed Computing, 2019, 130(AUG.): 24-36.
[0200] ② BDTPO does not consider the load distribution of dedicated tasks under heterogeneous multi-core architecture. Dedicated tasks are preloaded and have deadlines, and the load distribution of general tasks is achieved by using a bidirectional timing power optimization strategy. See reference: Huang J, Li R, Wei Y, et al. Bi-Directional Timing-Power Optimisation on Heterogeneous Multi-Core Architectures[J].IEEE Transactions on Sustainable Computing,2021,6(4):572-585.
[0201] ③ The proposed solution in this invention has real-time tasks with real-time characteristics and priority execution rights, and utilizes a joint scheduling optimization strategy for typed tasks to achieve joint scheduling and load balancing of real-time and non-real-time tasks.
[0202] Since both OLB and BDTPO model heterogeneous multicore systems as M / M / 1 queuing systems, for fairness, the system in this invention is considered to be an M / M / 1 / m queuing system. Furthermore, to ensure the generalizability of the experimental results, this embodiment utilizes a random distribution to preload proprietary tasks.
[0203] exist Figure 5 This paper compares the impact of real-time task arrival rate on the maximum response time of real-time tasks under different scheduling schemes within energy constraints. As the real-time task arrival rate increases, the maximum response time under all three schemes shows an upward trend. The OLB scheme exhibits the longest maximum response time, exceeding the system's set deadline of 1 second when the arrival rate exceeds 20%. This is because the OLB scheme does not consider the time constraint of real-time tasks. Furthermore, a comparison between the BDTPO scheme and the proposed scheme shows that the introduction of limited system capacity and effective allocation of real-time tasks contribute to improved system performance. The proposed scheme effectively schedules real-time tasks based on system energy consumption, meeting time constraints and load balancing requirements, and effectively reducing task response latency.
[0204] exist Figure 6This paper compares the impact of non-real-time task arrival rate on the average response time of non-real-time tasks under different schemes with energy constraints. As the task arrival rate increases, the average response time of all schemes continues to rise. It can be seen that when the arrival rate exceeds 21%, the average response time of non-real-time tasks in OLB and BDTPO is significantly longer than that of the proposed scheme. Because the OLB and BDTPO schemes preload real-time tasks, the processors cannot effectively allocate load according to the system energy state, resulting in some processors being overloaded, ultimately causing low-priority non-real-time tasks to be blocked in the waiting queue. This generates additional waiting latency, leading to an increase in their average response time. It can also be seen that the system performance of the OLB scheme is slightly better than that of the BDTPO scheme, and the performance gap becomes more pronounced with increasing arrival rate. This trend has been demonstrated in the BDTPO literature. Furthermore, the introduction of limited system capacity in the proposed scheme can effectively avoid the additional latency caused by queuing, therefore the proposed scheme exhibits better performance than other schemes.
[0205] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A typed task joint scheduling system based on a heterogeneous multi-core architecture, characterized in that, The task request end, the task manager, the global scheduler, the queue buffer and the task scheduler are included. The task request end is used for submitting real-time task requests and non-real-time task requests from different terminal users to the task manager, and setting the priority of real-time tasks to be high with strong preemption characteristics and the priority of non-real-time tasks to be low. The task manager is used for receiving the real-time task requests and the non-real-time task requests, forming a mixed type task stream including real-time task streams and non-real-time task streams according to the arrival time of the two types of tasks respectively, and then sending the mixed type task stream to the global scheduler. The global scheduler is used for receiving the mixed type task stream, dividing the mixed type task stream into a plurality of real-time task sub-streams and non-real-time task sub-streams according to a joint scheduling mechanism, determining the task parameters of each task sub-stream and the execution order between the task sub-streams, iteratively updating the load balancing strategy of real-time tasks by using an inertia weight coefficient particle swarm optimization method, minimizing the maximum response time of real-time tasks while meeting the schedulability requirements of real-time tasks, and simplifying the solution of the problem by using a Lagrange-based convex optimization idea and solving by using a dichotomy search algorithm that meets the energy constraint for non-real-time tasks. The queue buffer is used for buffering the two types of task sub-streams in a limited manner, and queue sorting is performed in combination with the task execution order to obtain a plurality of waiting queues. The task scheduler is used for receiving a plurality of the waiting queues in parallel, distributing the task sub-streams in the plurality of the waiting queues to a plurality of local schedulers, and dynamically adjusting the speed of each processor in each local scheduler according to the system energy. 2.The typed task joint scheduling system based on heterogeneous multi-core architecture of claim 1, wherein, The joint scheduling process of the joint scheduling mechanism is as follows: Given a multi-core local scheduler , a task average size , a total real-time task arrival rate , a total non-real-time task arrival rate , a deadline of a real-time task , and a power available power , find a real-time task arrival rate , a non-real-time task arrival rate , and a processor speed , such that the average response time of non-real-time tasks is minimized while satisfying the maximum response time of real-time tasks does not exceed its deadline under system energy constraints, where the local scheduler has a homogeneous multi-core processor with a speed of a capacity of a static power consumption of . 3.The typed task joint scheduling system based on heterogeneous multi-core architecture of claim 2, wherein, The joint scheduling process of the joint scheduling mechanism is mathematically expressed as a type task joint scheduling problem: , wherein denotes the average response time of non-real-time tasks in the system, denotes the average response time of non-real-time tasks in the local scheduler ; denotes the total core utilization of real-time and non-real-time tasks in the local scheduler ; constraints denote constraints that the system is in equilibrium, i.e. wherein ; denotes the total arrival rate constraint of real-time tasks; denotes the total arrival rate constraint of non-real-time tasks; denotes the maximum response time of real-time tasks does not exceed the deadline , i.e. the deadline constraint of real-time tasks, wherein is a function of the real-time task distribution and the processor speed , denotes the average response time of real-time tasks in the local scheduler , wherein ; denotes the average power consumption of the system does not exceed the available power of the system , i.e. the energy constraint of the system; min denotes the minimum and max denotes the maximum.
4. The typed task joint scheduling system based on a heterogeneous multi-core architecture according to claim 3, characterized in that: According to the priority constraints between tasks, the type task joint scheduling problem is decomposed into a real-time task scheduling problem and a non-real-time task scheduling problem, and the load distribution of real-time tasks and non-real-time tasks in the local schedulers is obtained by solving the real-time task scheduling problem and the non-real-time task scheduling problem respectively. The real-time task scheduling problem is to optimize the maximum response time of real-time tasks while considering the deadline and load balancing requirements of real-time tasks, and to solve the load distribution of real-time tasks in the local schedulers. The real-time task scheduling problem is expressed as: , wherein the constraint condition is a variant of , and represents the sum of the arrival rates of each real-time task sub-flow, i.e. ; the constraint condition is a variant of ; the constraint condition is a real-time task load balancing constraint, is a load balancing factor, and the value range is ; is a load balancing effectiveness, and is expressed as , wherein represents the average task completion time of the real-time task in the system; The inertia weight coefficient particle swarm optimization method is used to iteratively update the load balancing strategy, and the real-time task scheduling problem is solved under the constraint of task time limit.
5. The typed task joint scheduling system based on a heterogeneous multi-core architecture according to claim 4, characterized in that, The non-real-time task scheduling problem is to perform load distribution under the constraint of system power, with the objective of minimizing the average response time of non-real-time tasks. The non-real-time task scheduling problem is expressed as: , where the constraint is a variation of the constraint and in the constraint denotes the sum of the arrival rates of the individual non-real-time task sub-flows, i.e. ; in the constraint denotes the maximum response time of the real-time task, i.e. , and , , ; for considering the limit case of the problem, it is assumed that the energy consumption in the constraint equals the available power of the system .
6. A typed task joint scheduling method based on a heterogeneous multi-core architecture, characterized in that, The method comprises the following steps: S1, real-time task requests and non-real-time task requests from different terminal users are obtained, and the priority of real-time tasks is set to be high with strong preemption characteristics and the priority of non-real-time tasks is set to be low. S2, a mixed type task stream including real-time task streams and non-real-time task streams is formed according to the arrival time of real-time tasks and non-real-time tasks respectively. S3, dividing the real-time tasks and non-real-time tasks into multiple sub-streams according to the joint scheduling mechanism, and determining the task parameters of each sub-stream and the execution order between the sub-streams; S4, storing the two types of sub-streams in a limited cache, and performing queue sorting according to the task execution order to obtain multiple waiting queues; S5, receiving the multiple waiting queues in parallel, distributing the task sub-streams in the multiple waiting queues to multiple local schedulers, and dynamically adjusting the speed of each processor in each local scheduler according to the system energy.
7. The typed task joint scheduling method based on a heterogeneous multi-core architecture according to claim 6, characterized in that, In the step S3, the joint scheduling process of the joint scheduling mechanism is as follows: Given a multi-core local scheduler , a task average size , a total real-time task arrival rate , a total non-real-time task arrival rate , a deadline of a real-time task , and a power available power , find a real-time task arrival rate , a non-real-time task arrival rate , and a processor speed , such that the average response time of non-real-time tasks is minimized while satisfying the maximum response time of real-time tasks does not exceed its deadline under system energy constraints, where the local scheduler has a homogeneous multi-core processor with a speed of a capacity of a static power consumption of . 8.The typed task joint scheduling method based on heterogeneous multi-core architecture according to claim 7, characterized in that, The joint scheduling process of the joint scheduling mechanism is mathematically expressed as a typed task joint scheduling problem: , wherein denotes the average response time of non-real-time tasks in the system, denotes the average response time of non-real-time tasks in the local scheduler ; denotes the total core utilization of real-time and non-real-time tasks in the local scheduler ; constraint denotes the constraint that the system is in equilibrium, i.e. wherein ; denotes the total arrival rate constraint of real-time tasks; denotes the total arrival rate constraint of non-real-time tasks; denotes the maximum response time of real-time tasks does not exceed the deadline , i.e. the deadline constraint of real-time tasks, wherein is a function of the real-time task distribution and the processor speed , denotes the average response time of real-time tasks in the local scheduler , wherein ; denotes that the average power consumption of the system does not exceed the available power of the system , i.e. the energy constraint of the system; min denotes the minimum and max denotes the maximum. 9.The typed task joint scheduling method based on heterogeneous multi-core architecture according to claim 8, characterized in that, The step S3 specifically includes the following steps: S31, decomposing the typed task joint scheduling problem into a real-time task scheduling problem and a non-real-time task scheduling problem according to the priority constraints between tasks; The real-time task scheduling problem is to optimize the maximum response time of the real-time tasks while considering the real-time task deadline and the load balancing requirement, and to solve the load distribution of the real-time tasks in the local schedulers; The real-time task scheduling problem is represented as: , wherein the constraint condition is a variant of , and denotes the sum of the arrival rates of each real-time task sub-flow, i.e. ; the constraint condition is a variant of ; the constraint condition is a real-time task load balancing constraint, is a load balancing factor, and the value range is ; is a load balancing effectiveness, and is expressed as , wherein denotes the average task completion time of real-time tasks in the system; The non-real-time task scheduling problem is represented as: , Among them, constraints They are respectively The variant, and under constraints middle This represents the sum of the arrival rates of all non-real-time task substreams, i.e. Constraints In This indicates the maximum response time of a real-time task, i.e. ,and , To consider the limiting case of the problem, we assume the following constraints. Energy consumption Equal to the system's available power ; S32, iteratively updating the load balancing strategy by using an inertia weight coefficient particle swarm optimization method, solving the real-time task scheduling problem under the condition of meeting the task time limit constraint, and obtaining the load distribution of the real-time tasks in the local schedulers; S33, simplifying the non-real-time task scheduling problem by using a Lagrange-based convex optimization method, and solving the simplified non-real-time task scheduling problem by using a bisection search method that meets the energy constraint, and obtaining the load distribution of the real-time tasks in the local schedulers.
10. The typed task joint scheduling method based on a heterogeneous multi-core architecture according to claim 9, characterized in that: The step S32 specifically includes the following steps: S321, initializing the particle population and parameter settings according to the scheduling rules; S322, calculating the fitness value f of each particle according to the fitness function; S323, solving the individual best fitness value and the population best fitness value ; S324, update the inertia weight coefficient according to the inertia weight coefficient update formula i.e. , wherein, and denote the initial value and the value at the maximum number of iterations, respectively, and denote the average target and the minimum target value of the current particle; S325, updating the speed and position of each particle according to the formula, wherein the speed update formula is , The position update formula is , wherein, and denote the updated velocity and position of the particle, respectively, and denote the velocity and position of the particle before the update, respectively, and denote a random value between are learning factors; S326, determine whether the maximum iteration number is reached If not, go to step S322, if yes, end iteration and go to step S327. S327, obtaining the global best position, i.e., the optimal load distribution of the real-time tasks in the local schedulers; The step S33 specifically includes the following steps: S331, minimize using Lagrange multiplier method , gives the equation where are three Lagrange multipliers, is the derivative symbol; S332: distribute the load variable of the non-real-time task according to the right side of the equation in step S331 and processor speed partial derivative, where ; S333: take the partial derivative of the load distribution variable in the left side of the equation of step S331 and the processor speed where ; S334: get the theorem by combining the derivation results in step S332 and step S333: for the non-real-time task scheduling problem under energy constraint, when all multi-core processors have the same speed, the average response time of non-real-time tasks on one multi-core processor is the minimum, that is, , and , wherein represents a power factor of the local scheduler , and ; S335: initialize power available power and an upper bound on the load distribution of non-real-time tasks and a lower bound on the load distribution ; S336: judging whether it is true, if true, go to step S337, otherwise go to step S3312, wherein is a very small number, the value range is ; S337: take the average of the upper bound of the current load distribution and the lower bound of the load distribution as the load distribution for the current iteration, i.e. ; S338, judging whether the allocated arrival rate is greater than the total arrival rate of the non-real-time tasks, if yes, performing step S339, and if no, performing step S3310; S339: update the load distribution upper bound ; S3310: update the load distribution lower bound ; S3311, increasing the iteration number by 1, and turning to step S336 to start a new iteration; S3312, obtaining the optimal load distribution of the non-real-time tasks in the local schedulers and the average response time.
Citation Information
Cited By
Intelligent task scheduling method and system for heterogeneous multi-core embedded system
CN121879920A