betaFeedback

WorksComputer Science

Hard and Soft Real-Time DNN Inference Scheduling on Heterogeneous Multi-Accelerator Systems via Reinforcement Learning

Abstract

We present a scheduling framework for heterogeneous multi-accelerator systems executing both hard real-time and soft real-time QoS-aware DNN inference workloads. The framework combines an online reinforcement learning (RL) scheduler with a deterministic runtime safety layer. The RL scheduler dynamically generates candidate schedules by jointly selecting sub-job priorities and accelerator assignments, while runtime certification guarantees that all HRT deadlines remain satisfied independently of the learned policy. To enable runtime certification in heterogeneous precedence-constrained systems, we introduce a schedulability-preserving prefix replacement criterion based on machine-wise cuts. The proposed criterion guarantees that runtime-generated schedule prefixes preserve the existence of a feasible continuation without requiring complete finish-time dominance with respect to a feasible reference schedule. Experimental results on heterogeneous DNN accelerator platforms show that the proposed framework preserves HRT schedulability while improving QoS-aware deadline satisfaction, client-level service quality, and accelerator utilization compared to state-of-the-art scheduling approaches.

Introduction

Deep Neural Network (DNN) inference is increasingly used in safety-critical cyber-physical systems such as autonomous vehicles, robotics, industrial automation, and edge AI infrastructures [2, 29]. These systems often execute mixed workloads on heterogeneous multi-accelerator platforms, where hard real-time (HRT) inference tasks coexist with soft real-time (SRT) requests generated by multiple clients [36, 40, 25].

Scheduling such workloads is challenging because DNN inference induces precedence-constrained execution graphs, accelerator heterogeneity couples allocation and priority decisions, and SRT requests arrive dynamically at runtime [30, 22]. At the same time, HRT tasks must always satisfy their deadlines under worst-case execution assumptions.

Existing real-time scheduling approaches can provide timing guarantees, but are often based on static schedules that poorly adapt to runtime variability [20, 12]. Conversely, adaptive online schedulers and multi-tenant inference systems improve utilization and responsiveness, but generally lack strict HRT guarantees [10, 6]. Reinforcement Learning (RL) is attractive for online scheduling because it can learn workload-dependent policies without handcrafted heuristics [31], and this is the reason why it is employed in this work, but learned policies alone cannot be trusted for safety-critical scheduling.

This paper presents a scheduling framework for heterogeneous multi-accelerator systems that combines adaptive online scheduling with strict HRT guarantees. The framework separates optimization from safety. An RL-based online scheduler dynamically generates candidate schedule prefixes2 by jointly selecting accelerator assignments and execution priorities, while a deterministic runtime safety layer validates each candidate before execution.

To enable runtime certification in heterogeneous precedence-constrained systems, we introduce a schedulability-preserving prefix replacement criterion based on machine-wise cuts, inspired by transfer schedulability [38]. The proposed criterion guarantees that runtime-generated schedule prefixes preserve the existence of a feasible continuation without requiring complete finish-time dominance with respect to a feasible reference schedule.

Experimental results on heterogeneous DNN accelerator platforms show that the proposed framework preserves HRT schedulability while improving SRT deadline satisfaction, client-level QoS, and accelerator utilization compared to state-of-the-art scheduling approaches.

The main contributions of this paper are:

  • A formulation of mixed hard/soft real-time DNN inference scheduling on heterogeneous multi-accelerator systems using a DAG-based task model.

  • A schedulability-preserving runtime certification mechanism for heterogeneous precedence-constrained schedules.

  • An RL-based online scheduler for joint accelerator allocation and execution priority assignment within a deterministic HRT safety envelope. Our open-source implementation is available at: https://github.com/BlancoFrancescoGiulio/retnas.

  • Formal proofs showing that runtime certification preserves HRT schedulability independently of the employed policy (e.g., RL).

SymbolDescriptionSymbolDescription
M\mathcal{M}, MMSet and number of processors/sub-acceleratorsJjSJ_j^{\mathrm{S}}SRT DAG job jj
Mv\mathcal{M}_vProcessors eligible for sub-job vvajSa_j^{\mathrm{S}}, djSd_j^{\mathrm{S}}Arrival time and soft deadline of JjSJ_j^{\mathrm{S}}
Cv,mC_{v,m}WCET of sub-job vv on processor mmκj\kappa_jClient generating JjSJ_j^{\mathrm{S}}
svs_v, fvf_vStart and finish time of sub-job vvK\mathcal{K}Set of clients
fJf_JCompletion time of DAG job JJHSH^{\mathrm{S}}System-level SRT deadline-hit ratio
GJ=(VJ,EJ)G_J = (V_J,E_J)DAG representation of job JJHkSH_k^{\mathrm{S}}Client-level SLO achievement rate
VJV_J, EJE_JSub-jobs and precedence constraints of JJH^kS\hat{H}_k^{\mathrm{S}}Target SLO achievement rate of client kk
TH\mathcal{T}^{\mathrm{H}}Set of HRT tasksRJjSR_{J_j^{\mathrm{S}}}Response time of SRT job JjSJ_j^{\mathrm{S}}
τi=(Gi,Di,Ti)\tau_i = (G_i,D_i,T_i)HRT task iiSrefS^{\mathrm{ref}}Offline feasible WCET reference schedule
Ji,kHJ_{i,k}^{\mathrm{H}}kk-th HRT DAG job of τi\tau_iScandS^{\mathrm{cand}}Online candidate schedule
ai,kHa_{i,k}^{\mathrm{H}}, di,kHd_{i,k}^{\mathrm{H}}Release time and deadline of Ji,kHJ_{i,k}^{\mathrm{H}}TST_SRuntime scheduler activation period
τsch\tau_{\mathrm{sch}}Upper bound on runtime scheduling overhead

Table 1. Summary of notation

  • An experimental evaluation demonstrating improved SRT QoS and accelerator utilization while preserving HRT correctness.

System and Scheduling Model

We consider the problem of scheduling periodic hard real-time (HRT) tasks together with aperiodic soft real-time (SRT) jobs on a heterogeneous processing platform. The model follows standard real-time scheduling terminology and DAG-based task models [7, 4, 13, 35, 5].

Platform and DAG Job Model

The platform consists of a finite set of machines (processors or sub-accelerators), M={1,…,M}\mathcal{M} = \{1, \ldots, M\}. The platform is heterogeneous: the execution time of a computation depends on both the computation and the processor on which it executes. Thus, processors are modeled as unrelated machines.

Computations are represented as DAG jobs. A DAG job JJ is described by GJ=(VJ,EJ)G_J = (V_J,E_J), where each vertex u∈VJu \in V_J is a sequential computation, called a sub-job, and each edge (u,v)∈EJ(u,v) \in E_J is a precedence constraint. A sub-job $u is called a terminal sub-job if it has no successors, i.e., ∄v∈VJ:(u,v)∈EJ\nexists v \in V_J : (u,v) \in E_J. If sub-job uu starts at time sus_u and finishes at time fuf_u, then (u,v)∈EJ(u,v) \in E_J implies sv≥fus_v \ge f_u. The completion time of job JJ is fJ=max⁡u∈VJfuf_J = \max_{u \in V_J} f_u. For each sub-job uu, let Mu⊆M\mathcal{M}_u \subseteq\mathcal{M} denote the set of processors on which uu is eligible to execute. For each eligible processor m∈Mum \in\mathcal{M}_u, Cu,mC_{u,m} denotes the worst-case execution time (WCET) of uu on mm; for m∉Mum \notin\mathcal{M}_u, we set Cu,m=∞C_{u,m} = \infty. If uu is assigned to processor mum_u, then under worst-case execution fu=su+Cu,muf_u = s_u + C_{u,m_u}.

Communication and data-movement assumptions. Prior real-time DNN scheduling approaches explicitly model fine-grained data-movement effects, including cross-processor communication, CPU/GPU data transfers, and layer-level pipelining or migration [24, 16, 39]. In this work, we incorporate data-movement costs into the profiled execution-time bounds Cu,mC_{u,m}. In particular, for HRT sub-jobs, Cu,mC_{u,m} conservatively accounts for the activation write-back and read costs required for the execution of sub-job uu on accelerator mm.

The runtime scheduler, instead, can exploit locality when two layers with a data dependency or two instances of the same layer execute sequentially on the same accelerator, by reusing locally available activations or weights. However, the HRT reference schedule construction and the runtime certification described in § 3.1 and § 3.3 do not rely on such reuse. Indeed, after a runtime prefix replacement, another HRT or SRT sub-job may execute between two consecutive layers, or the successor may be assigned to a different accelerator, invalidating assumptions on local data availability.

Hard and Soft Real-Time Workloads

The HRT workload is a finite set of periodic DAG tasks TH={τ1,…,τn}\mathcal{T}^{H} = \{\tau_1, \ldots, \tau_n\}. Each task is described by τi=(Gi,Di,Ti)\tau_i = (G_i, D_i, T_i), where Gi=(Vi,Ei)G_i = (V_i, E_i) is its DAG, DiD_i is its relative deadline, and TiT_i is its period. We consider constrained-deadline tasks, i.e., Di≤TiD_i \le T_i.

The kk-th release of task τi\tau_i generates an HRT DAG job Ji,kHJ^{H}_{i,k} at time ai,k=ai,0+kTia_{i,k} = a_{i,0} + kT_i, with absolute deadline di,kH=ai,k+Did^{H}_{i,k} = a_{i,k} + D_i. An HRT job meets its deadline iff fJi,kH≤di,kHf_{J^{H}_{i,k}} \le d^{H}_{i,k}. The HRT requirement is that every generated job of every admitted HRT task meets its deadline.

