Scheduling and analysis of real-time task graph models with nested locks

https://doi.org/10.1016/j.sysarc.2020.101969Get rights and content

Abstract

Locking protocol is a crucial component in scheduling of real-time systems. The digraph real-time task model (DRT) is the state-of-the-art graph-based task model, which is a generalization of most previous real-time task models. To our best knowledge, the only work addressing resource sharing problem in DRT task model proposes a resource sharing protocol, called ACP, as well as a scheduling strategy EDF+ACP. Although EDF+ACP is optimal for scheduling DRT tasks with non-nested resource access, it cannot handle the situation of nested resource accesses. In this paper, we propose a new protocol, called N-ACP, by modifying ACP to manage nested resource accesses in task graph models. We apply N-ACP to EDF scheduling to obtain a new scheduling strategy EDF+N-ACP. We develop schedulability analysis techniques for EDF+N-ACP and evaluate its performance by a widely-used quantitative metrics speedup factor. We derive its speedup factor as a function of the maximal nesting level of resource accesses in the system.

Introduction

Processes in real-time systems may contain conditional codes, where the branch to be taken is determined by external events at run time, and the timing requirement along each branch is different. These systems are usually modeled by task graph [1], [2], [3], [4], [5], that is a directed graph with vertices and edges which represent code blocks and control flow, respectively. The task graph models can not only precisely capture the non-deterministic branching behavior of the processes but also can be efficiently analyzed.

However, a common limitation of existing efforts on real-time task graph models is that they all assume different tasks in the system are completely independent of each other, which is not usually employed in practice. In real-time systems, different tasks often compete for shared resource, such as shared peripheral devices or global data structures. To guarantee the timing correctness in system design, resource sharing problem must be considered in real-time task graph models. The only known work addressing the resource sharing problem in general task graph models is [6]. It develops a new locking protocol ACP to manage non-nested resource access for the DRT (digraph real-time) task model which is the most general model among all the real-time task graph models that are known to be tractable. Unfortunately, ACP can only handle non-nested resource access. The scheduling and analysis of general task graph models with nested shared resource access is still open.

In this paper, we develop new techniques to handle the nested resource sharing problem in DRT task model. A new protocol is proposed, called N-ACP, by modifying ACP for DRT task model. Also, we apply this protocol to EDF scheduling and obtain a new scheduling strategy EDF+N-ACP. Furthermore, we develop the schedulability analysis techniques for EDF+N-ACP and prove that if the resource accesses level is at most Z, then the EDF+N-ACP has a speedup factor1 s, which satisfies sZ+1j=0Zsj, where j is the resource access level. The case of non-nested resource access is a special case of our function with Z=1, for which the speedup factor is 1+52. This result is exactly consistent with the speedup factor of EDF+ACP in [6]. Since DRT generalizes other models [1], [3], [4], all the results in this paper are directly applicable to those more restricted models.

Section snippets

Related work

Resource sharing problems have been studied in plentiful literature for periodic and sporadic task systems. The Priority Inheritance Protocol (PIP) [7] designed by Sha, Rajkumar, and Lehoczky is the first proposed real-time locking protocol addressing the problem in fixed priority scheduling. Based on PIP, there are several optimal protocols for uniprocessor real-time task systems including Priority Ceiling Protocol (PCP) [7] and Stack Resource Policy (SRP) [8]. PCP also works with

Model and definition

In this section, we first introduce the DRT task model and its feasibility analysis. Then, we define the elements of our sharing resource model and extend them to DRT task model. Finally, we give the definition of speedup factor which is used to evaluate the “quality” of a scheduling algorithm quantitatively.

EDF+ACP for task system

In this section, we first briefly introduce the Absolute-time Ceiling Protocol (ACP) in [6] which is used to handle the non-nested resource sharing in task graph systems. Then we show that directly applying EDF+ACP to DRT task model with nested shared resources leads to inaccurate results.

In the following, we present the scheduling rules of EDF+ACP. The data structures are defined in the form of functions with respect to time t. Because we implement EDF+ACP such that these data structures only

N-ACP: Nested Absolute-time Ceiling Protocol

To handle the problem of general task graph models with nested shared resource, in this section we present a new protocol, the Nested Absolute-time Ceiling Protocol (N-ACP). We redefine the concept of “ceiling” for nested resource access. Later, we present a sufficient schedulability test for EDF scheduling with N-ACP in Section 6.

