Task scheduling method and system based on heterogeneous pulse neural network on GPU (Graphics Processing Unit)

By adopting a scheduling method based on dynamic priority, the resource conflict problem of multiple concurrent spiking neural network tasks is solved, achieving stable performance and efficient resource utilization under high arrival rate, and adapting to the dynamic characteristics of heterogeneous LIF neuron models.

CN120996115APending Publication Date: 2025-11-21ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511146797.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing scheduling strategies cannot effectively manage multiple concurrent spiking neural network tasks, leading to resource conflicts and performance instability, especially at high arrival rates where it is difficult to meet the requirements for precise timing control.

Method used

A dynamic priority-based scheduling method is adopted, which optimizes resource allocation by calculating the gradient of the objective function and Lagrange multipliers, and combines an adaptive time partitioning mechanism to dynamically adjust task priorities and resource allocation in order to reduce resource conflicts and scheduling overhead.

Benefits of technology

It achieves stable performance and resource utilization under high arrival rates, reduces resource conflicts, improves task completion efficiency and energy efficiency, and adapts to the dynamic characteristics of heterogeneous LIF neuron models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996115A_ABST
    Figure CN120996115A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method and system based on a heterogeneous pulse neural network on a GPU (Graphics Processing Unit), which are used for modeling a scheduling problem into a reward maximization task with constraints so as to optimize resource allocation and parameter adjustment. According to the priority-based multi-preemptive scheduling framework provided by the invention, the heterogeneous SNN tasks on the GPU are dynamically managed by adopting dynamic priority calculation, a self-adaptive time segmentation mechanism and an overhead perception optimization strategy. The effectiveness of the method is verified through a large number of simulation experiments, and the performance under different complexity proportions, arrival modes, load levels and time slice configurations is tested. Results show that the priority-based multi-preemptive scheduling framework provided by the invention is superior to the existing scheduling algorithm in the aspects of energy efficiency, throughput and resource utilization rate. The work promotes the practical application of the SNN workload in a service computing environment, and promotes the development of a more efficient and extensible neuromorphic computing solution.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular, to a GPU heterogeneous spiking neural network task scheduling method and system based on dynamic priority. BACKGROUND

[0002] Modern service computing infrastructures span from large-scale cloud data centers to resource-constrained edge devices, handling growing amounts of data and diverse computing tasks. While deep neural networks are currently driving many such services, their reliance on continuous activations and significant power consumption pose challenges to maintaining energy efficiency and adaptability. These limitations have motivated interest in biologically-inspired neural architectures, such as spiking neural networks (SNNs). SNNs process information in an event-driven manner through discrete spikes and time-dependent dynamics.

[0003] While SNNs have not been widely adopted in the service computing domain, they are increasingly attracting broader research interest due to their potential to integrate neuroscience and artificial intelligence insights. As these biologically-inspired capabilities rely on spikes and changing membrane potentials, rather than continuous activations, specialized scheduling strategies are needed to effectively deploy SNNs on GPU-based platforms.

[0004] Recent research into deploying SNNs to modern computing infrastructures, particularly GPUs, has shown that SNNs exhibit significant potential for achieving high energy-efficient computation and low-latency inference. SNNs process information through discrete spike signals and time-dependent dynamics, highly aligning with the needs for real-time adaptive data processing in service systems. However, the inherent irregular event-driven nature and stateful neuron dynamics of SNNs pose unique challenges to current GPU resource management frameworks.

[0005] Existing mechanisms such as dynamic optimization or priority-based scheduling strategies, while improving performance and energy efficiency under mixed workloads, cannot meet the requirements of precise timing control for SNNs. These issues are particularly pronounced when managing multiple concurrent SNN tasks. Each task has different computational needs, latency requirements, and resource contention patterns, and frequent preemption and context switching also incur significant overhead, further exacerbating the difficulty of deploying SNNs on GPUs. SUMMARY

[0006] The technical problem to be solved by the embodiments of the present application is to provide a GPU heterogeneous spiking neural network task scheduling method and system based on dynamic priority, which can reduce resource conflicts and provide stable performance under high arrival rate.

[0007] In order to solve the above technical problems, the embodiment of the present application provides a GPU-based heterogeneous pulse neural network task scheduling method based on dynamic priority, comprising the following steps: S1: calculating the gradient of the objective function at time t, and obtaining resource allocation and scheduling indicators under the gradient condition; S2: using three adjustable weights to control the balance between the urgency of the deadline, the remaining workload and the energy consumption to calculate the dynamic priority; S3: combining the priority-based decision with the gradient-guided resource allocation, in each time slot, the algorithm first calculates the task priority, and then allocates resources according to the task priority; S4: using an adaptive time slicing method to adjust the size of the time slice according to the theoretical limit and the actual demand, and the adaptive time slice monotonically decreases with the relaxation ratio.

[0008] The gradient condition includes: the priority calculation must balance the resource constraints and the coupling constraints; the resource allocation follows the gradient direction if possible; and the overhead caused by the state change is explicitly calculated.