The SRT workload consists of aperiodic DAG jobs arriving online. Each SRT job is modeled as JjS=(Gj,aj,djS,κj)J^{S}_{j} = (G_j, a_j, d^{S}_j, \kappa_j), where Gj=(Vj,Ej)G_j = (V_j, E_j) is its DAG, aja_j is its arrival time, djSd^{S}_j is its soft absolute deadline, and κj∈K\kappa_j \in\mathcal{K} identifies the client that generated the request. Unlike HRT tasks, SRT jobs are not known during admission control and no minimum inter-arrival time is assumed.

For SRT jobs, deadline misses do not compromise correctness, but degrade QoS. If fJjS>djSf_{J^{S}_j} > d^{S}_j, the request misses its soft deadline. SRT jobs may therefore be delayed, canceled, or rejected whenever necessary to preserve the HRT guarantee. For a set JS\mathcal{J}^{S} of requested SRT jobs, the system-level soft-deadline hit ratio is

HS=∣{JjS∈JS∣fJjS≤djS}∣∣JS∣.H^{S} = \frac{\left|\left\{J^{S}_j \in\mathcal{J}^{S} \mid f_{J^{S}_j} \le d^{S}_j\right\}\right|}{\left|\mathcal{J}^{S}\right|}.

The response time of an SRT job is RjS=fjS−ajR^{S}_{j}=f^{S}_{j}-a_{j}.

Client-Level QoS and Fairness

The system-level hit ratio HSH^{S} is an average system-level QoS metric and may hide severe client-level QoS degradation; as observed in real-time systems, averages offer no guarantees [1]. For example, one client may experience a high deadline-hit ratio while another receives very poor service, even though HSH^{S} remains acceptable.

We therefore define client-level Service-Level Objective (SLO) achievement rates, which represent client-level QoS metrics. Let JkS={JjS∈JS∣κj=k}\mathcal{J}^{S}_{k}=\{J^{S}_{j}\in\mathcal{J}^{S}\mid\kappa_{j}=k\} be the set of SRT jobs requested by client k∈Kk\in\mathcal{K}. The SLO achievement rate of client kk is

HkS=∣{JjS∈JkS∣fjS≤djS}∣∣JkS∣.H^{S}_{k}=\frac{\left|\{J^{S}_{j}\in\mathcal{J}^{S}_{k}\mid f^{S}_{j}\le d^{S}_{j}\}\right|}{|\mathcal{J}^{S}_{k}|}.

Each client may specify a target SLO achievement rate H^kS\widehat{H}^{S}_{k}. The scheduler should therefore improve not only the system-level SRT hit ratio, but also the client-level satisfaction with respect to these targets. A compact client-oriented QoS objective is to maximize

min⁡k∈K(HkS−H^kS),\min_{k\in\mathcal{K}}\left(H^{S}_{k}-\widehat{H}^{S}_{k}\right),

subject to preserving all HRT deadlines. In cloud-oriented deployments, a client may correspond to a service tenant; in edge and cyber-physical deployments, a client may correspond to, e.g., a robot, device, sensor stream, or independent inference pipeline.

Scheduling Model and Objective

As in standard multiprocessor scheduling, scheduling consists of two coupled problems [13]: an allocation problem, which decides on which processor a computation executes, and a priority problem, which decides when and in what order ready computations execute. In system-architecture terminology, this corresponds to space-time scheduling: the spatial decision is processor assignment, while the temporal decision is execution ordering.

The scheduler operates at sub-job granularity and uses dynamic priorities to decide the execution ordering. The priority of a ready sub-job may change over time as a function of deadlines, laxities, processor availability, queue state, graph progress, and online scheduling decisions. HRT sub-jobs execute non-preemptively. If an executing SRT sub-job must be interrupted to preserve HRT correctness, its partial execution is discarded and any later execution is treated as a new dispatch. We model this event as cancellation rather than preemption with resumption, which reflects accelerator architectures where saving and restoring the internal execution state may be unsupported or prohibitively expensive.

A schedule assigns each ready sub-job uu to a processor mum_{u} and to an execution interval [su,fu)[s_{u},f_{u}). A schedule is valid if it satisfies: (i) eligibility, mu∈Mum_{u}\in\mathcal{M}_{u} for every executed sub-job uu; (ii) processor exclusivity, no processor executes more than one sub-job at any time; (iii) nonparallel execution, no sub-job executes on more than one processor at any time; and (iv) precedence preservation, (u,v)∈EJ(u,v) \in E_J implies sv≥fus_v \ge f_u.

The scheduling objective is lexicographic. First, all admitted HRT jobs must meet their deadlines under all admissible runtime executions. Second, subject to this hard constraint, the scheduler should improve SRT responsiveness, soft-deadline hit ratios, client-level SLO satisfaction, and accelerator utilization by reducing idle intervals across heterogeneous accelerator resources.

Framework Overview

The proposed framework combines adaptive online scheduling with strict hard real-time (HRT) guarantees for heterogeneous multi-accelerator systems executing both HRT and soft real-time (SRT) DNN inference workloads.

The key idea is to separate safety from performance optimization. Runtime performance is optimized by an online scheduler, while HRT correctness is enforced independently through a deterministic runtime certification mechanism.

Figure 1 illustrates the overall framework. Offline, the system constructs a feasible HRT-only reference schedule under worst-case execution assumptions. At runtime, an online scheduling policy observes the current system state and generates candidate schedule prefixes that jointly schedule HRT and SRT sub-jobs. Before execution, each candidate prefix is validated by a runtime safety check. If the prefix is certified safe, it is executed; otherwise, execution falls back to the corresponding portion of the certified HRT reference schedule. As a consequence, HRT correctness does not depend on the online scheduler itself. The scheduler may improve SRT responsiveness, fairness, and accelerator utilization, but unsafe runtime decisions are filtered by the safety layer before execution.

Figure 1. Framework overview.

Although this work employs a reinforcement learning (RL) scheduler, the framework itself is policy-agnostic. Any online scheduling policy capable of generating runtime candidate schedules can be enclosed within the same safety envelope.

Reference Schedule and Admission Control

Hard real-time correctness is derived from a feasible offline reference schedule constructed considering only the admitted HRT workload. During system initialization, the framework computes a WCET-based HRT-only schedule SrefS^{\mathrm{ref}} over a finite analysis horizon. For periodic tasks, the natural horizon is the hyperperiod H=lcm⁡(T1,…,Tn)H = \operatorname{lcm}(T_1,\ldots,T_n).

For each HRT sub-job uu, the reference schedule records its processor assignment and execution interval (suref,furef,muref)(s_u^{\mathrm{ref}}, f_u^{\mathrm{ref}}, m_u^{\mathrm{ref}}). The reference schedule is feasible if all HRT jobs meet their deadlines: fJ,kref≤dJ,kHf_{J,k}^{\mathrm{ref}} \le d_{J,k}^{H} ∀J,k\forall J,k. At runtime, additional HRT tasks may request admission into the system. When a new HRT task is submitted, the framework performs admission control by attempting to construct a new feasible HRT-only reference schedule including both the already admitted HRT tasks and the new candidate task. If such a feasible schedule exists, the task is admitted and the newly generated schedule replaces the previous reference schedule. Otherwise, the task is rejected. A reference schedule is constructed offline, hence, its construction complexity does not affect runtime scheduling, and the framework is independent of the construction method. SRT clients are not admitted through the HRT feasibility test; a SRT client only registers its target SLO achievement rate. To improve the availability of contiguous slack regions, the reference schedule may optionally be transformed through a uniform forward shift of HRT executions while preserving all deadlines, so that at least one sub-job starts at its latest start time (LST).

Runtime Scheduling

The online scheduler is activated periodically with period TST_S. At activation time tk=kTSt_k = kT_S, the scheduler observes the current runtime state, including ready HRT and SRT sub-jobs, processor availability, queue occupancy, graph progress, and remaining execution tails inherited from previous scheduler windows.

In heterogeneous DNN inference systems, allocation and priority decisions [13] are tightly coupled because execution times depend on the selected accelerator.

Based on the observed runtime state, the scheduler generates a candidate schedule prefix for a bounded future interval. Unlike the offline reference schedule, the runtime scheduler is fully adaptive and may execute HRT sub-jobs earlier than in the reference schedule, dynamically reorder HRT and SRT work, select different eligible accelerators, leave processors temporarily idle, or opportunistically exploit runtime slack for SRT execution.

The scheduler activation period TST_S determines the tradeoff between runtime adaptability and scheduling overhead. Smaller activation periods improve responsiveness to newly arrived SRT jobs but increase runtime scheduler overhead.

Let τsch\tau_{\mathrm{sch}} denote an upper bound on the total runtime overhead including schedule generation, runtime certification, dispatching, and cancellation handling. This overhead is included in the certified timing model.

Runtime Safety Certification

The online scheduler is not trusted for HRT correctness. Consequently, every runtime-generated candidate prefix must be validated before execution.

A natural solution would be to directly test whether a candidate prefix preserves future HRT schedulability. However, exact runtime feasibility analysis is computationally impractical for heterogeneous DAG-based systems with precedence constraints and non-preemptive execution. Instead, the framework employs a bounded-time sufficient acceptance test derived from the offline reference schedule. Intuitively, the runtime certification mechanism verifies whether the candidate prefix preserves enough certified progress to guarantee that all unfinished HRT work can still complete feasibly after the checked cut.

