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.
Similar content being viewed by others
Notes
In this paper we use the terms core and processor interchangeably.
The code is available online at https://github.com/santos-lucasm/epos-mcore-protocols.
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).
All graphs are available at www.lisha.ufsc.br/Giovani.
References
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
Liu J (2000) Real-time systems, 1st edn. Prentice Hall PTR, Upper Saddle River
Buttazzo GC (2011) Hard real-time computing systems: predictable scheduling algorithms and applications, 3rd edn. Springer, Berlin
Yang M, Wieder A, Brandenburg B (2015) Global real-time semaphore protocols: a survey, unified analysis, and comparison. In: RTSS, pp 1–12
Jones M (1997) What really happened on mars?. Available: http://research.microsoft.com/en-us/um/people/mbj/Mars_Pathfinder/Mars_Pathfinder.html
Sha L, Rajkumar R, Lehoczky JP (1990) Priority inheritance protocols: an approach to real-time synchronization. IEEE Trans Comput 39(9):1175–1185
Baker TP (1991) Stack-based scheduling for realtime processes. Real Time Syst 3(1):67–99
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
Rajkumar R (1990) Real-time synchronization protocols for shared memory multiprocessors. In: 10th ICDCS, pp 116–123
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
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
Burns A, Wellings AJ (2013) A schedulability compatible multiprocessor resource sharing protocol—mrsp. In: ECRTS, pp 282–291
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
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
Brandenburg BB, Anderson JH (2010) Optimality results for multiprocessor real-time locking. In: 2010 31st IEEE real-time systems symposium, pp 49–60
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
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
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
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
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
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
Dijkstra EW (1968) Cooperating sequential processes. In: Genuys F (ed) Programming languages: NATO advanced study institute. Academic Press, Cambridge, pp 43–112
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
EPOS (2020) Website. Available: http://epos.lisha.ufsc.br
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
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
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
Liu L, Layland JW (1973) Scheduling algorithms for multiprogramming in a hard-real-time environment. J ACM 20(1):46–61
Schedcat: schedulability test collection and toolkit (2020). Available: http://www.mpi-sws.org/~bbb/projects/schedcat
Freertos website (2016). Available: http://www.freertos.org/
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
Liedtke J (1995) On micro-kernel construction. In: 15th SOSP. ACM, pp 237–250
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
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
Marcondes H, Fröhlich AA (2009) A hybrid hardware and software component architecture for embedded system design. Springer, Berlin, pp 259–270
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
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
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
Easwaran A, Andersson B (2009) Resource sharing in global fixed-priority preemptive multiprocessor scheduling. In: 30th RTSS, pp 377–386
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
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
Brandenburg BB (2019) Multiprocessor real-time locking protocols: a systematic review. CoRRarXiv:1909.09600,
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
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
Craig T (1993) Queuing spin lock algorithms to support timing predictability. In: Proceedings real-time systems symposium, pp 148–157
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
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
Author information
Authors and Affiliations
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
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.
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10617-023-09268-6