[0009] The method of resource allocation in S3 includes: S31: initial allocation according to the task priority; S32: under the premise of coupling constraints, the allocation is improved by gradient ascent; and the improvement step is realized by using parallel methods for different resource types, and the calculation process includes: initial allocation according to the priority; initial allocation according to the priority; and parallel improvement according to the gradient.

[0010] The S4 further includes reducing the total scheduling overhead by using the scheduling overhead ratio.

[0011] The S4 further includes using a state management routine including the following methods for adaptive time slicing: Saving membrane potential and pulse history during preemption; Tracking task progress and updating the relaxation ratio; Monitoring switching overhead to provide feedback.

[0012] Correspondingly, the embodiment of the present application also provides a system according to the above GPU-based heterogeneous pulse neural network task scheduling method based on dynamic priority, comprising a task manager, a priority calculation module, a resource allocator and a performance monitor. The task manager is used for processing new tasks and monitoring the progress of the tasks in the task life cycle; The priority calculation module is configured to dynamically evaluate the priority of each task, and take into account factors such as deadline urgency, remaining workload and energy consumption, and use the calculated priority score as a core basis for subsequent resource allocation and scheduling decisions. The resource allocator is configured to optimize the allocation of available GPU resources among active tasks in two stages according to the priority calculated by the priority calculation module: in the initial stage, the resource allocator uses a proportional allocation scheme; in the second stage, the initial allocation is repeatedly improved to achieve a globally optimal allocation. The performance monitor is configured to track performance indicators, including average task execution time, energy efficiency ratio, average waiting time, GPU utilization and throughput, to ensure the effectiveness of scheduling decisions and resource allocation.

[0013] The performance monitor further includes recording the overhead generated during context switching and inter-task communication.

[0014] The implementation of the present application has the following beneficial effects: the priority-based multi-preemption scheduling framework proposed by the application achieves a harmonious balance between theoretical optimization and actual efficiency. By continuously adapting to the dynamic characteristics of the heterogeneous LIF neuron model workload and the inherent challenges of the GPU cluster environment, the framework demonstrates the ability of theory-driven design in solving complex scheduling problems. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 The figure is a schematic diagram of the system architecture of the present application; Figure 2 The table is a table of key configurations of the embodiment of the present application; Figure 3 The figure is a throughput comparison statistical diagram of each scheduling method under three arrival modes and different numbers of neurons; Figure 4 The figure is an energy efficiency comparison statistical diagram of each scheduling method under three arrival modes and different numbers of neurons; Figure 5 The figure is a GPU utilization comparison statistical diagram of each scheduling method under three arrival modes and different numbers of neurons; Figure 6 , Figure 7 , Figure 8 The tables are completion time and waiting time statistical tables of each scheduling method under three arrival modes and different numbers of neurons; Figure 9 , Figure 10 The figure shows the changes in throughput and energy efficiency of each scheduling method under three arrival modes when the complexity ratio increases from 0.3 to 0.7; Figure 11GPU utilization table for each scheduling method at three representative complexity ratios under three arrival patterns; Figure 12 Resource usage bar chart for each scheduling method at different time slices under three arrival patterns; Figure 10 Variation of energy efficiency for each scheduling method at three arrival patterns as the complexity ratio increases from 0.3 to 0.7; Figure 11 GPU utilization table for each scheduling method at three representative complexity ratios under three arrival patterns Figure 12 Resource usage bar chart for each scheduling method at different time slices under three arrival patterns; Figure 13 Bar chart of the impact of time slice length on switching overhead and latency. DETAILED DESCRIPTION

[0016] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings.

[0017] The first aspect of the embodiment provides a heterogeneous spiking neural network task scheduling method on GPU based on dynamic priority, which is implemented by the following method.

[0018] A heterogeneous spiking neural network task scheduling method on GPU based on dynamic priority uses a priority-based multi-preemption scheduling framework, which is specially used for coordinating multiple SNN tasks based on LIF neuron model on GPU. The SNN tasks based on LIF neuron model are different from the continuously activated network. They rely on the evolution of neuron state over time and event-driven synaptic update. In each simulation step, the membrane potential of each neuron is updated according to the following formula:

[0019] wherein is the membrane time constant, is the resting potential, is the membrane resistance, is the input current. Once the firing threshold is reached, the neuron will emit a pulse and reset its potential to This sends event-based updates to other neurons through weighted synapses. On a GPU, these updates are run through multiple threads. At each time step, the compute kernel detects which neurons have fired and subsequently adjusts the membrane potentials of downstream neurons. Unlike standard deep neural networks, this class of spiking neural network tasks involves irregular memory access patterns, which can lead to memory read-write inconsistencies. Moreover, neurons carry their internal state across steps, so the kernel launch must handle possible spike bursts and different firing rates. To maintain high performance, fine-grained memory management, synchronization mechanisms, and kernel batching techniques are required.