If the candidate prefix is certified safe, execution proceeds according to the online schedule. Otherwise, execution falls back to the corresponding portion of the offline HRT reference schedule and all SRT work contained in the rejected prefix is discarded. The acceptance test therefore acts as a deterministic safety envelope surrounding the online scheduler. Unsafe runtime decisions may reduce performance, but they cannot compromise HRT correctness.

Section 4 formalizes the runtime certification mechanism through the notion of schedulability-preserving prefix replacement.

Runtime Safety Certification

This section formalizes the runtime certification mechanism used to guarantee hard real-time correctness independently of the online scheduler.

We first recall the intuition behind transfer schedulability on uniprocessors and explain why its classical scalar slack formulation does not directly extend to heterogeneous precedence-constrained systems. We then introduce a schedulability-preserving prefix replacement criterion suitable for heterogeneous multi-accelerator DNN scheduling.

From Transfer Schedulability to Prefix Certification

Transfer schedulability [38] provides a way to preserve schedulability by comparing an online execution with a feasible reference schedule. In its classical uniprocessor form, the online scheduler monitors whether the work that must match the reference schedule has become locally urgent. When a slackless interval is detected, the scheduler must give priority to the corresponding locally urgent work; otherwise, schedulability may no longer be transferable from the reference schedule.

We use this idea only as a design principle. We do not attempt to extend the uniprocessor slackless test directly to heterogeneous multiprocessor DAG scheduling. In our setting, feasibility depends jointly on machine assignment, non-preemptive execution, precedence constraints, and future resource contention across unrelated accelerators. Therefore, a scalar slack quantity is not sufficient to characterize whether the online state can still match a feasible continuation.

To see why, consider even the simpler case of a set J\mathcal{J} of independent, non-preemptive, non-migratory jobs on MM identical processors over an interval of length LL. Let

W=∑J∈JCJW = \sum_{J \in\mathcal{J}} C_J

be the total remaining work, being CJC_J the length of a job JJ. The condition W>MLW > ML proves infeasibility, but the converse is false: W≤MLW \le ML does not imply that the jobs can be packed on the individual processors. For example, with two processors, L=10L = 10, and three jobs of length CJ=6C_J = 6, the total work is W=3CJ=18<20W = 3C_J = 18 < 20, but no feasible assignment exists. The corresponding decision problem contains P∣∣Cmax⁡≤LP||C_{\max} \le L as a special case, which is NP-hard by reduction from Partition.

The setting considered in this paper is strictly more general: processors are unrelated, since a sub-job uu has execution time Cu,mC_{u,m} on machine mm, and HRT jobs are DAGs whose vertices are non-preemptive sub-jobs. Consequently, the runtime safety layer deliberately uses a bounded-time sufficient test. If the test accepts, HRT schedulability is preserved; if it rejects, the system falls back to a certified continuation.

Schedulability-Preserving Prefix Replacement

Let JH\mathcal{J}^{\mathrm{H}} denote the set of generated HRT DAG jobs under consideration, and let

VH=⋃J∈JHVJ\mathcal{V}^{\mathrm{H}} = \bigcup_{J \in\mathcal{J}^{\mathrm{H}}} V_J

be the set of their HRT sub-jobs. Let SrefS^{\mathrm{ref}} be a feasible WCET reference schedule for JH\mathcal{J}^{\mathrm{H}}, and let ScandS^{\mathrm{cand}} be a candidate runtime schedule. For a sub-job uu, we write mS(u)m_S(u), sS(u)s_S(u), and fS(u)f_S(u) for its machine, start time, and finish time in schedule SS.

Definition 1 (Machine-wise cut). A machine-wise cut is a vector

T⋆=(t1,…,tM),T^\star= (t_1, \ldots, t_M),

where tmt_m is a time instant referred to machine mm. We refer to tmt_m as the local cut time on machine mm.

Definition 2 (HRT Schedule Prefix). Given a schedule SS and a machine-wise cut T⋆T^\star, the HRT schedule prefix induced by T⋆T^\star is

PS(T⋆)={u∈VH∣fS(u)≤tmS(u)}.P_S(T^\star) = \{u \in\mathcal{V}^{\mathrm{H}} \mid f_S(u) \le t_{m_S(u)}\}.

That is, the prefix contains all HRT sub-jobs that complete no later than the local cut time of the machine to which they are assigned.

For a job JJ, we denote by

PSJ(T⋆)=PS(T⋆)∩VJP_S^J(T^\star) = P_S(T^\star) \cap V_J

the portion of its HRT sub-jobs belonging to the prefix.

Definition 3 (Clean cut). A machine-wise cut T⋆T^\star is clean for schedule SS if no HRT sub-job crosses the cut on its assigned machine, i.e.,

∄u∈VHs.t.sS(u)<tmS(u)<fS(u).\not\exists u \in\mathcal{V}^{\mathrm{H}} \quad\text{s.t.} \quad s_S(u) < t_{m_S(u)} < f_S(u).

SRT sub-jobs are not part of the HRT correctness argument; if an SRT sub-job crosses any certified cut, it is canceled at the cut and its partial execution is discarded.

Definition 4 (Closed and open HRT jobs). An HRT job JJ is closed in schedule SS at cut T⋆T^\star if

VJ⊆PSJ(T⋆).V_J \subseteq P_S^J(T^\star).

Otherwise, JJ is open at T⋆T^\star.

Definition 5 (Open-interface sub-jobs). For a schedule SS, an HRT sub-job u∈PSJ(T⋆)u \in P_S^J(T^\star) is an open-interface sub-job of job JJ if it has at least one successor of the same job outside the prefix:

∃v∈VJ∖PSJ(T⋆)s.t.(u,v)∈EJ.\exists v \in V_J \setminus P_S^J(T^\star) \quad\text{s.t.} \quad(u,v) \in E_J.

We denote the set of such sub-jobs by ISJ(T⋆)I_S^J(T^\star).

Definition 6 (Safe prefix replacement). Let SrefS^{\mathrm{ref}} be a feasible HRT reference schedule and let ScandS^{\mathrm{cand}} be a valid candidate schedule. We say that ScandS^{\mathrm{cand}} is a safe prefix replacement of SrefS^{\mathrm{ref}} at cut T⋆T^\star if the following conditions hold.

  1. Candidate-prefix validity. The HRT prefix PScand(T⋆)P_{S^{\mathrm{cand}}}(T^\star) satisfies eligibility, machine exclusivity, non-parallel execution, and precedence closure: for every edge (u,v)∈EJ(u,v) \in E_J, if v∈PScandJ(T⋆)v \in P_{S^{\mathrm{cand}}}^J(T^\star), then u∈PScandJ(T⋆)u \in P_{S^{\mathrm{cand}}}^J(T^\star) and fucand≤svcandf_u^{\mathrm{cand}} \le s_v^{\mathrm{cand}}.

  1. Completed terminal HRT sub-jobs are already safe. For every HRT job JJ, every terminal sub-job completed in the candidate prefix finishes no later than the absolute deadline of its job:

∀u∈PScandJ(T⋆),(∄v∈VJ:(u,v)∈EJ)⟹fucand≤dJ.\forall u \in P_{S^{\mathrm{cand}}}^J(T^\star), \quad\left(\not\exists v \in V_J : (u,v) \in E_J\right) \Longrightarrow f_u^{\mathrm{cand}} \le d_J.

Here, a terminal sub-job has no outgoing edge in the complete DAG of its job. This condition applies to both open and closed jobs.

Figure 2. Counterexamples illustrating the necessity of the four conditions in Definition 6 required by Theorem 1. Each panel violates one condition while the remaining conditions are satisfied, showing that omitting any single condition may invalidate the schedulability-preserving prefix replacement guarantee.

  1. Candidate-prefix covers reference-prefix. For every HRT job JJ in SrefS^{ref}, all sub-jobs of JJ that the reference schedule has completed before the cut T⋆T^{\star} are also completed in the candidate prefix:

PSrefJ(T⋆)⊆PScandJ(T⋆).P_{S^{ref}}^{J}(T^{\star}) \subseteq P_{S^{cand}}^{J}(T^{\star}).
  1. No delay of reference-suffix releases. For every HRT job JJ that is open in ScandS^{cand} at T⋆T^{\star}, if a completed sub-job uu has an unfinished successor vv, then uu must complete no later than the start time of vv in the reference schedule. Formally, for every edge (u,v)∈EJ(u,v) \in E_J such that

u∈PScandJ(T⋆)andv∉PScandJ(T⋆),u \in P_{S^{cand}}^{J}(T^{\star}) \qquad\text{and} \qquad v \notin P_{S^{cand}}^{J}(T^{\star}),

we require

fucand≤svref.f_u^{cand} \leq s_v^{ref}.

This prevents a sub-job completed by the candidate prefix from delaying any unfinished successor when execution resumes according to the reference suffix.

Remark. A simpler but more conservative runtime implementation can replace the successor-start comparison above with the stronger sufficient check fucand≤fureff_u^{cand} \leq f_u^{ref} for open-interface sub-jobs, since the validity of the reference schedule implies furef≤svreff_u^{ref} \leq s_v^{ref} for every edge (u,v)(u,v).

