Polynomial Time Schedulability Test for Periodic Non-Preemptive 2-Task System

https://doi.org/10.1016/j.ipl.2019.105867Get rights and content

Highlights

  • Schedulibility condition is given for two periodic tasks on a single processor.

  • Tasks release at the same time.

  • Tasks are scheduled non-preemptively.

  • Work conserving model is considered.

  • Proposed condition can be evaluated in polynomial time.

Abstract

Non-preemptive scheduling of tasks is often preferred in safety-critical systems because of its simplicity in implementation. But, one of the major issues with non-preemptive scheduling is that no known polynomial time schedulability condition exists. The general problem of schedulability of a set of tasks on a single processor under such scheme is known to be NP-Hard [1]. People have attempted to propose different sufficient or necessary conditions for schedulability of a set of tasks under various constrained scenarios. In this work, we explore schedulability condition for 2-task systems when the tasks are scheduled non-preemptively and periodically using work conserving model of execution. We assume that the tasks are released at the same point of time initially. We show that the proposed condition for 2-task systems can be evaluated in polynomial time.

Introduction

Non-preemptive scheduling is often chosen in safety-critical systems because of its simplicity, easy implementation, zero context switch overhead effortless handling mutual exclusion of shared resources. However, it has drawn less attention in the literature. The general problem of earliest deadline first (EDF) scheduling of non-preemptive tasks is known to be NP-Hard [1], [2]. There have been several attempts to propose necessary or sufficient conditions for non-preemptive real-time tasks under different restricted scenarios. In this work, we explore schedulability condition for 2-task systems that can be evaluated in polynomial time.

Earliest deadline first [3] is one of the most popular schemes for online task scheduling. In such scheme, priority of a task depends on the deadline. Based on preemption policy, scheduling scheme can be classified as non-preemptive or preemptive. In non-preemptive scheduling a running task executes till completion, it cannot be interrupted in between. Such constraint is not therefor preemptive scheduling. Scheduling strategies can also be categorized as work-conserving or non-work-conserving [6]. In work-conserving scheduling, a processor can never remain idle if there is a task ready for execution. Non-work conserving model allows the processor to be in the idle state even if there is a task ready for execution. This work considers non-preemptive and work-conserving scheduling of tasks.

In the literature, only a handful number of works deal with schedulability condition for non-preemptive real-time tasks on uniprocessor. We mention some of those works here. One of the early works [2] proved that scheduling of non-preemptive real-time tasks is NP-Hard problem under known initial release offset, however, it is optimal for sporadic tasks. In the same work, a sufficient condition for schedulability test for non-preemptive Earliest-Deadline First (NP-EDF) has been proposed and it has pseudo-polynomial time complexity. The schedulability condition is defined as follows. A set of periodic tasks T, sorted in non-decreasing order of their periods, are schedulable if utilization U1 and ∀i, 1<in; ∀L, P1<L<Pi:LCi+j=1i1L1PjCj where Pj and Cj denote the period and execution time of the jth task. The authors also proved that NP-EDF is the optimal scheduling algorithm for work-conserving periodic and sporadic tasks for arbitrary release time.

A sufficient condition for schedulability was proposed in [4] and proved that if the condition is satisfied then real-time tasks are schedulable under EDF and Rate Monotonic (RM) policies. It is given asCiP1×(1Ui1) with Ui1=j=1i1Cj/Pj,U0=0.

There have been a few works which consider non-preemptive scheduling of tasks on multiprocessor. In [5], a methodology for scheduling of tasks in multiprocessor environment is proposed where schedulability on individual processor is determined bygcd(Pi,Pj)Ci+Cj for two non-preemptive tasks with arbitrary release time where gcd is greatest common divisor. In [7], the author proposed a sufficient condition for schedulability for global NP-EDF periodic and sporadic tasks set. It showed that a task set is NP-EDF schedulable on m processors ifVsum(τ)m(m1)Vmax(τ) where Vsum(τ)=τiτVi,Vmax(τ)=maxτiτViVi={CiDiCmax,Di>Cmax,DiCmax The only disadvantage is that a task set with arbitrarily low utilization will be rejected if CmaxDmin, where Cmax is the maximal execution time among all tasks, Di is the deadline of ith task and Dmin is the minimal Di among all the tasks.

There are a few other works on non-preemptive task scheduling. We briefly mention some of those. A schedulability analysis was presented for non-preemptive tasks with strict periods in [8]. The same work has been extended in [9], where schedulability condition for non-preemptive harmonic tasks with strict periods was proposed. In [10], a method is proposed that determines the feasibility of non-preemptive task set by analyzing of schedulability of lowest priority task at common scheduling points generated by all higher priority tasks in the task set. In [11] an exact and sustainable schedulability analysis for a set of non-preemptive tasks for both work-conserving and non-work-conserving fixed-priority policy has been given where tasks have varying release and execution time. Although the proposed approach performs well for reasonable size inputs, however, the inherent complexity is exponential as it depends on the hyperperiod of the tasks. This work has extended for global multiprocessor scheduling in [12].

Non-preemptive scheduling, often chosen for safety critical systems, can perform better from its preemptive counterpart as the former lacks in context switch overhead and handles mutual exclusion of shared resources more comfortably. It would be interesting to explore schedulability analysis when we have two tasks only. To the best of our knowledge, we have not seen any such results in the literature. Therefore, in this work, we propose a polynomial time schedulability test for a 2-task system where the tasks are periodic, non-preemptive, scheduled using work conserving EDF policy and have zero initial release offset.

The organization of the paper is as follows. In the next section we present motivating scenario behind this work. Section 3 presents the condition for schedulability, examples and complexity analysis. Finally paper is concluded in Section 4.

Section snippets

Motivating scenarios

We present a few scenarios with 2-task systems where some of the existing conditions fail to predict correctly the schedulability of the tasks. We represent a task as (Pi,Ci) where Pi denotes period and Ci denotes execution time. We assume that the first instance of both the tasks are released at the same time. We examine some of the schedulability conditions as mentioned in the last section. If the condition is proposed for n tasks, we will restrict it for 2 tasks only. If some conditions have

Polynomial time schedulability test

We consider a system which consists of two independent periodic real-time tasks (T1 and T2 say) which are scheduled in non-preemptive manner. We assume the system to be work conserving and both the tasks are released at t=0. We consider that the deadlines are determined by their period. Without loss of generality, we consider P1<P2. The schedulability condition when P1=P2 holds, is very simple and can be determined using utilization value. The system utilization is denoted as U=i=1i=2ui where u

Conclusion

In this work, we presented a polynomial time schedulability test for 2-task system where the tasks are periodic, non-preemptive in nature. The task is scheduled using work conserving EDF policy and assumed to be released at the same time. It would be interesting to explore schedulability condition for 2-task system with arbitrary release points. We keep this as our future work.

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.

References (12)

  • Y. Cai et al.

    Nonpreemptive scheduling of periodic tasks in uni-and multiprocessor systems

    Algorithmica

    (1996)
  • K. Jeffay et al.

    On non-preemptive scheduling of period and sporadic tasks

  • C.L. Liu et al.

    Scheduling algorithms for multiprogramming in a hard-real-time environment

    J. ACM

    (1973)
  • K. Lenac et al.

    Sufficient condition for real-time non-preemptive scheduling of interactive multimedia tasks

  • J. Korst et al.

    Periodic multiprocessor scheduling

  • M. Nasri et al.

    On the optimality of RM and EDF for non-preemptive real-time harmonic tasks

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

Cited by (0)

View full text