Skip to main content
Log in

Precautious-RM: a predictable non-preemptive scheduling algorithm for harmonic tasks

  • Published:
Real-Time Systems Aims and scope Submit manuscript

Abstract

A major requirement of many real-time embedded systems is to have time-predictable interaction with the environment. More specifically, they need fixed or small sampling and I/O delays, and they cannot cope with large delay jitters. Non-preemptive execution is a known method to reduce the latter delay; however, the corresponding scheduling problem is NP-Hard for periodic tasks. In this paper, we present Precautious-RM as a predictable linear-time online non-preemptive scheduling algorithm for harmonic tasks which can also deal with the former delay, namely sampling delay. We derive conditions of optimality of Precautious-RM and show that satisfying those conditions, tight bounds for best- and worst-case response times of the tasks can be calculated in polynomial-time. More importantly, response time jitter of the tasks is analyzed and it is proven that under specific conditions, each task has either one or two values for response time, which leads to improving the predictability of the system interaction with the environment. Simulation results demonstrate efficiency of Precautious-RM in increasing accuracy of control applications.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22

Similar content being viewed by others

References

  • Al-Sheikh A, Brun O, Hladik PE, Prabhu BJ (2011) A best-response algorithm for multiprocessor periodic scheduling. In: Euromicro Conference on Real-Time Systems (ECRTS), pp 228–237

  • Andersson B, Tovar E (2009) The utilization bound of non-preemptive rate-monotonic scheduling in Controller Area Networks is 25 %. In: IEEE International Symposium on Industrial Embedded Systems (SIES), pp 11–18

  • Anssi S, Kuntz S, Gérard S, Terrier F (2013) On the gap between schedulability tests and an automotive task model. J Syst 59(6):341–350

    Google Scholar 

  • Bastoni A (2010) Cache-related preemption and migration delays: empirical approximation and impact on schedulability. In: International Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT), pp 33–44

  • Bate I, Burns A, McDermid J, Vickers A (1996) Towards a fixed priority scheduler for an aircraft application. In: Euromicro Workshop on Real-Time Systems (EWRTS), pp 34–39

  • Bini E, Cervin A (2008) Delay-aware period assignment in control systems. In: IEEE Real-Time Systems Symposium (RTSS), pp 291–300

  • Busquets-Mataix JV, Serrano JJ, Ors R, Gil P, Wellings A (1996) Using harmonic task-sets to increase the schedulable utilization of cache-based preemptive real-time systems. In: International Workshop on Real-Time Computing Systems and Applications (RTCSA), pp 195–202

  • Buttazzo GC, Cervin A (2007) Comparative assessment and evaluation of jitter control methods. In: International Conference on Real-Time and Network Systems, pp 163–172

  • Buttazzo GC, Bertogna M, Yao G (2013) Limited preemptive scheduling for real-time systems: a survey. IEEE Trans Ind Inf 9(1):3–15

    Article  Google Scholar 

  • Byl K (2012) Balancing the inverted pendulum. Tech. rep., University of California, Santa Barbara. http://www.ece.ucsb.edu/courses/ECE147/147B_W12Byl/lab/lab3_v2.pdf. Accessed 28 May 2014

  • Cai Y, Kong MC (1996) Nonpreemptive scheduling of periodic tasks in uni- and multiprocessor systems. Algorithmica 15(6):572–599

    Article  MATH  MathSciNet  Google Scholar 

  • Davis R, Burns A, Bril R, Lukkien J (2007) Controller area network (CAN) schedulability analysis: refuted, revisited and revised. Real-Time Syst 35(3):239–272

    Article  Google Scholar 

  • Deogun JS, Kong MC (1986) On periodic scheduling of time-critical tasks. In: IFIP World Computer Congress, pp 791–796

  • DEVS (2014) Discrete-event system simulator (DEVS-suite). Arizona Center of Integrative Modeling and Simulation, Arizona State University. http://acims.asu.edu/software/devs-suite. Accessed 28 May 2014

  • Eisenbrand F, RothvoßT (2008) Static-priority real-time scheduling: response time computation is NP-hard. In: IEEE Real-Time Systems Symposium (RTSS), pp 397–406

  • Eisenbrand F, Rothvoß T (2010) EDF-schedulability of synchronous periodic task systems is coNP-hard. In: Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) Philadelphia, pp 1029–1034

  • Ekelin C (2006) Clairvoyant non-preemptive EDF scheduling. In: Euromicro Conference on Real-Time Systems (ECRTS) pp 23–32

  • Eker J, Hagander P, Arzen KE (2000) A feedback scheduler for real-time control tasks. Control Eng Pract 8(12):1369–1378

    Article  Google Scholar 

  • Fu Y, Kottenstette N, Chen Y, Lu C, Koutsoukos XD, Wang H (2010) Feedback thermal control for real-time systems. In: IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pp 111–120

  • Georges L, Mühlethaler P, Rivierre N (2000) A few results on non-preemptive real-time scheduling. Tech. rep., INRIA Research, Report nRR3926

  • Han CC, Tyan HY (1997) A better polynomial-time schedulability test for real-time fixed-priority scheduling algorithms. In: IEEE Real-Time Systems Symposium (RTSS), pp 36–45

  • Jeffay K, Stanat DF, Martel CU (1991) On non-preemptive scheduling of period and sporadic tasks. In: IEEE Real-Time Systems Symposium (RTSS), pp 129–139

  • Kuo TW, Mok A (1991) Load adjustment in adaptive real-time systems. In: IEEE Real-Time Systems Symposium (RTSS), pp 160–170

  • Lam J (2012) Control of an inverted pendulum. Tech. rep., University of California, Santa Barbara. www.ece.ucsb.edu/roy/student_projects/Johnny_Lam_report_238.pdf. Accessed 28 May 2014

  • Li H, Sweeney J, Ramamritham K, Grupen R, Shenoy P (2003) Real-time support for mobile robotics. In: IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pp 10–18

  • Li W, Kavi K, Akl R (2007) A non-preemptive scheduling algorithm for soft real-time systems. Comput Electr Eng 33(1):12–29

    Article  MATH  Google Scholar 

  • Liu CL, Layland JW (1973) Scheduling algorithms for multiprogramming in a hard-real-time environment. J ACM 20(1):46–61

    Article  MATH  MathSciNet  Google Scholar 

  • Liu D, Hu XS, Lemmon MD, Ling Q (2003) Firm real-time system scheduling based on a novel QoS constraint. In: IEEE Real-Time Systems Symposium (RTSS), pp 320–333

  • Marouf M, Sorel Y (2010) Schedulability conditions for non-preemptive hard real-time tasks with strict period schedulability analysis. In: International Conference on Real-Time and Network Systems, pp 50–58

  • Marti P, Fuertes JM, Fohler G, Ramamritham K (2001) Jitter compensation for real-time control systems. In: IEEE Real-Time Systems Symposium (RTSS), pp 39–48

  • Marti P, Fuertes JM, Fohler G, Ramamritham K (2002) Improving quality-of-control using flexible timing constraints: Metric and scheduling issues. In: IEEE Real-Time Systems Symposium (RTSS), pp 91–100

  • Nasri M, Kargahi M (2012) A method for improving delay-sensitive accuracy in real-time embedded systems. In: IEEE International Conference on Embedded and RealTime Computing Systems and Applications (RTCSA), pp 378–387

  • Nasri M, Kargahi M, Mohaqeqi M (2012) Scheduling of accuracy-constrained real-time systems in dynamic environments. IEEE Embed Syst Lett 4(3):61–64

    Article  Google Scholar 

  • Nawrocki JR, Czajka A, Complak W (1998) Scheduling cyclic tasks with binary periods. Inf Process Lett 65(4):173–178

    Article  MathSciNet  Google Scholar 

  • Nilsson JO, Skog I, Handel P (2010) Joint state and measurement time-delay estimation of nonlinear state space systems. In: International Conference on Information Sciences Signal Processing and their Applications (ISSPA), pp 324–328

  • Park M (2007) Non-preemptive fixed priority scheduling of hard real-time periodic tasks. In: International Conference on Computational Science, pp 881–888

  • Piaggio M, Sgorbissa A, Zaccaria R (2000) Preemptive versus non-preemptive real-time scheduling in intelligent mobile robotics. J Exp Theor Artif Intell 12(2):235–245

    Article  MATH  Google Scholar 

  • Shih CS, Gopalakrishnan S, Ganti P, Caccamo M, Sha L (2003) Scheduling real-time dwells using tasks with synthetic periods. In: IEEE Real-Time Systems Symposium (RTSS), pp 210–219

  • Wu Y, Bertogna M (2009) Improving task responsiveness with limited preemptions. In: IEEE Emerging Technologies and Factory Automation (EFTA), pp 1–8

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mehdi Kargahi.

Appendix

Appendix

Lemma 4

Suppose a non-preemptive task set \(T\) consistent with Conditions (1), (2) and (3); the worst-case response time of task \(T_n\) follows (4). For task \(T_{n-1}\), if the processor is idle at the release of \(T_{n-1}\), its response time will be \(c_n+c_{n-1}\) according to Precautious-RM, and also there will be an empty interval with length \(p_n-c_n\) before the third release of \(T_n\). Otherwise, if at the release of task \(T_{n-1}\), the processor is busy by task \(T_i, 1 \le i< n-1\), the response time of \(T_{n-1}\) will be bounded by \(p_n+c_n+c_{n-1}\).

Proof

As shown in Line 4 of Algorithm 1, each task is scheduled only if it does not cause the next release of task \(T_n\) to miss its deadline. Hence, none of the instances of \(T_n\) will miss their deadline because of blocking caused by a low priority task. However, the WCRT of \(T_n\) is bounded by its period since in the cases where the execution time of a task is equal to \(2(p_n - c_n)\), the latest \(T_n\) has to be scheduled at the end of its period.

According to the definition of harmonic tasks in Sect. 2, on release of \(T_{n-1}\), all other tasks with periods smaller than \(T_{n-1}\) are also released. In our case, one instance of \(T_n\) is released simultaneously with \(T_{n-1}\). We call it the first \(T_n\). If the processor is idle at the release time of \(T_{n-1}\) (as shown in Fig. 23), this task can be scheduled right after the first \(T_n\) and its response time will be \(c_n+c_{n-1}\) which is definitely smaller than (4). Besides, since it has been executed before the third release of task \(T_n\), then an empty interval with length \(p_n-c_n\) will be created after finish of the third \(T_n\).