Theorem 1 (Schedulability-preserving prefix replacement). Let SrefS^{ref} be a feasible WCET reference schedule for the HRT jobs JHJ^{H}, and let ScandS^{cand} be a candidate schedule. Assume that T⋆T^{\star} is clean for both SrefS^{ref} and ScandS^{cand}. If ScandS^{cand} is a safe prefix replacement of SrefS^{ref} at T⋆T^{\star}, then replacing the HRT prefix of SrefS^{ref} with the HRT prefix of ScandS^{cand} preserves HRT schedulability.

Proof. Keep the candidate prefix and execute every remaining HRT sub-job in its reference interval on its reference machine, skipping all sub-jobs already completed in the candidate prefix.

By Condition 3, every remaining sub-job lies outside the reference prefix. Since T∗T^* is clean for SrefS^{\mathrm{ref}}, its reference execution starts no earlier than the local cut on its reference machine. On each machine, candidate-prefix executions finish no later than the local cut, so they cannot overlap the retained reference executions. Together with Condition 1 and reference validity, this preserves eligibility, machine exclusivity, and non-parallel execution.

Precedence constraints within the candidate prefix hold by Condition 1, while those between remaining sub-jobs hold because their reference intervals are unchanged. For an edge (u,v)(u,v) from the candidate prefix to a remaining sub-job, Condition 4 ensures fucand≤svreff_u^{\mathrm{cand}} \le s_v^{\mathrm{ref}}. Conversely, an edge from a remaining sub-job into the candidate prefix is excluded by the precedence closure in Condition 1. Thus all precedence constraints are preserved.

Finally, consider any HRT job JJ. Every terminal sub-job in its candidate prefix meets dJd_J by Condition 2, whether JJ is open or closed. Every remaining terminal sub-job meets dJd_J because it executes in its feasible reference interval. Since every non-terminal vertex of a finite DAG has a path to a terminal vertex, precedence preservation implies that all sub-jobs of JJ finish by dJd_J. Hence all HRT jobs meet their deadlines.

Online Scheduler

This section describes how the proposed framework applies the schedulability-preserving prefix replacement theory of § 4 at runtime.

The framework employs an online scheduler that periodically generates candidate schedule prefixes for the currently available HRT and SRT sub-jobs. The scheduler itself is not trusted for hard real-time correctness. Consequently, every runtime-generated candidate prefix is validated through the runtime certification mechanism derived from Theorem 1 before execution.

If the candidate prefix satisfies the certification conditions, it is committed for execution. Otherwise, the system falls back to the corresponding portion of the certified HRT reference schedule and any SRT work contained in the rejected prefix is discarded.

Although the framework is scheduler-agnostic, this work employs a reinforcement learning (RL)-based scheduler that jointly optimizes accelerator assignment and execution ordering to improve SRT QoS and accelerator utilization while remaining enclosed within the deterministic HRT safety envelope.

§ 5.1 describes the runtime HRT certification mechanism, § 5.2 briefly reviews the RL background used in this work, and § 5.3 presents the proposed RL scheduler policy.

Runtime HRT Certification

The runtime safety layer certifies finite HRT prefixes against the WCET reference schedule. Let Sref,∞S^{\mathrm{ref},\infty} denote the infinite periodic extension of the feasible reference schedule. All comparisons below are made on absolute time in this infinite extension; the modulo-HH representation is used only for table lookup in the implementation.

Figure 3. Runtime HRT certification on two sub-accelerators. The candidate prefix is checked against the feasible reference schedule at the machine-wise clean cut T⋆T^\star (purple). In Case A, sub-job SJ 2.2 belongs to the reference prefix but is not completed within the candidate prefix, violating the reference-prefix coverage condition (Condition 3 of Definition 6). The candidate is rejected, and execution falls back to the reference schedule, interrupting SRT execution when necessary. In Case B, the candidate satisfies the certification conditions and is accepted. After execution, the periodic online scheduler generates the next candidate prefix.

At scheduler activation time tkt_k, the online scheduler observes the current state and proposes a candidate prefix. Let hk=tk+TS+τschh_k = t_k + T_S + \tau_{\mathrm{sch}} be the nominal certification horizon, including the upper bound on runtime scheduling overhead. For each machine mm, the safety layer defines the cut component tm⋆t_m^\star as the first time not earlier than hkh_k at which no HRT sub-job of Sref,∞S^{\mathrm{ref},\infty} is executing on machine mm. Equivalently, if an HRT sub-job is executing on machine mm at hkh_k, then tm⋆t_m^\star is the finish time of that sub-job in the reference schedule; otherwise, tm⋆=hkt_m^\star= h_k.

The resulting machine-wise cut T⋆=(t1⋆,…,tM⋆)T^\star= (t_1^\star,\ldots,t_M^\star) is clean for the reference schedule by construction. The online scheduler must provide a candidate HRT prefix up to the same machine-wise cut. The candidate is rejected unless T⋆T^\star is also clean for the candidate schedule and the safe-prefix-replacement conditions of Definition 6 hold.

If the test accepts, the candidate prefix is committed up to T⋆T^\star. Importantly, the certification conditions in Definition 6 are expressed in terms of start and finish times and do not require HRT sub-jobs to execute for their full WCET; hence, candidate prefixes may exploit earlier completions as long as the certification conditions remain satisfied.

If the test rejects, all SRT work in the rejected prefix is discarded and the system executes the corresponding certified reference prefix. In this case, execution conservatively follows the WCET-based reference schedule: the reference slot of each HRT sub-job remains reserved for its full duration even if the sub-job completes earlier, without reclaiming the resulting slack.

Since after each accepted or fallback prefix the remaining HRT work admits the corresponding reference suffix as a feasible continuation, induction over scheduler activations guarantees HRT schedulability for the whole runtime execution.

The nominal parameter TST_S controls how frequently the scheduler attempts to create new candidate prefixes.

Background on Reinforcement Learning

RL is a machine learning paradigm in which an agent learns a decision policy through repeated interaction with an environment. At each decision step tt, the agent observes the current state sts_t, selects an action ata_t according to a policy π(at∣st)\pi(a_t|s_t), and receives a scalar reward rtr_t reflecting the quality of the selected action. The environment then transitions to a new state st+1s_{t+1} [34].

The objective of RL is to learn a policy maximizing the expected discounted cumulative reward: J(π)=Eπ[∑t=0∞ηtrt]J(\pi) = \mathbb{E}_{\pi}\left[\sum_{t=0}^{\infty}\eta^t r_t\right], where η∈[0,1)\eta\in[0,1) is the reward discount factor.

In actor–critic methods, the policy is represented by an actor network, while a separate critic network estimates the expected long-term utility of actions. More specifically, the critic approximates the action-value function Qπ(s,a)=Eπ[∑k=0∞ηkrt+k∣st=s, at=a]Q^\pi(s,a) = \mathbb{E}_{\pi}\left[\sum_{k=0}^{\infty}\eta^k r_{t+k}\mid s_t=s,\ a_t=a\right].

This work employs Deep Deterministic Policy Gradient (DDPG) [23], an off-policy actor–critic algorithm designed for continuous action spaces. DDPG represents both actor and critic through deep neural networks and updates them during the training phase, using transitions collected during runtime interaction with the environment. Training samples are stored in a replay buffer as tuples (st,at,rt,st+1)(s_t,a_t,r_t,s_{t+1}), which are later sampled uniformly to reduce temporal correlation and improve training stability. The critic is trained to minimize the Bellman error: L(ϕ)=E[(Qϕ(st,at)−yt)2]L(\phi) = \mathbb{E}\left[(Q_{\phi}(s_t,a_t)-y_t)^2\right], where the target value is yt=rt+ηQϕ−(st+1,πθ−(st+1))y_t = r_t + \eta Q_{\phi^-}(s_{t+1},\pi_{\theta^-}(s_{t+1})), and ϕ−\phi^- and θ−\theta^- denote slowly updated target-network parameters. The actor parameters θ\theta are updated through deterministic policy gradients: ∇θJ(θ)=E[∇aQϕ(s,a)∣a=πθ(s)∇θπθ(s)]\nabla_{\theta}J(\theta) = \mathbb{E}\left[\left.\nabla_a Q_{\phi}(s,a)\right|_{a=\pi_{\theta}(s)}\nabla_{\theta}\pi_{\theta}(s)\right]. After the training phase, the critic is no longer used during deployment, and the actor alone serves as the scheduling policy. DDPG is particularly suitable for scheduling problems because it naturally supports high-dimensional continuous action spaces, allowing the policy to jointly encode scheduling priorities and accelerator selection decisions.

RL-based Scheduler Policy

The online scheduler considered in this work is based on the DDPG [23] algorithm described in § 5.2. We considered alternative RL formulations, including discrete-action methods such as Q-learning. However, directly representing the joint sub-job ordering and accelerator-assignment decisions as discrete actions would result in a combinatorial action space that grows rapidly with the number of ready sub-jobs and available accelerators. Even other formulations, such as multi-armed bandit formulations [19, 26], are also not well suited to this problem because scheduling decisions are inherently sequential and affect future system states; capturing such state transitions and delayed consequences therefore requires a sequential decision-making formulation. We adopt DDPG and encode the scheduling decisions through continuous priority values, which are subsequently decoded into execution priorities and accelerator assignments.

Importantly, priorities are an internal mechanism used by the online policy to encode and construct a candidate schedule. Once the candidate schedule has been generated, its validity and certification depend only on the resulting machine assignments, execution intervals, precedence constraints, and not on the priority values that produced it. Therefore, priorities do not appear in Definition 6.