[0020] This embodiment uses a unified modeling framework to capture system resources and task behavior to address the unique challenges that arise from scheduling heterogeneous LIF neuron model neural networks for resource allocation and optimization. Consider a GPU cluster with M nodes, denoted by Each node is characterized by a capacity vector Each element of the vector represents a specific resource (compute core, memory bandwidth, etc.). This multi-dimensional model enables fine-grained control while reflecting the heterogeneous nature of modern GPU architectures.

[0021] This embodiment formulates the scheduling problem as a reward maximization task with multiple constraints. The objective function balances computational gains and system overheads:

[0022] where is the dynamic priority coefficient of task , measures the progress of the task given the allocated resources, and captures the system overheads due to context switching and communication. denotes whether task occupies node t 's resources in slot , denotes the actual amount of resources allocated to task t by node in slot . is the upper limit of this resource on node .

[0023] The above formulation considers the following three challenges: Type 1: Resource Limitations (Eq. 6b). The system operates based on discrete time slots In each time slot, the invention makes resource allocation decisions through two key variables: : represents a task whether to use a resource type on a node ; : specifies the number of allocated resource types

[0024] The resource allocation must satisfy the capacity constraints:

[0025] Type 2: Hardware coupling constraints (Eq. 6c). Resource constraints also cause coupling between hardware:

[0026] where, represents the interaction of resources, represents the total usage of resources.

[0027] Type 3: The computational demand constraints caused by the dynamic nature of LIF neuron model tasks and workload characteristics (Eq. 6d). The computational behavior of LIF neuron model tasks is derived from its neuron dynamics, and each task follows the membrane potential equation (same as Eq. 1):

[0028] When reaches the threshold , the neuron triggers and resets to . This event-driven behavior produces time-varying workloads, which significantly affect scheduling decisions. Its total computational demand can be modeled as:

[0029] This workload model captures both the membrane potential update and synaptic operation . Its dynamic characteristics come from the constantly changing pulse patterns and network activities, resulting in three key features that affect scheduling: 1) Time-varying resource demand induced by pulse computation; 2) Uneven workload distribution among neurons; 3) Strong timing dependencies between execution steps.

[0030] These characteristics make static allocation strategies ineffective, so adaptive scheduling methods are needed.

[0031] This embodiment aims to make resource allocation decisions that meet key theoretical characteristics while optimizing the objective function.

[0032] ​​The invention first establishes these properties through rigorous theoretical analysis, and then shows how these properties provide the basis for the design of the invention.

[0033] The embodiment is implemented by the following 4 aspects.

[0034] S1: First, in the time slot t Collect system state, get decision vector And the load vector Then construct the Lagrange function according to the objective function (6a) And calculate its gradient according to formula (7) coordinate by coordinate , Provide direction information for subsequent resource adjustment and multiplier update.

[0035] The method for calculating the gradient of the objective function at Time is:

[0036] Where, The slot t The enablement indicator of the first Resource item, Indicates the instantaneous load of the first Task class on the link , Is a differentiable function that measures the load benefit, Is its first derivative, Is the Lagrange multiplier corresponding to the constraint term, Is the current priority update task class index.

[0037] According to this gradient structure, the invention constructs the Lagrange function and sets its gradient to zero, and after arrangement, the following key theorem is obtained: Theorem 1 (optimization condition): when optimizing, resource allocation And scheduling indicators Must meet the following conditions:

[0038] Where, The dynamic priority of task In slot t (This is written in the previous supplement), Indicates the resource allocation vector that meets the optimality condition, Is the Lagrange multiplier corresponding to the resource capacity constraint (6b), Is the Lagrange multiplier corresponding to the hardware coupling constraint (6c), Is the partial derivative of the coupling function with respect to resource allocation, which describes the influence of cross-node interference on the gradient.

[0039] where, and are Lagrange multipliers representing resource limits and hardware coupling limits. Non-convexity means that these conditions are necessary but not sufficient for global optimality.

[0040] The present invention computes the optimal distance t at each iteration slot using the following procedure: S1.1: Compute the multipliers according to the gradient balance relation in equation (8). ; S1.2: Update the resource allocation using the computed multipliers.

[0041] This theorem proposes three basic principles for the design of the present invention: 1) The priority computation must balance resource constraints and coupling constraints; 2) The resource allocation should follow the gradient direction when feasible; 3) The overhead of state changes should be explicitly computed.

[0042] S2: Dynamically compute the priority so that the priority gradient can adapt to the changing conditions. According to the three principles proposed in S1, the present invention computes the dynamic priority in the following way:

[0043] Here, α, β, δ are adjustable weights that control the balance between deadline urgency , remaining workload , and energy consumption , and the term is used to prevent division by zero.

[0044] The convergence of this method can be guaranteed in the following way: Lemma 1 (Step constraint): For a time step t and a feasible allocation :

[0045] where, is the optimal solution, is the step size.

[0046] With this lemma, the priority-based multi-preemption scheduling framework proposed by the present invention can constrain the optimal distance after each update. This bound guides the present invention to choose a step size , which is given by:

[0047] These theoretical results lay the foundation for the practical scheduling mechanism of the present application, which will be described in detail below.

