Skip to main content

Advertisement

Log in

Scheduling and energy savings for small scale embedded FreeRTOS-based real-time systems

  • Published:
Design Automation for Embedded Systems Aims and scope Submit manuscript

Abstract

Evaluating the effectiveness of system scheduling and energy savings in embedded real-time systems with low-computing resources is the problem addressed in this paper. In such systems, the characteristics of the implemented scheduling policy play a relevant role in both schedulability and energy consumption. Ideally, the scheduling policy should provide higher schedulability bounds and low runtime overheads, allowing for better usage of available slack in the schedule for energy saving purposes. Due its low overhead and simple implementation, the usual scheduling policy employed in real-time embedded systems is based on fixed priority scheduling (FPS). Under this scheme, as the priority of all system tasks are assigned at design time, a simple priority vector suffices to indicate the current ready task to run. System schedulability, however, is usually lower than that provided by dynamic priority scheduling (DPS) according to which task priorities are assigned at runtime. Managing dynamic priority queues incurs higher overheads, though. Deciding whether DPS is a viable choice for such embedded systems requires careful evaluation. We evaluate two implementations of Earliest Deadline First (EDF), a classical DPS policy, implemented in FreeRTOS running on an ARM-M4 architecture. EDF is compared against an optimal FPS, namely Rate-Monotonic (RM). Further, two mechanisms for energy savings are described. They differ by the manner they compute the slack available in an EDF schedule, statically (SS-EDF) or dynamically (DS-EDF). These two approaches are experimentally evaluated. Results indicate that EDF can be effectively used for energy savings.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Notes

  1. Available on https://github.com/gesseoliveira/ES-EDF.