We consider the state as the ready sub-jobs and the current accelerator occupancy. At each scheduler activation, the policy observes the current runtime state and generates a candidate schedule by jointly selecting sub-job priorities and accelerator assignments. This formulation allows the scheduler to adapt to time-varying workload arrivals and heterogeneous accelerator availability while accounting for precedence constraints, resource contention, and execution tails.

As shown in Figure 4, the runtime state is encoded as a sequence of fixed-length feature vectors, one for each ready sub-job in ready queue RQtRQ_t, naturally supporting a variable number of schedulable sub-jobs. The feature representation includes model and layer identifiers, relative deadlines, waiting times, profiled execution latencies for each accelerator, the identifier of the client generating the request, the current client-level deadline-hit ratio HkSH_k^{\mathrm{S}}, the corresponding target SLO achievement rate H^kS\hat{H}_k^{\mathrm{S}}, and two boolean flags identifying HRT and QoS aware sub-jobs. Each feature vector therefore has length 9+M9 + M, where MM is the number of accelerators.

Figure 4. State and action encoding of the RL scheduler. The input sequence is prepended with a vector encoding the residual occupancy of each accelerator: an idle accelerator is represented by zero (e.g., ΔM=0\Delta_M = 0), whereas a busy accelerator is represented by its remaining busy time (e.g., Δ1>0\Delta_1 > 0). Each subsequent element encodes a ready HRT or SRT sub-job. For each input element, the policy outputs a temporal priority and MM accelerator-selection scores. The first output, corresponding to the accelerator-occupancy state vector rather than to a sub-job, is discarded.

The input sequence is preceded by an additional 9+M9 + M-dimensional all-zero vector except MM entries, which show the residual busy time of each accelerator inherited from previously dispatched execution tails, allowing the policy to reason about near-future accelerator availability and congestion. Ready sub-jobs are then provided in deadline order.

For each ready sub-job, the actor network emits an action encoded as an (M+1)(M + 1)-dimensional vector, as follows: (i) a scalar temporal priority and (ii) an MM-dimensional spatial priority vector over the accelerators. The maximum spatial priority among the eligible accelerators in Mv\mathcal{M}_{v} determines the selected accelerator.

The continuous policy outputs are decoded into a discrete schedule by dispatching, whenever an accelerator becomes available, the highest-priority eligible sub-job onto the accelerator selected by the spatial priority vector.

Both actor and critic are implemented as recurrent neural networks to support variable-sized ready queues. In our implementation, we employ GRU layers for improved computational efficiency. The recurrent encoder captures sequence-level scheduling context such as deadline structure, accelerator contention, and queue composition. The critic estimates the action-value function Qϕ(s,a)Q_{\phi}(s,a) from the recurrent hidden state.

Training follows standard off-policy DDPG methodology. Runtime transitions (st,at,rt,st+1)(s_t,a_t,r_t,s_{t+1}) are stored in a replay buffer and sampled uniformly to reduce temporal correlation. Target networks and soft parameter updates are used to stabilize training [23]. Exploration noise is applied only during training.

We designed a reward function to prioritize deadline satisfaction and, among feasible outcomes, improve client-level QoS balance and accelerator utilization. The relative importance of the different reward components is controlled by tunable parameters, which are set before training and can be selected empirically, e.g., through grid search, according to the desired trade-off among the optimization objectives. The reward is decomposed into four components:

rt=Rtdeadline+Rtslack+RtQoS+RtHRT.(1)r_t = R_t^{\mathrm{deadline}} + R_t^{\mathrm{slack}} + R_t^{\mathrm{QoS}} + R_t^{\mathrm{HRT}}. \tag*{(1)}

The first three reward components, i.e., RtdeadlineR_t^{\mathrm{deadline}}, RtslackR_t^{\mathrm{slack}}, and RtQoSR_t^{\mathrm{QoS}}, pertain to the SRT workload, whereas RtHRTR_t^{\mathrm{HRT}} pertains to the HRT workload.

The deadline satisfaction component, which penalizes deadline misses, is:

Rtdeadline=∑ℓ∈RQtSRTΔt,ℓAt,ℓ,(2)R_t^{\mathrm{deadline}} = \sum_{\ell\in RQ_t^{SRT}} \Delta_{t,\ell} A_{t,\ell}, \tag*{(2)}

where