[0048] The present application performs the following three processing steps in S2 to make the step length constraint of Lemma 1 directly executable.

[0049] S2.1: Calculate the gradient norm t in the time slot , and generate according to formula (11) , where is the diameter of the feasible region, and is the preset maximum number of iteration slots.

[0050] S2.2: Load update uses the projected gradient descent, update the load vector to ensure that the result is still in the feasible set.

[0051] S2.3: If , it is considered that the load of the current slot has converged; otherwise, return to S2.1 to recalculate the step length and continue iteration.

[0052] Through S2.1-S2.3, the step length rule of formula (11) is embedded in the scheduling loop, ensuring that the resource adjustment process converges to the optimal solution that satisfies the constraints within a limited number of slots.

[0053] S3: Use a two-stage scheduling method to combine priority-based decision-making with gradient-guided resource allocation.

[0054] At each time slot t, the algorithm first calculates the task priority using formula 9, and then allocates resources according to these priorities. To effectively handle non-convex optimization problems, the present application divides resource allocation into two steps.

[0055] S3.1: First, the present application performs initial allocation according to task priority:

[0056] S3.2: Then, the present application refines these allocations through gradient ascent while fully considering coupling constraints:

[0057] The projection operator ensures that the allocation remains feasible. According to Lemma 1, the present application can prove that this refinement process is convergent: Theorem 2 (convergence rate): After completing the gradient improvement of S3.2, update according to the increase of , and calculate the cumulative error If , it is determined that the resource allocation has reached the error upper bound given by Theorem 2, and the next time slot is entered; otherwise, return to S3.2 to continue iteration.

[0058] where is the adaptive step size of the slot t , is the gradient upper bound, is the maximum number of iteration slots planned, satisfies is the optimal load vector.

[0059] In order to accelerate the convergence speed in practice, the present application uses parallel subroutines for different resource types to implement the perfect step. The calculation process consists of three key parts: 1) Update the priority using formula 9: 2) Initial allocation according to the priority; 3) Parallel improvement according to the gradient.

[0060] In order to make the "three-step method" directly callable in the implementation level, the present application decomposes each step into several atomic operations, and the overall parallel degree is taken as the granularity of resource type . The specific processing flow is as follows.

[0061]

[0062] 1) Update the priority: first, collect the current parameters of the task : the remaining time , the remaining workload , the historical energy consumption and the weight , calculate the priority according to formula (9), where , , is the weight adjustment, to prevent division by zero. Truncated normalization is performed on all : .

[0063] 2) Initial allocation according to the priority: for each resource type , calculate the normalization coefficient on the node : , generate the proportional allocation result , and ensure that it does not exceed the capacity . Parallel check hardware coupling constraints, if , then scale .

[0064] 3) Parallel improvement according to the gradient: in each resource type ​Start independent thread, compute local gradient , update and project , where is the projection operator that satisfies both capacity and coupling. If the convergence criterion is met, output the final allocation, otherwise repeat the gradient update loop.

[0065] This design can quickly adapt to changes in workload while maintaining theoretical rationality. Since it is executed in parallel, the time complexity of each iteration is O(log(K)), where K is the number of resource types.

[0066] S4: To efficiently execute heterogeneous SNN tasks based on LIF neuron models on GPUs, it is necessary to master the complex interactions between the following conditions: Time dependence: Each step of simulation is built on the results of the previous step. Newly emitted spikes change downstream calculations in the next iteration, making future workloads inherently uncertain and changing over time.

[0067] Heterogeneous workload: In SNNs, different groups of neurons and synaptic pathways exhibit different activity levels and computational intensity. Some network regions may produce dense spike patterns that require intensive processing, while others remain relatively calm, resulting in highly uneven task loads.

[0068] Limited GPU resources: GPU resources such as streaming multiprocessors, shared memory, and global memory bandwidth are limited and must be dynamically allocated among multiple concurrent tasks. Each task may have different latency requirements, energy consumption goals, and complexity characteristics.

[0069] These factors require a scheduling solution that can adapt to changing tasks. It must calculate priorities with time-sensitive updates, select time slices that can respond to demand changes, and weigh the cost of preemption against the benefits of meeting deadlines or improving utilization. Therefore, the invention introduces an adaptive time slicing mechanism that can be adjusted according to theoretical limits and actual demand. For each task , the formula for calculating the time slice is as follows:

[0070] where is the relaxation ratio, controls the adaptation speed.

[0071] This mechanism has important theoretical properties: Lemma 2 (Monotonicity of Time Slice): The adaptive time slice is monotonically increasing with the relaxation ratio​ monotonically decreasing:

[0072] This monotonicity ensures that time-critical tasks are assigned to larger time slices, thus gaining priority. To quantify the efficiency of this mechanism, the present invention defines the scheduling overhead ratio: Definition 1 (overhead ratio): The scheduling overhead ratio of a task at time is defined as

[0073] where denotes the context switching cost.

