Skip to main content
Log in

Supporting single and multi-core resource access protocols on object-oriented RTOSes

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

Abstract

Real-time resource access protocols are fundamental to bound the maximum delay a task can suffer due to priority inversions. Several real-time protocols have been proposed, for both static and dynamic scheduling approaches in single and multi-core processors. One of the main factors for performance efficiency in such protocols is the way they are implement within a real-time operating system (RTOS). In this paper we present an object-oriented design of real-time access protocols considering single and multi-core systems and also suspension- and spin-based protocols (7 protocols in total). Our design aims at reducing the run-time overhead and increasing code re-usability. By implementing the proposed design in an RTOS and running the protocols in a modern multi-core processor, we provide an analysis regarding the memory footprint, run-time overhead, and the impact of the overhead into the schedulability analysis of synthetically generated task sets. Our results indicate that proper implementation provides low run-time overhead (up to 6.1 \(\upmu \hbox {s}\)) and impact on the schedulability of real-time tasks.

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

Similar content being viewed by others

Notes

  1. In this paper we use the terms core and processor interchangeably.

  2. The code is available online at https://github.com/santos-lucasm/epos-mcore-protocols.

  3. Run-time overhead is defined as the additional computing time carried out by the protocols and RTOS. Systems schedulability refers to the rate of schedulable tasks in the system according to a scheduling algorithm (or scheduler).

  4. All graphs are available at www.lisha.ufsc.br/Giovani.