At,ℓ={α,fℓ≤dℓ−β,otherwise.(3)A_{t,\ell} = \begin{cases} \alpha, & f_\ell\le d_\ell\\ -\beta, & \text{otherwise.} \end{cases} \tag*{(3)}

where α\alpha and β\beta are tunable reward hyperparameters.

The normalized completion-time improvement component, which favors earlier completions, is:

Rtslack=γ∑l∈RQtSRTΔt,ldl−fldl−al.(4)R_t^{\mathrm{slack}} = \gamma\sum_{l \in RQ_t^{SRT}} \Delta_{t,l} \frac{d_l-f_l}{d_l-a_l}. \tag*{(4)}

The client-level QoS balancing component, which encourages client-level SLO achievement rates to remain close to their target values, is:

RtQoS=−λ∑l∈RQtSRTΔt,l∣HκlS−H^κlS∣,(5)R_t^{\mathrm{QoS}} = -\lambda\sum_{l \in RQ_t^{SRT}} \Delta_{t,l} \left|H_{\kappa_l}^{S}-\hat{H}_{\kappa_l}^{S}\right|, \tag*{(5)}

where HκlSH_{\kappa_l}^{S} is the current deadline-hit ratio of the client generating sub-job ll, and H^κlS\hat{H}_{\kappa_l}^{S} is the corresponding target SLO achievement rate defined in § 2.3; λ\lambda is a tunable reward hyperparameter. Finally, HRT deadline misses are strongly penalized through:

RtHRT=−μNmissHRT(t),(6)R_t^{\mathrm{HRT}}=-\mu N_{\mathrm{miss}}^{\mathrm{HRT}}(t), \tag*{(6)}

where NmissHRT(t)N_{\mathrm{miss}}^{\mathrm{HRT}}(t) is the number of HRT deadline misses observed during the scheduling window and μ≫1\mu\gg1 is a large penalty coefficient. The over-the-horizon weighting factor is:

Δt,l={1,fl<t+TSδ,otherwise.(7)\Delta_{t,l} = \begin{cases} 1, & f_l < t+T_S \\ \delta, & \text{otherwise}. \end{cases} \tag*{(7)}

During training, any HRT deadline miss produces a catastrophic negative reward through RtHRTR_t^{\mathrm{HRT}}. Unlike for the SRT workload, where RtslackR_t^{\mathrm{slack}} encourages earlier completion, the HRT reward does not incentivize completion earlier than necessary. During deployment, exploration is disabled and candidate schedules are executed only if accepted by the schedulability-preserving runtime certification mechanism described in § 4. Consequently, the RL policy affects only QoS-aware optimization and candidate schedule quality, while HRT correctness is entirely enforced by the deterministic safety layer. Regarding the reference schedule construction, in the experiments we have employed several techniques. The main two are: EDF ordering with earliest-completion accelerator selection, and a recurrent heuristic inspired by [6] favouring larger deadline slack. Both methods are followed by deterministic validation of precedences and HRT deadlines.

Experimental Results

Experimental Setup

We evaluate the proposed framework on a heterogeneous multi-accelerator platform with six DNN accelerators, following the established heterogeneous setup of [6, 31], enabling the comparison with prior scheduling techniques. In architectural terms, three accelerators implement a row-stationary dataflow and an organization close to Eyeriss [9]; the other three implement a weight-stationary dataflow and an organization close to Simba [32]. For each accelerator family, two instances are small and one instance is large. Hence, the platform exposes both dataflow heterogeneity and size heterogeneity, and sub-job execution times depend on the selected accelerator. We consider representative DNN inference workloads from image classification and object detection. The image-classification set includes AlexNet, InceptionV3, and ResNet50, while the object-detection set includes YOLO-v2. Each inference request is represented as a DAG of layer-level sub-jobs, with precedence constraints induced by the network topology. For every layer and eligible accelerator, we use profiled execution latencies as the scheduling costs. SRT arrivals follow a Google-like workload model derived from large-scale production traces. Following the workload generator of Da Costa et al. [11], inter-arrival times are sampled from a heavy-tailed Pareto process. Let dd denote the target mean inter-arrival time, corresponding to the generator’s dynamism parameter. For each submitted SRT job ii, we sample Xi∼Pareto⁡(α=4,xm=1)X_i \sim\operatorname{Pareto}(\alpha= 4, x_m = 1) and set ai=ai−1+3d(Xi−1−1)a_i = a_{i-1} + 3d(X_{i-1} - 1). Since E[Xi−1]=1/3\mathbb{E}[X_{i-1}] = 1/3, the expected inter-arrival time is E[ai−ai−1]=d\mathbb{E}[a_i - a_{i-1}] = d. We evaluate two workload intensities: d=40d = 40 ms, denoting a moderate-pressure workload, and d=10d = 10 ms, denoting a high-pressure workload with four times more frequent SRT arrivals.

Each SRT request is associated with a client k∈Kk \in\mathcal{K}. For each client, we measure the client-level SLO achievement rate HkSH_k^S, defined as the fraction of that client’s SRT jobs that complete by their soft deadline. Client targets are chosen from H^kS∈{70%,80%,90%}\hat{H}_k^S \in\{70\%, 80\%, 90\% \}. The aggregate SRT hit ratio HSH^S measures system-level SRT timeliness, while the quantity min⁡k∈K(HkS−H^kS)\min_{k \in\mathcal{K}}(H_k^S - \hat{H}_k^S) captures the worst client-level SLO margin. If this value is non-negative, all clients meet their target SLO achievement rate; negative values indicate that at least one client is below its target. Therefore, our secondary objective, after preserving HRT schedulability, is to improve HSH^S while avoiding negative client-level SLO margins for each client.

Across all certified experiments, no admitted HRT job misses its deadline; this only validates the implementation, whereas the HRT guarantee follows from Theorem 1. The measurement simply confirms that the implementation follows the certified execution protocol. Regarding the reward parameters, we employed α=0.01\alpha= 0.01 for SRT deadline hits, β=0.11\beta= 0.11 for SRT misses, μ=30\mu= 30 for HRT misses, λ=0.1\lambda= 0.1 for client-level QoS imbalance, and δ=0.05\delta= 0.05 for outcomes beyond the current scheduling window. These coefficients were selected through a grid search over training simulations. For example, μ\mu was chosen so that HRT misses make the total reward negative despite the other components, while the remaining terms were balanced to prevent any secondary objective from dominating.

Baselines

We compare against representative online DNN schedulers, slack-based real-time mechanisms, and simple dispatch heuristics, all implemented at layer granularity with the same profiled accelerator latencies. Methods that do not natively provide HRT guarantees in our heterogeneous DAG-based model are evaluated as HRT-safe wrapped variants, obtained by enclosing them in the same prefix-replacement safety envelope used by our framework. This also shows that the proposed certification-and-fallback mechanism is not specific to our RL scheduler. Any online scheduling policy can be enclosed within the same safety envelope: if the policy is effective at scheduling real-time jobs on heterogeneous platforms, the fallback mechanism can be used to make its execution HRT-safe. We include PREMA [10], adapting its priority/allocation logic to our heterogeneous layer-level simulator. In particular, our adaptation selects among the highest-aging ready layers according to their expected latency, and assigns them to accelerators considering current availability. We also include a client-aware RL policy [31] that augments the policy state and reward with client-level SLO information based on the deadline-hit rate SLI. We also employ the algorithms proposed by Tang et al. [35] by constructing an HRT schedule with H-EDF or FF, deriving per-accelerator slack windows, and admitting SRT layers only when they can be placed by RC, TC, or TCSD without violating release times, latest-start-time bounds, machine order, or DNN precedence constraints. We implement SSML [15], originally formulated for a uniprocessor setting, as a conservative scheduler-core adaptation that computes a modified-laEDF slack budget σ\sigma from the remaining HRT layer workload and admits a non-preemptive SRT layer only if its whole execution fits both the available slack budget and the current scheduling window. We adapt CD-MSA [37] by applying its EDF ordering, ∑i=1kCi≤Dk\sum_{i=1}^{k} C_i \le D_k schedulability test, and laxity-aware promotion rule at the DNN-request level, while estimating remaining execution costs from our heterogeneous layer latencies and subsequently mapping the selected layers to accelerators. We also include SJF, SSJF, FCFS, and LCFS as simple online dispatch heuristics for ready DNN layers, augmented with a heuristic to select, for each sub-job, the accelerator expected to yield the shortest completion time based on dataflow affinity and current resource utilization.

Experimental Results

HRT-safe evaluation protocol. All methods are evaluated under preserved HRT schedulability: every admitted HRT job must meet its deadline. For baselines that do not provide HRT guarantees in our heterogeneous DAG-based model, including PREMA [10], the client-aware RL baseline [31], CD-MSA [37], SJF, SSJF, FCFS, and LCFS, we report their certified variants, obtained by applying the same prefix-replacement safety envelope used by our scheduler. This evaluation isolates the quality of the online scheduling policy under a common HRT safety mechanism. We also report an ablation without the safety envelope to show the HRT losses incurred by the raw policies. In our experiments, we also include the natively certified FF+RC/FF+TC/FF+TCSD [35] algorithms.3

System-level SRT performance. At 40 ms inter-arrival, the workload is moderate and the best methods are close: our scheduler reaches HS=98.29%H^{S} = 98.29\%4, followed by SSML at 96.75% and the client-aware at 92.70%. The difference appears when SRT arrivals become more frequent. At 10 ms, our scheduler still reaches $H^{S} = 81.41%, while the best baselines, the client-aware and FF+TC/FF+TCSD, stop at 59.50% and 50.74%, respectively. This is a +21.91 percentage-point gain over the best competing SRT hit ratio. The throughput follows the same trend, as depicted in Figure 5.

Figure 5. Throughput versus SRT hit ratio HSH^{S}. The paired plot compares the moderate-pressure workload, 40 ms inter-arrival, with the high-pressure workload, 10 ms inter-arrival. (*) denotes a baseline wrapped with the proposed HRT safety envelope; rejected prefixes fall back to SrefS^{\mathrm{ref}}.

Impact of the reference schedule. We conducted a study using 20 distinct feasible HRT reference schedules alternative to the one used in Figure 6 (d=10d = 10ms), generated via different fine-tuned actor networks and summing seed-controlled Gaussian perturbations to the actor outputs. The results showed HSH^S from 80.39% to 81.93%.

Figure 6. SRT hit ratio HSH^{S} under moderate-pressure and high-pressure workloads. At 40 ms, several methods remain competitive; at 10 ms, most baselines sharply lose SRT deadline satisfaction, while the proposed scheduler maintains a substantially higher HSH^{S}. (*) denotes a baseline wrapped with the proposed HRT safety envelope; rejected prefixes fall back to SrefS^{\mathrm{ref}}.

Worst-client SLO achievement rate. The aggregate HSH^S alone is not sufficient: a scheduler may complete many SRT jobs while starving some clients. Figure 7 reports min⁡kHkS\min_k H_k^S. At 40 ms, our scheduler reaches 90.32%, followed by SSML at 82.93% and the client-aware at 75.59%. At 10 ms, while the client aware drops to 30.19%, the other baselines collapse at client level: PREMA drops to 3.39%, SSML to 1.94%, SSJF to 1.70%, CD-MSA to 0.48%, and several methods reach 0.00%. Our scheduler keeps the worst client at 62.05%, i.e., +31.86 percentage points over the best baseline.

Figure 7. Client-level SRT performance. Worst-client SLO achievement rate, min⁡kHkS\min_k H_k^S, under preserved HRT schedulability. The paired plot compares the moderate-pressure workload, 40 ms inter-arrival, with the high-pressure workload, 10 ms inter-arrival. At 40 ms, the proposed scheduler reaches 90.3%; at 10 ms, it keeps the worst client at 62.1%, while the strongest baseline drops substantially. (*) denotes a baseline wrapped with the proposed HRT safety envelope; rejected prefixes fall back to SrefS^{\mathrm{ref}}.

Client-level distribution at high pressure. At 10 ms, our scheduler achieves HSH^S = 81.41% with a standard deviation of client-level rates equal to 12.16%. FCFS has a slightly lower standard deviation, 10.03%, but only HSH^S = 15.27%, so it is uniformly poor. On the opposite side, FF+TC and FF+TCSD reach HSH^S = 50.74%, but their standard deviation is 49.99%, with min⁡kHkS\min_k H_k^S = 0.00%. Their boxplots therefore show a polarized behavior: some clients are served very well, while others receive no SRT service. Our scheduler avoids this collapse: the median client rate is 77.61%, the interquartile range is 71.05–88.52%, and the worst client remains at 62.05%. Overall, when the workload changes from 40 ms to 10 ms inter-arrival, the baselines move from acceptable aggregate behavior to poor client-level behavior. The proposed scheduler remains HRT-safe by construction and keeps high SRT performance: HS=81.41%H^{S}=81.41\%, high throughput, min⁡kHkS=62.05%\min_k H_k^{S}=62.05\%, and standard deviation of (HkS)(H_k^{S}) equal to 12.16%.

Figure 8. Client-level behavior at 10 ms inter-arrival. The proposed scheduler keeps high SRT hit ratio while controlling the dispersion of client-level SLO achievement rates. (*) denotes a baseline wrapped with the proposed HRT safety envelope; rejected prefixes fall back to SrefS^{\mathrm{ref}}.

Reference-schedule fallback rate. Figure 9 reports the reference-schedule fallback rate, i.e., the fraction of scheduler activations for which the candidate schedule prefix is rejected by the runtime acceptance test and execution falls back to the certified HRT reference schedule SrefS^{\mathrm{ref}}. This metric is important because it quantifies how often the online scheduler, by itself, fails to produce a certifiable prefix under the HRT safety constraints.

Figure 9. Reference-schedule fallback rate under our HRT safety envelope. The metric reports how often a candidate prefix is rejected and execution falls back to the certified reference schedule SrefS^{\mathrm{ref}}. Lower is better.

Algorithms marked with an asterisk are not natively HRT-safe in our model. To enforce HRT correctness and enable a fair comparison under preserved HRT schedulability, we enclose them within the same deterministic prefix-replacement safety envelope used by our framework. Therefore, the asterisk denotes an HRT-safe wrapped variant of the original scheduler. A lower fallback rate indicates that the underlying online scheduler is more compatible with HRT constraints, since it more frequently generates prefixes that can be certified safe without reverting to SrefS^{\mathrm{ref}}.

Our scheduler exhibits a very low fallback rate because HRT-awareness is built directly into the learning process. In particular, HRT jobs are explicitly identified in the policy input, and HRT deadline violations are assigned a large negative reward during training. As a result, the learned policy does not systematically rely on the fallback mechanism; instead, it learns to produce candidate prefixes that are already close to being certifiable under the HRT safety test.

Ablation without fallback. We also evaluate the schedulers with the prefix-replacement safety envelope disabled, i.e., candidate prefixes are executed directly without fallback to the certified reference schedule. This experiment is diagnostic only: HRT correctness is no longer guaranteed. As shown in Figure 10, most baselines incur substantial HRT deadline losses. Our policy reaches 99.8% HRT deadline satisfaction and 81.4% SRT deadline satisfaction, because HRT/SRT job type is part of the policy input and HRT deadline misses are strongly penalized during training. However, 99.8% is still not an HRT guarantee. This confirms that the deterministic fallback mechanism is necessary to turn good empirical HRT behavior into preserved HRT schedulability.

Figure 10. Ablation without the runtime HRT safety envelope at d=10d = 10 ms. The plot reports HRT and SRT deadline satisfaction when candidate prefixes are executed directly, without fallback to SrefS^{\mathrm{ref}}.

Scheduler overhead. We account for the end-to-end runtime overhead incurred at each scheduling instant, including state encoding, policy inference, runtime certification, and dispatching/cancellation bookkeeping. We denote this overhead by τsch=τenc+τpolicy+τcert+τdisp\tau_{\mathrm{sch}} = \tau_{\mathrm{enc}} + \tau_{\mathrm{policy}} + \tau_{\mathrm{cert}} + \tau_{\mathrm{disp}}. This term is treated as the worst-case execution time of the online scheduler and is charged at every scheduling activation in the experimental timing model. The scheduler is activated every TS=5T_S = 5 ms. To make τsch\tau_{\mathrm{sch}} bounded, the number of sub-jobs visible to the online policy is limited to a fixed maximum Nmax⁡N_{\max}: all ready HRT sub-jobs are always included, while the SRT ready queue is truncated when necessary; more priority is given to the SRT jobs pertaining to clients with a SLO achievement rate lower than the target. This bounds the cost of both state encoding and policy inference independently of the total SRT backlog. For the GRU policy with hidden size 192, the measured cost is 592 cycles per encoded sub-job on the smallest accelerator. With Nmax⁡=64N_{\max} = 64, this gives τpolicy=64⋅592=37888\tau_{\mathrm{policy}} = 64 \cdot592 = 37888 cycles =37.9 μs= 37.9\ \mu\mathrm{s} at 1 GHz, i.e., 0.76% of the scheduling period. The runtime certification step is also bounded: it scans at most all the NN HRT sub-jobs, therefore it has O(N)O(N) complexity and is bounded by Nmax⁡N_{\max}. Moreover, since sub-jobs are distributed across scheduling periods, NN is only an upper bound. Increasing the number of HRT tasks or DAG length increases NN linearly.

Scheduling period analysis. We evaluate the impact of TST_S under high pressure (d=10d = 10 ms) through two experiments: (i) deploying a policy trained with TS=5T_S = 5 ms at different scheduling periods, and (ii) training and testing a separate policy for each period.

For TS∈{0.5,1,1.25,2.5,5,10}T_S \in\{0.5, 1, 1.25, 2.5, 5, 10\} ms, the policy trained at 5 ms achieves SRT hit ratios HSH^S of 73.73%, 76.84%, 69.45%, 74.96%, 81.40%, and 71.12%, respectively. Although performance peaks at the training period, the policy retains effectiveness across the tested periods, demonstrating transfer across scheduling frequencies. Conversely, policies trained specifically at 0.5, 1, 1.25, 2.5, and 10 ms achieve only 25.69%, 27.92%, 46.82%, 48.79%, and 62.81%, respectively. We attribute the poorer results of training with short periods to the following reasons. Shorter windows contain fewer completed sub-jobs contributing to the reward and provide less execution time over which the policy can exploit accelerator availability. Moreover, scheduling overhead accounts for a larger fraction of execution time. Conversely, large periods are constrained by timing requirements of both HRT and SRT jobs. Their relative deadlines must accommodate waiting time, scheduling overhead, and the required execution time. Additional timing slack also leaves more room for online optimization.

Related Work

Table 2 compares representative related work along key dimensions.

WorkMultiproc.Unrelated machinesPrecedence constraintsDNN inferenceRL schedulerOnline schedulerSoft real-timeClient awareHard real-time
PREMA [10]NoNot ApplicableLimitedYesNoYesYesYesNo
MAGMA [17]YesYesLimitedYesNoNoNoNoNo
Tang et al. [35]YesYesNoNoNoYesYesNoYes
SSML [15]NoNoNoNoNoYesYesNoYes
Willemsen et al. [38]NoNot ApplicableNoNoNoYesNoNot ApplicableYes
CD-MSA [37]LimitedNoLimitedYesNoYesYesNot ApplicableNo
RELMAS [6]YesYesYesYesYesYesYesNoNo
Client-aware [31]YesYesYesYesYesYesYesYesNo
OursYesYesYesYesYesYesYesYesYes

Table 2. Comparison of related work.

Hard-periodic/soft-aperiodic scheduling on heterogeneous resources. Tang et al. [35] study the joint scheduling of hard periodic and soft aperiodic tasks on heterogeneous resources. Their approach is divided into two phases: an offline phase, where hard periodic tasks are scheduled using either Heterogeneous EDF (H-EDF) or Fastest First (FF); then, online, soft aperiodic tasks are scheduled using the per-resource slack windows extracted from the resulting hard schedule, using Resource-Centric (RC), Task-Centric (TC), or Task-Centric with Slack Defragmentation (TCSD). TCSD can shift hard periodic instances earlier than their latest start times to enlarge later slack windows. The original model assumes independent, non-preemptive tasks that can execute on any resource with resource-dependent execution times.

DNN inference on domain-specific accelerators. Extensive research has investigated scheduling strategies for DNN inference on accelerator-based platforms. Static solutions such as LayerWeaver [27] and AI-MT [3] assign DNN layers to accelerators based on analytical models, but they cannot adapt to runtime variability. Schedulers like PREMA [10] and MAGMA [17] adjust accelerator allocation in response to workload fluctuations. Techniques such as Planaria [14] and MoCA [18] redistribute compute resources at finer granularity to improve utilization and co-location efficiency. Orion [33] considers multiple priority queues in GPU scheduling. The considered systems optimize different system-level metrics, without concentrating on single client QoS, and without providing deterministic HRT guarantees. CD-MSA [37] targets EDF-based real-time DNN inference on multi-systolic-array accelerators, which are homogeneous accelerator platforms. In parallel, several works have focused on enhancing the time predictability of DNNs on general-purpose processors, including efforts to improve timing isolation and scheduling analysis [8].

Slack stealing and modified look-ahead EDF. Slack stealing is a classical mechanism for improving the responsiveness of soft aperiodic work in systems where hard periodic tasks have already been guaranteed. A slack stealer exploits unused processing time from the periodic schedule to execute the aperiodic work, while ensuring that previously guaranteed periodic deadlines are not violated [21]. This idea is closely related to the look-ahead EDF (laEDF) mechanisms used in real-time dynamic voltage scaling: Pillai and Shin [28] compute the minimum amount of periodic work that must execute before the next deadline, deferring the remaining work to later intervals when this is safe. SSML [15] adapts laEDF principle to hard-periodic and soft-aperiodic scheduling for uniprocessor systems with independent tasks.

Conclusion

This paper presented a scheduling framework for heterogeneous multi-accelerator systems executing both hard real-time and soft real-time QoS-aware DNN inference workloads. The proposed approach combines an online RL-based scheduler with a deterministic runtime certification mechanism that guarantees HRT correctness independently of the learned policy. To enable safe runtime adaptation, we introduced a schedulability-preserving prefix replacement criterion for heterogeneous precedence-constrained schedules. Experimental results showed that the framework preserves HRT schedulability while improving QoS-aware deadline satisfaction, client-level service quality, and accelerator utilization compared to state-of-the-art scheduling approaches. Future work includes extending the framework to support additional runtime uncertainties, workload prediction mechanisms, and alternative QoS optimization objectives.

Acknowledgements

This work was supported by the European Commission through the Chips Joint Undertaking under Grant Agreement No. 101139790 (ECS4DRES).

References

  1. [1]Abeni, L., Buttazzo, G.: Qos guarantee using probabilistic deadlines. In: Proceedings of 11th Euromicro Conference on Real-Time Systems. Euromicro RTS’99. pp. 242–249. IEEE (1999)
  2. [2]Aromolo, F., Stevanato, A., Biondi, A., Buttazzo, G.: Real-time multitasking of deep neural networks with nvidia tensorrt. In: 2025 IEEE Real-Time Systems Symposium (RTSS). pp. 364–377. IEEE (2025)DOI
  3. [3]Baek, E., Kwon, D., Kim, J.: A multi-neural network acceleration architecture. In: 2020 ACM/IEEE 47th Annual International Symposium on Computer Architecture (ISCA). pp. 940–953. IEEE (2020)DOI
  4. [4]Baruah, S., Bertogna, M., Buttazzo, G.: Multiprocessor scheduling for real-time systems. Springer (2015)DOI
  5. [5]Baruah, S., Bonifaci, V., Marchetti-Spaccamela, A., Stougie, L., Wiese, A.: A generalized parallel task model for recurrent real-time processes. In: 2012 IEEE 33rd Real-Time Systems Symposium. pp. 63–72 (2012). https://doi.org/10.1109/RTSS.2012.59
  6. [6]Blanco, F.G., Russo, E., Palesi, M., Patti, D., Ascia, G., Catania, V.: A deep reinforcement learning based online scheduling policy for deep neural network multi-tenant multi-accelerator systems. In: Proceedings of the 61st ACM/IEEE Design Automation Conference. pp. 1–6 (2024)
  7. [7]Buttazzo, G.C.: Hard real-time computing systems: predictable scheduling algorithms and applications. Springer (1997)
  8. [8]Casini, D., Biondi, A., Buttazzo, G.: Timing isolation and improved scheduling of deep neural networks for real-time systems. Software: Practice and Experience 50(9), 1760–1777 (2020)DOI
  9. [9]Chen, Y.H., Yang, T.J., Emer, J., Sze, V.: Eyeriss v2: A flexible accelerator for emerging deep neural networks on mobile devices. IEEE Journal on Emerging and Selected Topics in Circuits and Systems 9(2), 292–308 (2019)arxiv.org/abs/1807.07928
  10. [10]Choi, Y., Rhu, M.: Prema: A predictive multi-task scheduling algorithm for pre-emptible neural processing units. In: 2020 IEEE International Symposium on High Performance Computer Architecture (HPCA). pp. 220–233. IEEE (2020)
  11. [11]Da Costa, G., Grange, L., De Courchelle, I.: Modeling, classifying and generating large-scale google-like workload. Sustainable Computing: Informatics and Systems 19, 305–314 (2018)DOI
  12. [12]Das, A., Russo, E., Palesi, M.: Multi-objective hardware-mapping co-optimisation for multi-dnn workloads on chiplet-based accelerators. IEEE Transactions on Computers 73(8), 1883–1898 (2024)arxiv.org/abs/2210.14657
  13. [13]Davis, R.I., Burns, A.: A survey of hard real-time scheduling for multiprocessor systems. ACM computing surveys (CSUR) 43(4), 1–44 (2011)DOI
  14. [14]Ghodrati, S., et al.: Planaria: Dynamic architecture fission for spatial multi-tenant acceleration of deep neural networks. In: 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO). pp. 681–697. IEEE (2020)DOI
  15. [15]Jeon, W., Kim, W., Lee, H., Lee, C.H.: Online slack-stealing scheduling with modified laedf in real-time systems. Electronics 8(11), 1286 (2019)DOI
  16. [16]Kang, W., Lee, K., Lee, J., Shin, I., Chwa, H.S.: Lalarand: Flexible layer-by-layer cpu/gpu scheduling for real-time dnn tasks. In: 2021 IEEE Real-Time Systems Symposium (RTSS). pp. 329–341. IEEE (2021)DOI
  17. [17]Kao, S.C., Krishna, T.: Magma: An optimization framework for mapping multiple dnns on multiple accelerator cores. In: 2022 IEEE International Symposium on High-Performance Computer Architecture (HPCA). pp. 814–830. IEEE (2022)arxiv.org/abs/2104.13997
  18. [18]Kim, S., Genc, H., Nikiforov, V.V., Asanović, K., Nikolić, B., Shao, Y.S.: Moca: Memory-centric, adaptive execution for multi-tenant deep neural networks. In: 2023 IEEE International Symposium on High-Performance Computer Architecture (HPCA). pp. 828–841. IEEE (2023)DOI
  19. [19]Kuleshov, V., Precup, D.: Algorithms for multi-armed bandit problems. arXiv preprint arXiv:1402.6028 (2014)arxiv.org/abs/1402.6028
  20. [20]Kwon, H., Lai, L., Pellauer, M., Krishna, T., Chen, Y.H., Chandra, V.: Heterogeneous dataflow accelerators for multi-dnn workloads. In: 2021 IEEE International Symposium on High-Performance Computer Architecture (HPCA). pp. 71–83. IEEE (2021)arxiv.org/abs/1909.07437
  21. [21]Lehoczky, J.P., Ramos-Thuel, S.: An optimal algorithm for scheduling soft-aperiodic tasks in fixed-priority preemptive systems. In: RTSS. vol. 92, pp. 110–123 (1992)
  22. [22]Li, J., Liang, W., Li, Y., Xu, Z., Jia, X., Guo, S.: Throughput maximization of delay-aware dnn inference in edge computing by exploring dnn model partitioning and inference parallelism. IEEE Transactions on Mobile Computing 22(5), 3017–3030 (2021)DOI
  23. [23]Lillicrap, T.P., Hunt, J.J., Pritzel, A., Heess, N., Erez, T., Tassa, Y., Silver, D., Wierstra, D.: Continuous control with deep reinforcement learning. arXiv:1509.02971 (2015)arxiv.org/abs/1509.02971
  24. [24]Ling, N., Huang, X., Zhao, Z., Guan, N., Yan, Z., Xing, G.: Blastnet: Exploiting duo-blocks for cross-processor real-time dnn inference. In: Proceedings of the 20th ACM Conference on Embedded Networked Sensor Systems. pp. 91–105 (2022)DOI
  25. [25]Ling, N., Wang, K., He, Y., Xing, G., Xie, D.: Rt-mdl: Supporting real-time mixed deep learning tasks on edge platforms. In: Proceedings of the 19th ACM conference on embedded networked sensor systems. pp. 1–14 (2021)DOI
  26. [26]Mahajan, A., Teneketzis, D.: Multi-armed bandit problems. In: Foundations and applications of sensor management, pp. 121–151. Springer (2008)DOI
  27. [27]Oh, Y.H., Kim, S., Jin, Y., Son, S., Bae, J., Lee, J., Park, Y., Kim, D.U., Ham, T.J., Lee, J.W.: Layerweaver: Maximizing resource utilization of neural processing units via layer-wise scheduling. In: 2021 IEEE International Symposium on High-Performance Computer Architecture (HPCA). pp. 584–597. IEEE (2021)DOI
  28. [28]Pillai, P., Shin, K.G.: Real-time dynamic voltage scaling for low-power embedded operating systems. In: Proceedings of the eighteenth ACM symposium on Operating systems principles. pp. 89–102 (2001)
  29. [29]Restuccia, F., Biondi, A.: Time-predictable acceleration of deep neural networks on fpga soc platforms. In: 2021 IEEE Real-Time Systems Symposium (RTSS). pp. 441–454. IEEE (2021)DOI
  30. [30]Romero, F., Li, Q., Yadwadkar, N.J., Kozyrakis, C.: INFaaS: Automated model-less inference serving. In: 2021 USENIX Annual Technical Conference (USENIX ATC 21). pp. 397–411. USENIX Association (Jul 2021)
  31. [31]Russo, E., Blanco, F.G., Palesi, M., Ascia, G., Patti, D., Catania, V.: Towards fair and firm real-time scheduling in dnn multi-tenant multi-accelerator systems via reinforcement learning. In: 2024 IEEE International Symposium on Circuits and Systems (ISCAS). pp. 1–5. IEEE (2024)arxiv.org/abs/2403.00766
  32. [32]Shao, Y.S., et al.: Simba: Scaling deep-learning inference with multi-chip-module-based architecture. In: Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture. pp. 14–27. Association for Computing Machinery, New York, NY, USA (2024)
  33. [33]Strati, F., Ma, X., Klimovic, A.: Orion: Interference-aware, fine-grained gpu sharing for ml applications. In: Proceedings of the Nineteenth European Conference on Computer Systems. pp. 1075–1092 (2024)DOI
  34. [34]Sutton, R.S., Barto, A.G., et al.: Reinforcement learning: An introduction, vol. 1. MIT press Cambridge (1998)DOI
  35. [35]Tang, H.K., Ramanathan, P., Compton, K.: Combining hard periodic and soft aperiodic real-time task scheduling on heterogeneous compute resources. In: 2011 International Conference on Parallel Processing. pp. 753–762. IEEE (2011)DOI
  36. [36]Vestal, S.: Preemptive scheduling of multi-criticality systems with varying degrees of execution time assurance. In: 28th IEEE international real-time systems symposium (RTSS 2007). pp. 239–243. IEEE (2007)DOI
  37. [37]Wang, C., Bai, Y., Sun, D.: Cd-msa: cooperative and deadline-aware scheduling for efficient multi-tenancy on dnn accelerators. IEEE Transactions on Parallel and Distributed Systems 34(7), 2091–2106 (2023)DOI
  38. [38]Willemsen, L., Günzel, M., Brandenburg, B., Brüggen, G.v.d., Lin, C.C., Chen, J.J.: Transfer schedulability in periodic real-time systems. ACM Transactions on Embedded Computing Systems 24(5), 1–25 (2025)DOI
  39. [39]Xiang, Y., Kim, H.: Pipelined data-parallel cpu/gpu scheduling for multi-dnn real-time inference. In: 2019 IEEE Real-Time Systems Symposium (RTSS). pp. 392–405. IEEE (2019)DOI
  40. [40]Yu, F., Bray, S., Wang, D., Shangguan, L., Tang, X., Liu, C., Chen, X.: Automated runtime-aware scheduling for multi-tenant dnn inference on gpu. In: 2021 IEEE/ACM International Conference On Computer Aided Design (ICCAD). pp. 1–9. IEEE (2021)arxiv.org/abs/2111.14255

Paper details

vlnc:W_6v6ujc5u
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents