Abstract
In modern multicore real-time systems, parallel tasks are frequently modeled as Directed Acyclic Graphs (DAGs) and managed via federated scheduling. However, accessing shared resources under this model often leads to significant processor underutilization when using traditional local locking protocols. This paper introduces DPCP-p, the first distributed locking protocol specifically designed for parallel real-time tasks. By employing a remote execution framework where resource requests are handled by dedicated agents, DPCP-p minimizes processor waste and ensures a high-priority request is blocked by at most one lower-priority request. Experimental results demonstrate that DPCP-p significantly outperforms existing state-of-the-art protocols in terms of schedulability.
Introduction
Real-time applications are increasingly parallel, consisting of multiple sub-jobs with complex dependencies. These are typically represented as Directed Acyclic Graphs (DAGs). Federated scheduling is a common approach for such workloads, where "heavy" tasks—those with utilization exceeding a single core—are allocated a dedicated set of processors. A major challenge in this environment is managing access to shared resources (e.g., sensors, shared memory). Existing locking protocols often rely on local execution of critical sections, which can cause processors to sit idle while waiting for locks, leading to substantial resource waste—sometimes nearly half the processing capacity.
The DPCP-p Protocol
DPCP-p extends the Distributed Priority Ceiling Protocol (DPCP) to handle the parallel structure of DAG tasks. The protocol is built on several key components:
Remote Execution Framework
Unlike local locking, DPCP-p partitions global resources to specific processors. When a task vertex requires a resource, it does not execute the critical section itself. Instead, it suspends and sends a request to a "resource agent" on the designated processor via a Remote Procedure Call (RPC) mechanism. The task remains suspended until the agent completes the request.
Priority Ceiling Mechanism
To prevent uncontrolled priority inversion, DPCP-p uses priority ceilings. A resource request is only granted if its priority exceeds the "processor ceiling"—the highest priority ceiling of all resources currently locked on that processor. This mechanism, combined with a hybrid queue structure (Ready, Suspended, and Global Resource queues), ensures predictable execution and isolates contention.
Schedulability Analysis and Key Insights
A fundamental theoretical contribution of this work is the "One-Block" property: under DPCP-p, any single resource request is blocked by at most one lower-priority request. This property is crucial for deriving tight timing guarantees required by safety-critical systems.
The authors developed a formal Worst-Case Response Time (WCRT) analysis using fixed-point iteration. This analysis accounts for four types of delays:
- Inter-task blocking: Delays from higher-priority tasks.
- Intra-task blocking: Delays between sub-jobs of the same task.
- Intra-task interference: Competition for processors within a task's dedicated set.
- Agent interference: Delays at the remote resource processor.
Evaluation
The protocol was evaluated using synthesized task sets generated with the RandFixedSum and Gregory-Erdos-Renyi algorithms, simulating platforms with 8, 16, and 32 cores. DPCP-p was compared against two state-of-the-art protocols: SPIN-SON and LPP.
Key findings include:
- Superior Schedulability: The version of the protocol using exact path enumeration (DPCP-p-EP) consistently scheduled more task sets than competitors.
- Dominance: DPCP-p-EP outperformed or matched other protocols in over 99% of the 216 tested scenarios.
- Resilience: The performance gap widened as resource contention increased, demonstrating the efficiency of the remote execution model over local spin-locks, which struggle under heavy loads.
Conclusion and Future Work
DPCP-p addresses a critical gap in real-time scheduling by providing an efficient distributed locking mechanism for parallel DAG tasks. While highly effective for "heavy" tasks, future work remains to optimize the protocol for "light" tasks (utilization $< 1$) and to support nested critical sections. Additionally, exploring Linear Programming (LP)-based analysis could reduce the computational overhead associated with the current exact path enumeration method.
Summary updated