[0074] The adaptive mechanism provides strong theoretical guarantees for overhead control: Theorem 3 (time slice optimality): The adaptive time slice mechanism minimizes the total scheduling overhead while satisfying the deadline requirements. For any task

[0075] where is the maximum switching overhead.

[0076] To put Lemma 2 and the "adaptive time slice" theory of Theorem 3 into executable steps, the present invention implements the following procedure: S4.1: Slack computation: For each active task compute

[0077] S4.2: Time slice update: Obtain the new time slice length from the formula and use to ensure monotonicity.

[0078] S4.3: Overhead ratio monitoring: Compute the scheduling overhead ratio online: where denotes the context switching cost.

[0079] S4.4: Parameter self-tuning: If then to reduce the overall overhead ratio, otherwise keep the current parameters.

[0080] S4.5: Execution and feedback: Execute the tasks according to the updated and feed back the measured to the next cycle.

[0081] ​1) Save membrane potential and pulse history during preemption; 2) Track task progress and update slack ratio; 3) Monitor context switch overhead to provide feedback.

[0082] To implement the above three aspects, the invention designs a state management routine that executes the following three steps in parallel at each time slot: 1) State saving: if a task is preempted, immediately serialize the membrane potential and pulse history buffer as well as the number of steps executed and write them to the GPU global memory. 2) Progress and slack update: calculate the task progress ratio and refresh the slack . When < , trigger the priority reevaluation of equation (9) immediately.

[0083] 3) Context switch overhead monitoring: calculate the context switch time in the previous slot to obtain the overhead ratio . If > , execute in the next round of time slicing to suppress excessive switching costs.

[0084] The second aspect of the embodiment provides a system using the above-mentioned GPU-based heterogeneous pulse neural network task scheduling method based on dynamic priority, including a task manager, a priority calculation module, a resource allocator, and a performance monitor.

[0085] As shown in Figure 1 , each part plays an important role in the overall function of the framework, and they work together to achieve core principles such as priority-driven scheduling, adaptive resource allocation, and overhead-aware decision-making.

[0086] The task manager, located at the forefront of the system, is responsible for handling new tasks and monitoring their progress throughout their life cycle. When a new task arrives, the task manager carefully records its characteristics and requirements, laying the foundation for effective scheduling decisions.

[0087] The priority calculation module is the core of the adaptive scheduling strategy of the priority-based multi-preemption scheduling framework proposed by the invention. Under the guidance of equation (9), this module dynamically evaluates the priority of each task, taking into account factors such as deadline urgency, remaining workload, and energy consumption. The priority score calculated based on this will serve as the core basis for subsequent resource allocation and scheduling decisions.

[0088] A resource allocator that uses the computed priorities to optimally allocate available GPU resources among active tasks in two phases.

[0089] In the initial phase, the resource allocator first uses a proportional allocation scheme to ensure that higher-priority tasks get a larger share of the computational capacity. This theoretically-based approach allows the system to quickly respond to the most critical tasks, minimizing the risk of missing deadlines.

[0090] The core advantage of the priority-based multi-preemption scheduling framework proposed by the present invention is concentrated in the second phase of resource allocation. In this phase, the resource allocator iteratively refines the initial allocation to achieve a globally optimal allocation, maximizing the overall performance of the system.

[0091] A performance monitor that continuously tracks key performance indicators. This information allows the framework to make informed decisions, adjusting priority and allocation strategies based on changing workload demands and system conditions. Additionally, the performance monitor meticulously records the overhead incurred during context switching and inter-task communication, allowing the priority-based multi-preemption scheduling framework proposed by the present invention to make scheduling decisions with overhead awareness, minimizing the impact of these inherent costs.

[0092] Among the various monitored indicators, three are particularly important for assessing system performance and guiding dynamic adjustments: Average Task Execution Time (ATET).

[0093]

[0094] Where, the total number of successfully completed tasks within the statistical interval, denotes the task the time at which the computation is completed (the last off-chip writeback), the task the time at which the task first obtains GPU computational resources and begins execution.

[0095] ATET can be used to measure the responsiveness and efficiency of the system in handling tasks. By tracking the average time required for a task to go from start to completion, the priority-based multi-preemption scheduling framework proposed by the present invention can identify potential bottlenecks or resource contention issues. The higher the ATET, the longer the task completion time, indicating a need for adjustments in resource allocation or priority distribution.

[0096] Energy Efficiency Ratio (EER).

[0097]

[0098] where, represents the total energy consumed by the GPU, represents the number of pulses processed by the GPU for task in time slot .

[0099] EER is a key indicator of system energy efficiency and an important consideration for GPU-based SNN simulation. By calculating the ratio of total pulses processed to total energy consumed, the priority-based multi-preemption scheduling framework proposed by the present invention can evaluate its efficiency in utilizing available resources. The higher the EER, the more pulses the system processes per unit of energy consumed, indicating a more effective resource allocation strategy.

[0100] Average Waiting Time (AWT).

[0101]

[0102] where, represents the time at which task arrives in the scheduling queue.