References

  1. Audsley N, Burns A, Richardson M, Tindell K, Wellings A (1993) Applying new scheduling theory to static priority pre-emptive scheduling. Softw Eng J 8(5):284–292

    Article  Google Scholar 

  2. Awan A, Meumeu Yomsi P, Petters S (2013) Optimal procrastination interval for constrained deadline sporadic tasks upon uniprocessors . https://doi.org/10.1145/2516821.2516837

  3. Awan MA, Petters SM (2011) Enhanced race-to-halt: a leakage-aware energy management approach for dynamic priority systems. In: 2011 23rd Euromicro conference on real-time systems. pp. 92–101 . https://doi.org/10.1109/ECRTS.2011.17

  4. Awan MA, Yomsi PM, Petters SM (2013) Optimal procrastination interval for constrained deadline sporadic tasks upon uniprocessors. In: RTNS ’13

  5. Bambagini M, Marinoni M, Aydin H, Buttazzo G (2016) Energy-aware scheduling for real-time systems: a survey. ACM Trans Embedd Comp Sys 15(1):1–34

    Article  Google Scholar 

  6. Barry R (2016) Mastering the FreeRTOS real time kernel. Wiley, Hoboken

    Google Scholar 

  7. Barry R (2020) License FreeRTOS , https://www.freertos.org/a00114.html

  8. Baruah SK, Rosier LE, Howell RR (1990) Algorithms and complexity concerning the preemptive scheduling of periodic, real-time tasks on one processor. Real-Time Sys 2(4):301–324

    Article  Google Scholar 

  9. Benini L, Micheli GD (1999) Dynamic power management of electronic systems. pp 263–292. Springer, Netherlands https://doi.org/10.1007/978-94-011-4698-2_8

  10. Bhatti MK, Belleudy C, Auguin M (2010) An inter-task real time dvfs scheme for multiprocessor embedded systems. In: 2010 Conference on design and architectures for signal and image processing (DASIP). pp 136–143 https://doi.org/10.1109/DASIP.2010.5706257

  11. Borin L, Lima G, Castro M, Plentz P (2021) Dynamic power management under the run scheduling algorithm: a slack filling approach. Real-Time Sys. https://doi.org/10.1007/s11241-021-09367-2

    Article  Google Scholar 

  12. Buttazzo G (2006) Efficient EDF implementation for small embedded systems. In: Workshop on operating systems platforms for embedded real-time applications

  13. Buttazzo GC (2005) Rate monotonic vs. EDF: judgment day. Real-Time Sys 29(1):5–26

    Article  MATH  Google Scholar 

  14. Buttazzo GC (2011) Hard real-time computing systems, 3rd edn. Springer, US

    Book  MATH  Google Scholar 

  15. Cho KM, Liang CH, Huang JY, Yang CS (2011) Design and implementation of a general purpose power-saving scheduling algorithm for embedded systems. In: IEEE International conference on signal processing, communications and computing. pp. 1–5

  16. Cormen TH, Leiserson CE, Rivest RL, Stein C (2009) Introduction to algorithms. Massachusetts institute of technology, 3rd edn

  17. Devices A (2021) Ltc2944 datasheet , https://www.analog.com/media/en/technical-documentation/data-sheets/2944fa.pdf

  18. Digalwar M, Mohan S, Raveendran BK (2013) Energy aware real time scheduling algorithm for mixed task set. In: 2013 international conference on advanced electronic systems (ICAES). pp. 325–327 . https://doi.org/10.1109/ICAES.2013.6659421

  19. Emberson P, Stafford R, Davis R (2010) Techniques for the synthesis of multiprocessor tasksets. In: WATERS. pp. 6–11

  20. Faggioli D, Trimarchi M, Checconi F (2009) An implementation of the earliest deadline first algorithm in linux. In: ACM symposium on applied computing. pp. 1984–1989

  21. Fisher N, Chen JJ, Wang S, Thiele L (2011) Thermal-aware global real-time scheduling and analysis on multicore systems. J Sys Archit 57(5), 547–560 https://doi.org/10.1016/j.sysarc.2010.09.010,https://www.sciencedirect.com/science/article/pii/S138376211000127X, special Issue on Multiprocessor Real-time Scheduling

  22. Jejurikar R, Pereira C, Gupta R (2004) Leakage aware dynamic voltage scaling for real-time embedded systems. In: Proceedings 41st design automation conference, 2004. pp. 275–280 https://doi.org/10.1145/996566.996650

  23. Kase R (2016) Efficient scheduling library for FreeRTOS. Master’s thesis, KTH Royal Institute of Technology, Stockholm, Sweden

  24. Kim N, Austin T, Baauw D, Mudge T, Flautner K, Hu J, Irwin M, Kandemir M, Narayanan V (2003) Leakage current: moore’s law meets static power. Computer 36(12):68–75. https://doi.org/10.1109/MC.2003.1250885

    Article  Google Scholar 

  25. Lee YH, Reddy K, Krishna C (08 2003) Scheduling techniques for reducing leakage power in hard real-time systems. pp 105–112

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

    Article  MathSciNet  MATH  Google Scholar 

  27. Oliveira G, Lima G (2020) Evaluation of scheduling algorithms for embedded FreeRTOS-based systems. In: X Brazilian symposium on computing systems engineering (SBESC). pp. 1–8 https://doi.org/10.1109/SBESC51047.2020.9277851

  28. Paez FE, Urriza JM, Cayssials R, Orozco JD (2015) FreeRTOS user mode scheduler for mixed critical systems. In: IEEE Argentine conference on embedded systems. pp 37–42

  29. Pathan RM (2016) Design of an efficient ready queue for earliest-deadline-first (EDF) scheduler. In: Design, automation test in Europe conference exhibition. pp. 293–296. Operating systems platforms for embedded real-time applications

  30. Pathan RM (2015) Unifying fixed- and dynamic-priority scheduling based on priority promotion and an improved ready queue management technique. In: IEEE real-time and embedded technology and applications symposium. pp 209–220

  31. Regnier P, Lima G, Massa E, Levin G, Brandt S (2011) Run: optimal multiprocessor real-time scheduling via reduction to uniprocessor. In: 2011 IEEE 32nd real-time systems symposium. pp. 104–115 https://doi.org/10.1109/RTSS.2011.17

  32. Rowe A, Zhu H, Rajkumar R (2010) Rate-harmonized scheduling and its applicability to energy management. IEEE Trans Ind Info 6:265–275. https://doi.org/10.1109/TII.2010.2052106

    Article  Google Scholar 

  33. Santos JA, Lima G, Bletsas K (2014) Efficient schedulability tests for real-time embedded systems with urgent routines. Des Autom Embed Syst 18(4):18–38

    Google Scholar 

  34. Santos-Jr, JAM, Lima G (2009) Implementação da política EDF no Xenomai. In: Proc. of the VI operating systems workshop. (in Portuguese). pp 2429–2439

  35. Sha S, Wen W, Chaparro-Baquero GA, Quan G (2019) Thermal-constrained energy efficient real-time scheduling on multi-core platforms. Parallel Comp, 85:231–242, https://doi.org/10.1016/j.parco.2019.01.003,https://www.sciencedirect.com/science/article/pii/S0167819118300280

  36. Stahlhofen A, Zobel D (2015) Linux SCHED deadline vs. MAR top-edf. In: IEEE International conference on embedded and ubiquitous computing. pp. 168–172

  37. STMicroelectronics: datasheet ARM-M4 STM32F4 family (2016), https://www.st.com/resource/en/datasheet/dm00037051.pdf, rev.B

  38. STmicroelectronics: freeRTOS support architectures (2020), https://www.st.com/en/embedded-software/freertos-kernel.html

  39. STMicroelectronics: integrated development environment for stm32 (2021), https://www.st.com/en/development-tools/stm32cubeide.html

  40. Toma A, Meyers V, Chen JJ (2018) Implementation and evaluation of multi-mode real-time tasks under different scheduling algorithms. Operating systems platforms for embedded real-time applications

  41. Zhang F, Burns A (2009) Schedulability analysis for real-time systems with EDF scheduling. IEEE Trans Comp 58(9):1250–1258. https://doi.org/10.1109/TC.2009.58

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work was partially funded by FAPESB Grant No. APP0042/2016 and by CAPES under Grant No. 001.

Author information

Authors and Affiliations

Authors

Contributions

All authors reviewed the manuscript and agree with its content. This work has been carried out by GO during his MSc under the supervision of GL.

Corresponding author

Correspondence to George Lima.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Oliveira, G., Lima, G. Scheduling and energy savings for small scale embedded FreeRTOS-based real-time systems. Des Autom Embed Syst 27, 3–29 (2023). https://doi.org/10.1007/s10617-023-09267-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10617-023-09267-7

Keywords

Navigation