Jyoti Sahni and Deo Prakash Vidyarthi [
26] proposed the Just-In-Time Cost (JIT-C) algorithm for workflow scheduling under deadline constraints. The key idea of JIT-C is to make effective scheduling decisions before tasks are ready for execution. To this end, the algorithm accounts for performance variations of virtual machines (VMs) in cloud platforms and employs a monitoring loop controller to track task progress, enabling dynamic adjustments of resource allocation and scheduling. While JIT-C demonstrates strong performance in real-time workflow scheduling within cloud environments, its applicability is limited by the centralized nature of cloud computing, making it unsuitable for parallel distributed systems. Motivated by this approach, we develop an efficient resource allocation and scheduling algorithm tailored to the DIMA architecture, which is designed for distributed computing environments.
4.1. Mathematical Preliminaries
In order to formally describe the scheduling and resource allocation problem in the DIMA architecture, it is necessary to define a set of mathematical notations and performance metrics. These notations capture task execution times, data transfer delays, scheduling constraints, and workflow deadlines, which together form the foundation for algorithm design and performance evaluation. By establishing these definitions, we ensure a precise and unified representation of the scheduling problem, thereby facilitating the development of efficient scheduling and migration strategies.
To model task execution in the DIMA architecture, we first define notations related to task execution time and communication delay. The execution time of a task
on a virtual partition of type
is expressed as
, and its minimum execution time
is determined by the fastest virtual partition type capable of executing it, as given in Equation (1). When tasks are mapped to different virtual partitions, communication delays arise from data dependencies, and the transfer time
is proportional to the data size
and inversely proportional to the available bandwidth
(Equation (2)). Based on these definitions, the earliest start time
of a task depends on the completion of its parent tasks and associated data transfers (Equation (3)), while the earliest finish time
is obtained by summing its execution time and earliest start time (Equation (4)).
At the workflow level, additional notations capture expected start and finish times, as well as deadline constraints. The expected finish time
of tasks in the same layer can be estimated by averaging their execution times (Equation (5)), while the expected start time
is determined once all predecessor tasks are scheduled (Equation (6)). Under deadline constraints, the latest finish time
of a task is derived backward from the overall workflow deadline (Equation (7)), and the latest start time
follows accordingly (Equation (8)). For the entire workflow, the minimum execution time
corresponds to the critical path length (Equation (9)).
In addition to the earliest time metrics, the actual execution times are defined to capture the real workflow completion process. The real start time
of a task
is determined by the latest completion time of its parent tasks plus the corresponding data transfer delay, as shown in Equation (10). The real finish time
of a task
is then defined as the sum of its actual start time and the minimum execution time, as given in Equation (11). Based on this, the total execution time
of workflow
W is defined as the maximum actual finish time among all tasks, as presented in Equation (12). Finally, the workflow completion time optimization rate
is calculated as the relative improvement between the deadline
D and the actual completion time, as expressed in Equation (13).
4.2. Efficient Workflow Schedule Algorithm (EWSA)
When scheduling a workflow W, the first step is to verify whether the specified deadline D is feasible. If the deadline is infeasible, the scheduling problem has no valid solution and D must be reassigned. Once feasibility is confirmed, the objective becomes minimizing the total execution time of workflow W while satisfying real-time constraints.
As illustrated in
Figure 7, workflow tasks are executed in a hierarchical order, where a task
cannot start until all its parent tasks are completed and the required data have been transferred. For example, task
must wait for tasks
and
to finish and deliver their results before execution. Similarly, the execution and transmission times of tasks in one layer directly affect the scheduling of tasks in the subsequent layer. For instance, the completion of first-layer tasks
and
determines the execution readiness of second-layer tasks
,
, and
.
To reduce waiting time for successor tasks, we adopt a resource-balancing strategy such that the sum of execution and transmission times among tasks in the same layer remains approximately aligned. For example, the execution of task depends on the completion of parent tasks and . To avoid long idle periods, their completion times are balanced to satisfy . This is achieved by allocating more computing resources to tasks with larger workloads so they finish earlier, while assigning fewer resources to smaller tasks to prevent premature completion and reduce unnecessary system occupancy.
Building on this principle, we propose the Efficient Workflow Scheduling Algorithm (EWSA). As outlined in Algorithm 1, the workflow
W is scheduled over the available computing resources of the aircraft platform. The process begins with initialization through the
function (line 2), followed by the computation of the minimum execution time
, data transfer time
, and earliest start time
for each task using Equations (1)–(3). Tasks on the critical path are then identified, and the overall minimum execution time of workflow
W is computed using Equation (9) to determine its schedulability.
| Algorithm 1: Efficient Workflow Schedule Algorithm (EWSA) |
![Mathematics 14 00781 i001 Mathematics 14 00781 i001]() |
When the workflow W is deemed schedulable within its deadline D, the Pre-processing() algorithm (as shown in Algorithm 2) is first applied to optimize the workflow. This procedure updates the minimum execution time , latest finish time , and latest start time of each task node using Equations (1), (7) and (8), and employs the function (line 7) to determine task levels. For tasks at the same level, the algorithm (as shown in Algorithm 3) assigns them to appropriate virtual partitions (VmPartition), thereby generating an initial scheduling plan. Subsequently, the function (lines 13–17) within the scheduling management module executes the actual scheduling, dynamically instantiating the corresponding VmPartition on the aircraft’s computing resources. The execution manager then monitors the task execution, recording the real start time and real finish time . Once a task is completed, the execution manager cooperates with the scheduler to release the allocated resources by destroying the corresponding VmPartition.
During the dynamic creation of VmPartition, resource shortages may occur. In such cases, the configuration of VmPartition must be adapted under the following constraints:
- 1.
The expected finish time of task must not exceed its latest finish time, i.e., ;
- 2.
For all child tasks , it must satisfy that .
The
Pre-processing() algorithm reduces inter-task communication overhead by merging serial task nodes via a queue-based mechanism and updating their dependencies. The
algorithm (as shown in Algorithm 3), on the other hand, maps tasks at the same level to virtual partitions and binds them with task identifiers. It first employs the
function (line 2) to compute the average expected execution time based on Equations (4) and (5), and then uses the
function (line 8) to assign computing resources according to the difference between the expected finish time and expected start time. In cases where
, the expected finish time is appropriately extended, effectively shrinking the allocated resources of the corresponding
VmPartition, thereby ensuring the feasibility and efficiency of the scheduling plan.
| Algorithm 2: Pre-processing(W) |
![Mathematics 14 00781 i002 Mathematics 14 00781 i002]() |
| Algorithm 3: |
![Mathematics 14 00781 i003 Mathematics 14 00781 i003]() |
4.3. Workflow Migration Algorithm (WMA)
The workflow migration algorithm consists of two main components: the resource scanning module and the fault resource handling module. The resource scanning module periodically monitors the status of computing resources through a fixed triggering function. Once a faulty resource is detected, it invokes the fault resource handling module, which executes the migration process to ensure the continuous execution of workflow tasks.
During the migration of a virtual partition (VmPartition) to an alternative computing resource, the system may encounter situations where the available capacity of the target resource is insufficient. To address this issue, the proposed approach adopts a preemptive mechanism when the tasks running on VmPartition belong to the critical path (i.e., the longest execution path) or are assigned special priority. In such cases, some of the tasks occupying the target resource are preempted and suspended, thereby ensuring the successful migration and execution of the current critical task.
The proposed Workflow Migration Algorithm (WMS) serves as the core of the fault resource handling module. It is specifically designed to cope with resource failures during mission execution by migrating tasks from faulty resources to alternative ones, thereby guaranteeing the reliable execution of workflow
W. This algorithm operates in coordination with the resource scanning module: once a failure is detected, the
VmPartition on the faulty resource is passed to the handling module, which executes the migration and reconfiguration process as illustrated in Algorithm 4. In practice, the algorithm traverses all available computing resources (lines 5–8); if a suitable resource
is found, the
VmPartition is directly migrated to
, and its tasks are restarted. If no suitable resource is available, the algorithm applies
(lines 10–14) to select partitions for suspension and add them to a waiting queue. In this study, the function implements two strategies: (i) selecting the partition with the minimum resource usage, or (ii) selecting the partition with the longest task execution time.
| Algorithm 4: |
![Mathematics 14 00781 i004 Mathematics 14 00781 i004]() |
Once tasks release resources upon completion, the fault resource handling module gives priority to scheduling tasks in the waiting queue, thereby reducing delays and maintaining system continuity. Although preemptive migration may result in a longer overall workflow completion time, it ensures reliable task execution under resource failure conditions. Simulation results further demonstrate that in workflows with relatively simple dependency structures, the delay caused by migration is more significant, whereas in more complex workflows, the delay is reduced and may even lead to improved performance in certain cases.
4.4. Computational Complexity Analysis
Let N denote the number of workflow tasks, E the number of dependency edges in the DAG, and R the number of available computing resources. For Algorithm 1 (EWSA), the preprocessing stage traverses each task and dependency once, resulting in a complexity of . The subsequent level-based scheduling performs resource mapping for tasks at each level. In the worst case, all tasks belong to a single level, and the mapping procedure scans all tasks, leading to per level. Since the number of levels is bounded by N, the overall complexity of EWSA is , which can be simplified to for dense workflows. For Algorithm 4 (WMA), each virtual partition is checked against all available computing resources to identify feasible migration targets. Therefore, the migration procedure has a worst-case complexity of , where P is the number of virtual partitions (with ). This yields an upper bound of . Both algorithms operate in polynomial time and are suitable for large-scale task scheduling and resource management scenarios. Moreover, EWSA is designed as a lightweight heuristic without iterative optimization loops, while WMA is triggered only upon resource failures, which further limits its runtime overhead in practical deployments.
To further assess the practicality of the proposed algorithms, we compare their computational complexity with representative categories of existing methods discussed in
Section 2, as shown in
Table 1. Learning-based scheduling approaches, such as DRL- or GNN-assisted methods, rely on iterative training and online inference of deep neural networks, which introduce non-negligible computational overhead and may limit real-time applicability [
9,
10]. Metaheuristic-based schedulers, including GA-, PSO-, and ACO-based methods, typically perform population-based iterative searches, resulting in computational complexity on the order of
or higher, where
G denotes the number of iterations [
12,
13,
14]. In contrast, the proposed EWSA and WMA operate in polynomial time with worst-case complexities of
, respectively, where
N is the number of tasks and
R is the number of computing resources. Moreover, unlike static avionics scheduling methods that rely on offline configuration and lack runtime adaptability [
3,
16], the proposed framework supports efficient online scheduling and migration, making it suitable for large-scale, real-time DIMA-oriented MEC systems.