[0103] AWT measures the average time a task waits in the queue before starting execution. This metric is crucial for evaluating the system's ability to handle high-priority or deadline-sensitive tasks. The lower the AWT, the faster the planning and execution of tasks, minimizing the risk of missing critical deadlines.

[0104] These metrics, along with other metrics such as GPU utilization and throughput, form the basis of the dynamic adaptation mechanism of the priority-based multi-preemption scheduling framework proposed by the present invention. The performance monitor continuously collects and analyzes these metrics and compares them with predefined target values or thresholds. Once significant deviations are detected, the monitor triggers a feedback control loop to adjust key system parameters, bringing performance back to the desired state. The feedback control loop operates by modifying several key parameters that affect scheduling decisions and resource allocation: Priority weights ( ): As shown in Equation 9, these weights determine the relative importance of factors such as deadline urgency, workload intensity, and energy consumption in priority calculation. By dynamically adjusting these weights based on observed metrics, the priority-based multi-preemption scheduling framework proposed by the present invention can adjust its scheduling strategy to prioritize the most critical aspects of performance at any given time.

[0105] Time slice limits ( ): As shown in Equation 15, the minimum and maximum time slice duration control the granularity of scheduling decisions and the frequency of context switches. If the monitor detects that the context switch overhead is too large or resource utilization is insufficient, these bounds can be adjusted to find a better balance between responsiveness and efficiency.

[0106] Resource coupling parameters (RCPs) ): As shown in Equation 3, these parameters reflect the interdependence between different resource types and constrain the resource allocation process. By dynamically adjusting these parameters based on observed resource utilization patterns, the priority-based multi-preemption scheduling framework proposed by the present invention can adapt to the specific characteristics of workloads and underlying hardware, ensuring more efficient utilization of available resources.

[0107] Further, to support the efficient operation of these architectural components, the priority-based multi-preemption scheduling framework proposed by the present invention maintains a set of carefully designed data structures, containing the following three parts: Content 1: Priority queue as a dynamic sorting system, constantly updating the task order according to the calculated priority. In this way, the scheduler can quickly identify and schedule the most urgent tasks, ensuring timely completion of tasks and minimizing missed deadlines.

[0108] Content 2: State diagram comprehensively records the running state of each task, capturing important details such as membrane potential, pulse history, and progress indicators. When the system adapts to changing priorities and resource availability, this information is crucial for achieving seamless preemption and recovery of tasks.

[0109] Content 3: Overhead log details the costs related to context switching and inter-task communication, providing valuable information for the priority calculation module and resource allocator, helping them make cost-aware decisions.

[0110] To fully demonstrate the effectiveness of the priority-based multi-preemption scheduling framework proposed by the present invention in coordinating multiple SNN tasks based on LIF neuron models on GPUs, the present invention evaluates its performance through simulation experiments and numerical analysis. The present invention designs three different workloads, aiming to simulate various arrival patterns and complexity characteristics, to evaluate the performance of the priority-based multi-preemption scheduling framework proposed by the present invention under various conditions: Type 1 (Poisson arrival): Contains LIF neuron model tasks with increasing complexity (number of neurons 300-1050, step size 150), with task arrival intervals following a Poisson distribution, used to test the ability of the priority-based multi-preemption scheduling framework proposed by the present invention to handle random burst tasks.

[0111] Type 2 (bursty arrivals): The task composition of Type 2 is identical to Type 1 in terms of complexity ratio and neuron count. However, the task arrivals are concentrated in bursts, with short periods of high arrival rates followed by relatively idle periods. This type simulates the concentrated influx of tasks in real-world scenarios, evaluating the stability of the system when resource demands fluctuate drastically.

[0112] Type 3 (mixed arrivals): To simulate a more diverse environment, Type 3 combines Poisson, bursty, and uniform arrival patterns. The task complexity and neuron count remain consistent with previous workload types. This mixed arrival distribution places additional stress on the scheduling algorithm, testing its robustness in dynamically adjusting resource allocation and priorities when faced with interleaved random, bursty, and steady influxes.

[0113] Experiments were completed on a 4-node GPU cluster with key configurations Figure 2 .

[0114] All tasks were based on the LIF neuron model from the open-source SpicyJelly library, with each neuron group tracking membrane potential, spike events, and total spikes. The GPU simulation routine updated membrane states and triggered spikes based on LIF neuron model dynamics. The performance of the proposed priority-based multi-preemption scheduling framework was evaluated against baseline schedulers using five metrics (throughput, energy efficiency, resource utilization, task completion time, and waiting time). The effects of load levels, complexity sensitivity, and time slice length were also studied. Experiments controlled for system variables (neuron count: 300-1050, complexity ratio: 0.3-0.7) to isolate the impact of each factor on scheduler performance, allowing for conclusions about the relative merits of different operating conditions.

[0115] The proposed priority-based multi-preemption scheduling framework was compared to five scheduling algorithms: dynamic binning scheduling (Gandiva), earliest deadline first (EDF), shortest remaining time first (SRTF), spatial reuse scheduling (Salus), and basic preemptive scheduling (Preemptive). These algorithms use different strategies, from task binning to deadline-driven approaches, providing a multi-faceted evaluation of the comprehensive performance of the proposed priority-based multi-preemption scheduling framework in heterogeneous computing environments.

[0116] Figure 3Figures showing the throughput comparison of various scheduling methods with different numbers of neurons under three arrival patterns, where the number of neurons increases by 150 units while the complexity ratio remains at 0.4. The priority-based multi-preemption scheduling framework proposed in the present application has a clear advantage in all three arrival patterns. When the number of neurons is 300, its throughput is about 5% to 8% higher than Gandiva and EDF, and it outperforms SRTF or Preemptive by a larger margin. As the number of neurons increases, the adaptive time slice of MPL helps to maintain stable throughput, while the throughput of other baseline methods decreases significantly. This pattern remains consistent in Poisson, burst, and mixed arrivals. The results show that the overhead-aware mechanism of MPL reduces contention and maintains concurrency, and the performance of MPL is improved by 10%-15% compared to methods that rely on simpler or more strict scheduling decisions.

[0117] Figure 4 Figures showing the energy efficiency comparison of various scheduling methods with different numbers of neurons under three arrival patterns, showing how the energy efficiency of each scheduler changes as the number of neurons increases when the complexity ratio is 0.4. In Poisson, burst, and mixed scenarios, MPL has the highest energy efficiency. In the Poisson arrival scenario, when the number of neurons is 300, the energy efficiency of MPL is about 10% to 20% higher than Gandiva and EDF, and it continues to maintain a leading advantage as the scale expands. In the burst arrival scenario, the overhead-aware mechanism of MPL helps to avoid idle periods after bursts, resulting in better energy utilization. In the mixed arrival scenario, MPL continues to maintain a clear gap with other scheduling methods, but the efficiency decreases under heavy load. The energy efficiency of Preemptive is always at the bottom, as repeated context switching leads to greater energy consumption overhead. The adaptive reallocation and dynamic priority of MPL prevent underutilization of resources and limit wasteful operations, so it always maintains an advantage.

[0118] Figure 5 Figures showing the GPU utilization comparison of various scheduling methods with different numbers of neurons under three arrival patterns. As the number of neurons increases from 300 to 1050, the priority-based multi-preemption scheduling framework proposed in the present application achieves high utilization, typically above 0.95. MPL can adaptively adjust resource allocation based on workload intensity, avoiding idle gaps and maintaining full participation of the GPU during task surges. SRTF and Gandiva occasionally approach full utilization, but cannot continue to maintain it when arrival patterns fluctuate. Preemptive is usually below 0.65, as frequent context switching reduces active processing time. The dynamic priority mechanism and overhead-aware design of MPL help to stabilize utilization, keeping GPU utilization near peak capacity.

[0119] Figure 6 、 7 , 8 are the completion time and waiting time statistics of each scheduling method under three arrival patterns with different numbers of neurons. As shown in the table, the completion time of the priority-based multi-preemption scheduling framework proposed in the application is always shorter than Gandiva or EDF, especially when there are more than 600 neurons. This advantage comes from the overhead-aware mechanism of MPL, which can quickly transfer resources from lower priority tasks to handle higher priority tasks. However, in the case of burst or mixed arrival, these priority-oriented allocations may slightly increase the waiting time, as medium priority tasks may be temporarily suspended when the load surges. Even so, MPL is superior to the simple preemption method in both indicators, which shows that its adaptive scheduling strategy has found a good balance between timely execution and stable queue length.

[0120] Figure 9 and Figure 10 Records the changes of throughput and energy efficiency of each scheduling method under three arrival patterns when the complexity ratio increases from 0.3 to 0.7. In all three arrival patterns, the priority-based multi-preemption scheduling framework proposed in the application maintains a clear advantage in both indicators. In the case of Poisson arrival, the overhead-aware scheduling of MPL can flexibly redistribute GPU resources and pre-allocate GPU resources to different applications. Even for low-complexity tasks, MPL can maintain a high throughput. When facing burst arrival, frequent pulses do not affect the performance of MPL: its adaptive preemption can quickly handle large tasks without starving small tasks, thus maintaining higher efficiency than the baseline method when the complexity ratio exceeds 0.5. Finally, in the mixed arrival scenario, the priority-based multi-preemption scheduling framework proposed in the application can still maintain balanced improvement in throughput and energy efficiency, highlighting its adaptability to variable task arrival patterns. These results confirm that MPL can effectively alleviate the performance degradation caused by the increase in workload complexity, regardless of the complexity of the underlying task arrival pattern.

[0121] Figure 11GPU utilization table for each scheduling method at three representative complexity ratios under three arrival patterns. In all arrival patterns, MPL, SRTF, and Gandiva approach full utilization at 0.3, but SRTF tends to drop under burst arrival due to task contention. When complexity exceeds 0.5, Gandiva and Salus begin to show more idle time, while Preemptive is far below 0.50 due to excessive switching leading to execution fragmentation. In contrast, MPL maintains high utilization by adaptively prioritizing tasks with higher computational requirements. This approach keeps the GPU running even as the workload shifts to higher complexity levels.

[0122] Figure 12 Resource usage statistics chart for each scheduling method at different time slices under three arrival patterns. In this experiment, the complexity ratio is kept at 0.4 and the number of neurons is fixed at 450 under three arrival patterns. Under Poisson, burst, and mixed arrival, the proposed priority-based multi-preemption scheduling framework approaches saturation at all time slices. Its overhead-aware design helps avoid GPU idleness, even at larger time slices, which might otherwise lead to longer latencies. Other schedulers can also achieve acceptable utilization at smaller time slices, but their utilization drops sharply as time slices increase, partly because they cannot quickly adapt to changing workloads.

[0123] Figure 13 Influence of time slice length on switching overhead and latency chart. Longer time slices generally result in lower overhead, and the proposed priority-based multi-preemption scheduling framework shows the most significant reduction in overhead. For example, under Poisson arrival, MPL's overhead drops to about 0.31 when the time slice is 10, while Preemptive's overhead climbs above 4.5. This difference stems from MPL's ability to dynamically reclaim resources and minimize unnecessary switching. Gandiva and SRTF also reduce overhead as time slices increase, but not as quickly as MPL. Latency trends similarly: MPL consistently maintains shorter queues across time slices from 1 to 10, while Preemptive and EDF show more significant growth. Under burst arrival, MPL's latency stabilizes at around 25 milliseconds when the time slice is 4, lower than Preemptive's 31 milliseconds and EDF or SRTF's 27-28 milliseconds. These results highlight MPL's ability to balance system responsiveness and resource usage efficiency even at low-frequency time slicing. Overall, MPL consistently outperforms baseline methods by achieving a better trade-off between reducing switching frequency and avoiding long task delays.

[0124] The above merely provides the preferred embodiment of the present application, and cannot allude the protection scope of the present application, therefore, any equivalent changes made according to the claims of the present application shall be within the scope of the present application.

Claims

1. A dynamic priority based heterogeneous spiking neural network task scheduling method on GPU, characterized in that, The method comprises the following steps: S1: calculating the gradient of the objective function at time t, and obtaining resource allocation and scheduling indicators under the gradient condition; S2: using three adjustable weights to control the balance between deadline urgency, remaining workload and energy consumption to calculate dynamic priority; S3: combining priority-based decision-making with gradient-guided resource allocation, in each time slot, the algorithm first calculates task priority, and then allocates resources according to the task priority; S4: using an adaptive time slicing method, adjusting the size of the time slice according to the theoretical limit and actual demand, and the adaptive time slice monotonically decreases with the relaxation ratio.

2. The dynamic priority based heterogeneous on-GPU impulse neural network task scheduling method according to claim 1, characterized in that, The gradient condition includes: priority calculation must balance resource constraints and coupling constraints; in a feasible case, resource allocation follows the gradient direction; the overhead brought by state change is explicitly calculated.

3. The dynamic priority based heterogeneous on-GPU impulse neural network task scheduling method according to claim 1, characterized in that, The method of resource allocation in S3 includes: S31: initial allocation according to task priority; S32: under the premise of coupling constraints, improve allocation by gradient ascent; and use a parallel method for different resource types to realize the improvement step, the calculation process includes: initial allocation according to priority; initial allocation according to priority; parallel improvement according to gradient.

4. The dynamic priority based heterogeneous on-GPU impulse neural network task scheduling method according to claim 1, characterized in that, S4 also includes reducing the total scheduling overhead using a scheduling overhead ratio.

5. The dynamic priority based heterogeneous on-GPU impulse neural network task scheduling method according to any one of claims 1-4, characterized in that, S4 also includes using a state management routine including the following methods for adaptive time slicing: Save membrane potential and pulse history during preemption; Track task progress and update relaxation ratio; Monitor switching overhead to provide feedback.

6. A system for dynamic priority based heterogeneous on-GPU impulse neural network task scheduling method according to any one of claims 1-5, characterized in that, It includes a task manager, a priority calculation module, a resource allocator, and a performance monitor. The task manager is used to process new tasks and monitor their progress during the task life cycle. The priority calculation module is used to dynamically evaluate the priority of each task, taking into account factors such as deadline urgency, remaining workload and energy consumption, and the calculated priority score will be the core basis for subsequent resource allocation and scheduling decisions. The resource allocator is used to optimize the allocation of available GPU resources among active tasks in two stages according to the priority calculated by the priority calculation module: in the initial stage, the resource allocator first uses a proportional allocation scheme; in the second stage, the initial allocation is repeatedly improved to achieve a globally optimal allocation. The performance monitor is used to track performance indicators to ensure the effectiveness of scheduling decisions and resource allocation, including average task execution time, energy efficiency ratio, average waiting time, GPU utilization and throughput.

7. The system of claim 6, wherein, The performance monitor also includes recording the overhead generated during context switching and inter-task communication.