Fig. 23
figure 23

Schedule of two tasks \(T_n\) and \(T_{n-1}\), when the processor is idle

Fig. 24
figure 24

Schedule of two tasks \(T_n\) and \(T_{n-1}\), when the processor is busy

Moreover, if at the release time of \(T_{n-1}\), the processor is busy by task \(T_i\), \(1 \le i < n-1\), when it becomes idle again, Precautious-RM will select the first \(T_n\), since it has the highest priority. This situation has been shown in Fig. 24. In the worst-case, when the first \(T_n\) is finished, \(T_{n-1}\) cannot fit into the remaining interval according to Line 4 of Algorithm 1; consequently, an idle time will be inserted until release of the second \(T_n\). At that time, the algorithm will select the second \(T_n\) but when it is finished at time \(p_n+c_n\), the execution of \(T_{n-1}\) is definitely started because according to Line 4 of the algorithm, the previous executed task has been \(T_n\). In this case, the response time of \(T_{n-1}\) will be \(p_n+c_n+c_{n-1}\) which is smaller than \(3p_n-c_n\) since \(p_n+c_n+c_i \le p_n+c_n+2(p_n-c_n ) \le 3p_n-c_n\). Thus, the proof is complete. \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Nasri, M., Kargahi, M. Precautious-RM: a predictable non-preemptive scheduling algorithm for harmonic tasks. Real-Time Syst 50, 548–584 (2014). https://doi.org/10.1007/s11241-014-9203-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11241-014-9203-y

Keywords

Navigation