References

  1. dos Santos LM, Gracioli G, Kloda T, Caccamo M (2020) On the design and implementation of real-time resource access protocols. In: X Brazilian symposium on computing systems engineering (SBESC), pp 1–8

  2. Liu J (2000) Real-time systems, 1st edn. Prentice Hall PTR, Upper Saddle River

    Google Scholar 

  3. Buttazzo GC (2011) Hard real-time computing systems: predictable scheduling algorithms and applications, 3rd edn. Springer, Berlin

    Book  MATH  Google Scholar 

  4. Yang M, Wieder A, Brandenburg B (2015) Global real-time semaphore protocols: a survey, unified analysis, and comparison. In: RTSS, pp 1–12

  5. Jones M (1997) What really happened on mars?. Available: http://research.microsoft.com/en-us/um/people/mbj/Mars_Pathfinder/Mars_Pathfinder.html

  6. Sha L, Rajkumar R, Lehoczky JP (1990) Priority inheritance protocols: an approach to real-time synchronization. IEEE Trans Comput 39(9):1175–1185

    Article  MathSciNet  MATH  Google Scholar 

  7. Baker TP (1991) Stack-based scheduling for realtime processes. Real Time Syst 3(1):67–99

    Article  MathSciNet  Google Scholar 

  8. 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:284–292

    Article  Google Scholar 

  9. Rajkumar R (1990) Real-time synchronization protocols for shared memory multiprocessors. In: 10th ICDCS, pp 116–123

  10. Gai P, Lipari G, Di Natale M (2001) Minimizing memory utilization of real-time task sets in single and multi-processor systems-on-a-chip. In: 22nd IEEE RTSS, pp 73–83

  11. Garrido J, Zhao S, Burns A, Wellings A (2017) Supporting nested resources in mrsp. In: Blieberger J, Bader M (eds) Reliable software technologies–Ada-Europe 2017. Springer, Berlin, pp 73–86

    Chapter  Google Scholar 

  12. Burns A, Wellings AJ (2013) A schedulability compatible multiprocessor resource sharing protocol—mrsp. In: ECRTS, pp 282–291

  13. Ward BC, Anderson JH (2012) Supporting nested locking in multiprocessor real-time systems. In: 24th Euromicro conference on real-time systems (ECRTS 2012), pp 223–232. IEEE Computer Society

  14. Zhao S, Garrido J, Wei R, Burns A, Wellings A, de la Puente JA (2020) A complete run-time overhead-aware schedulability analysis for MrsP under nested resources. J Syst Softw 159:110449

    Article  Google Scholar 

  15. Brandenburg BB, Anderson JH (2010) Optimality results for multiprocessor real-time locking. In: 2010 31st IEEE real-time systems symposium, pp 49–60

  16. Zhao S, Garrido J, Burns A, Wellings A (2017) New schedulability analysis for mrsp. In: 2017 IEEE 23rd international conference on embedded and real-time computing systems and applications (RTCSA), pp 1–10

  17. Catellani S, Bonato L, Huber S, Mezzetti E (2015) Challenges in the implementation of mrsp. In: de la Puente JA, Vardanega T (eds) Reliable software technologies—Ada-Europe 2015. Springer, Cham, pp 179–195

    Chapter  Google Scholar 

  18. Shi J, Chen K-H, Zhao S, Huang W-H, Chen J-J, Wellings A (2017) Implementation and evaluation of multiprocessor resource synchronization protocol (mrsp) on litmus\(^{RT}\). In: 13th workshop on operating systems platforms for embedded real-time applications

  19. Dhall SK, Liu CL (1978) On a real-time scheduling problem. Oper Res 26(1):127–140. https://doi.org/10.1287/opre.26.1.127

    Article  MathSciNet  MATH  Google Scholar 

  20. Lopez JM, Garcia M, Diaz JL, Garcia DF (2000) Worst-case utilization bound for EDF scheduling on real-time multiprocessor systems. In: 12th ECRTS, pp 25–33

  21. Takada H, Sakamura K (1997) A novel approach to multiprogrammed multiprocessor synchronization for real-time kernels. In: Proceedings real-time systems symposium, pp 134–143

  22. Dijkstra EW (1968) Cooperating sequential processes. In: Genuys F (ed) Programming languages: NATO advanced study institute. Academic Press, Cambridge, pp 43–112

    Google Scholar 

  23. Brandenburg BB, Anderson JH (2008) An implementation of the pcp, srp, d-pcp, m-pcp, and fmlp real-time synchronization protocols in litmusrt. In: 14th IEEE RTCSA, pp 185–194. IEEE

  24. EPOS (2020) Website. Available: http://epos.lisha.ufsc.br

  25. Gracioli G, Fröhlich AA, Pellizzoni R, Fischmeister S (2013) Implementation and evaluation of global and partitioned scheduling in a real-time OS. Real Time Syst 49(6):669–714

    Article  MATH  Google Scholar 

  26. Biondi A, Brandenburg BB (2016) Lightweight real-time synchronization under P-EDF on symmetric and asymmetric multiprocessors. In: Proceedings of the 28th Euromicro conference on real-time systems (ECRTS), pp 1–11

  27. Lakshmanan K, de Niz D, Rajkumar R (2009) Coordinated task scheduling, allocation and synchronization on multiprocessors. In: 2009 30th IEEE real-time systems symposium, pp 469–478

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

    Article  MathSciNet  MATH  Google Scholar 

  29. Schedcat: schedulability test collection and toolkit (2020). Available: http://www.mpi-sws.org/~bbb/projects/schedcat

  30. Freertos website (2016). Available: http://www.freertos.org/

  31. Inam R, Mäki-Turja J, Sjödin M, Behnam M (2011) Hard real-time support for hierarchical scheduling in freertos. In: OSPERT, pp 51–60

  32. Liedtke J (1995) On micro-kernel construction. In: 15th SOSP. ACM, pp 237–250

  33. Lee J-H, Kim H-N (2003) Implementing priority inheritance semaphore on uC/OS real-time kernel. In: IEEE workshop on software technologies for future embedded systems, pp 83–86

  34. Akgul BS, Mooney VJ, Thane H, Kuacharoen P (2003) Hardware support for priority inheritance. In: 24th IEEE real-time systems symposium. RTSS, pp 246–255

  35. Marcondes H, Fröhlich AA (2009) A hybrid hardware and software component architecture for embedded system design. Springer, Berlin, pp 259–270

    Google Scholar 

  36. Wang Q, Song J, Parmer G (2011) Execution stack management for hard real-time computation in a component-based os. In: IEEE 32nd RTSS, pp 78–89

  37. Caccamo M, Lipari G, Buttazzo G (1999) Sharing resources among periodic and aperiodic tasks with dynamic deadlines. In: Proceedings 20th IEEE real-time systems symposium (RTSS), pp 284–293

  38. Block A, Leontyev H, Brandenburg BB, Anderson JH (2007) A flexible real-time locking protocol for multiprocessors. In: 13th IEEE international conference on embedded and real-time computing systems and applications (RTCSA), pp 47–56

  39. Easwaran A, Andersson B (2009) Resource sharing in global fixed-priority preemptive multiprocessor scheduling. In: 30th RTSS, pp 377–386

  40. Teixeira R, Lima G (2019) Improved task packing for shared resources in multiprocessor real-time systems scheduled by RUN under SBLP. In: IX Brazilian symposium on computing systems engineering (SBESC), pp 1–8

  41. 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

  42. Brandenburg BB (2019) Multiprocessor real-time locking protocols: a systematic review. CoRRarXiv:1909.09600,

  43. Robb J, Brandenburg BB (2020) Nested, but separate: isolating unrelated critical sections in real-time nested locking. In: 32nd ECRTS, pp 6:1–6:23

  44. Nemitz CE, Amert T, Anderson JH (2018) Using lock servers to scale real-time locking protocols: chasing ever-increasing core counts. In: 30th ECRTS, pp 25:1–25:24

  45. Craig T (1993) Queuing spin lock algorithms to support timing predictability. In: Proceedings real-time systems symposium, pp 148–157

  46. Takada H, Sakamura K (1995) Real-time scalability of nested spin locks. In: Proceedings second international workshop on real-time computing systems and applications, pp 160–167

  47. Zhao S, Wellings AJ (2017) Investigating the correctness and efficiency of mrsp in fully partitioned systems. In: 10th York doctoral symposium on computer science and electronic engineering

Download references

Author information

Authors and Affiliations

Authors

Contributions

LMS did all the implementation of the proposed protocols and run-time experiments and also wrote some parts of the document. GG wrote some parts of the document, reviewed the and improved the design of the protocols and reviewed the document. TK did the schedulability experiments, wrote some parts of the document, and reviewed a couple of sections. MC reviewed the manuscript

Corresponding author

Correspondence to Giovani Gracioli.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

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

Giovani Gracioli was partially supported by Fundação de Desenvolvimento da Pesquisa - Fundep Rota 2030/Linha V 27192.02.01/2020.09-00. Marco Caccamo was supported by an Alexander von Humboldt Professorship endowed by the German Federal Ministry of Education and Research.

This paper was originally published in the 2020 X Brazilian Symposium on Computing Systems Engineering (SBESC) [1].

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

dos Santos, L.M., Gracioli, G., Kloda, T. et al. Supporting single and multi-core resource access protocols on object-oriented RTOSes. Des Autom Embed Syst 27, 31–50 (2023). https://doi.org/10.1007/s10617-023-09268-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10617-023-09268-6

Keywords

Navigation