Based on the discussion in Section 4, the challenge in scheduling tasks with nested resource is before the ceiling stops the blocking caused by a resource Rx, another

Schedulability analysis

We develop the schedulability analysis for EDF+N-ACP in this section. Our analysis is presented under a general form: assuming the system runs an s-speed machine. Therefore we can directly use the schedulability test conditions to derive the speedup factor of EDF+N-ACP in Section 7.

We first introduce the framework we use to derive the sufficient schedulability test. We assume that the task system τ is unschedulable by EDF+N-ACP on an s-speed machine and let td be the earliest time instant when

Speedup factor

In this section, we first present the speedup factor of EDF + N-ACP with nested resource access, then present its proof.

Theorem 2

Any task set τ with the maximal access level Z is feasible on a 1-speed machine, is also deemed to be schedulable by Theorem 1 on a s-speed machine if sZ+1j=0Zsj.

By Theorem 2, we illustrate the speedup factor of different maximal access level Z in Fig. 6. We can see that the non-nested shared resource is a case in (8) with Z=1, which has a speedup factor of 1+52. This result

Conclusions

In this paper we propose a new protocol called N-ACP, by a modification of proposed ACP, to analyze nested resource sharing problem for real-time task graph systems. Due to the branching structures in such graphs and the nested shared resource, this problem is significantly more difficult. We also present EDF+N-ACP scheduling strategy with real-time graph model, for which we develop the schedulability analysis and derive the speedup factor as a function of the maximal nesting level of resource

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgment

This work is supported in part by the National Natural Science Foundation of China (NSFC) under Grant 61772123.

He Du is currently a Ph.D. candidate at School of Computer Science and Engineering, Northeastern University. She received the Bachelor degree from Northeastern University, Shenyang, China, in 2015. Her research interests focus on parallelism program analyze and multiprocessor real-time scheduling.

References (18)

  • EkbergP. et al.

    An optimal resource sharing protocol for generalized multiframe tasks

    J. Log. Algebr. Methods Program.

    (2015)
  • BaruahS.

    The non-cyclic recurring real-time task model

  • BaruahS. et al.

    Generalized multiframe tasks

    Real-Time Syst.

    (1999)
  • BaruahS.K.

    Dynamic-and static-priority scheduling of recurring real-time tasks

    Real-Time Syst.

    (2003)
  • MoyoN.T. et al.

    On schedulability analysis of non-cyclic generalized multiframe tasks

  • StiggeM. et al.

    The digraph real-time task model

  • GuanN. et al.

    Resource sharing protocols for real-time task graph systems

  • ShaL. et al.

    Priority inheritance protocols: An approach to real-time synchronization

    IEEE Trans. Comput.

    (1990)
  • BakerT.P.

    Stack-based scheduling of realtime processes

    Real-Time Syst.

    (1991)
There are more references available in the full text version of this article.

Cited by (0)

He Du is currently a Ph.D. candidate at School of Computer Science and Engineering, Northeastern University. She received the Bachelor degree from Northeastern University, Shenyang, China, in 2015. Her research interests focus on parallelism program analyze and multiprocessor real-time scheduling.

Xu Jiang has received his BS degree in computer science from Northwestern Polytechnical University, China in 2009, received the MS degree in computer architecture from Graduate School of the Second Research Institute of China Aerospace Science and Industry Corporation, China in 2012, and Ph.D. from Beihang University, China in 2018. Currently, he is working in Northeastern University, China. His research interests include real-time systems, parallel and distributed systems and embedded systems.

Mingsong Lv received his Ph.D. degree in computer science from Northeastern University, China. He is currently an associate professor of Northeastern University, China. His current research interests include timing analysis of real-time systems and intermittent computing.

Tao Yang is currently a Ph.D. candidate in Northeastern University, Shenyang, China. He is good at system implementation. His current research interests include multiprocessor real-time scheduling and operating system architecture.

Wang Yi received his Ph.D. degree in Chalmers University of Technology, Gotheborg, Sweden in 1991. He is currently a Chair Professor in Uppsala University, Uppsala, Sweden. He is also the Head of School of Computer Science and Engineering, Northeastern University, Shenyang, China. His research interests include modeling and validation of timed systems, model-checking of real-time systems, timing analysis of embedded software on multicores and multiprocessor real-time scheduling.

View full text