Abstract
Nowadays, real-time applications need more and more hardware performance. This increasing performance demands the use of deterministic performance enhancement features such as static branch prediction. In this paper we propose a new technique which aims to use static branch prediction for worst-case execution time (WCET) reduction that can be applied on any processor that supports this type of prediction. The only requirement is the support of a WCET tool. This paper also describes how to estimate the maximum WCET reduction that can be obtained with static approaches. We show that our technique produces a slightly better result than a similar approach from the literature. We also compare WCET-centered techniques against standard compiler techniques not directly oriented to WCET reduction. We show that a very small or even no gain can be obtained with new techniques targeted to WCET reduction considering static branch prediction. That means the techniques considered in this paper are close to an optimal result. As a secondary contribution, we show that non WCET-aware techniques can also be used in real-time environments because they present good results and low complexity. We evaluate the prediction techniques using a set of examples from the Mälardalen WCET benchmarks.
Similar content being viewed by others
References
Axer P, Rochange C, Sebastian M, Hanxleden RV, Wilhelm R, Yi W, Ernst R, Falk H, Girault A, Grund D, Guan N, Jonsson B, Marwedel P, Reineke J (2014) Building timing predictable embedded systems. ACM Trans Embed Comput Syst 13(4):1–37. https://doi.org/10.1145/2560033
Bate I, Reutemann R. Worst-case execution time analysis for dynamic branch predictors. In: Proceedings of the 16th Euromicro conference on real-time systems (ECRTS ’04). https://doi.org/10.1109/EMRTS.2004.1311023
Bodin F, Puaut I (2005) A WCET-oriented static branch prediction scheme for real time systems. In: Proceedings of the 17th Euromicro conference on real-time systems (ECRTS’05), no. 1. IEEE, pp 33–40. https://doi.org/10.1109/ECRTS.2005.33
Burguiere C, Rochange C (2007) On the complexity of modeling dynamic branch predictors when computing worst-case execution times. In: Proceedings of the ERCIM/DECOS Workshop On Dependable Embedded Systems
Burguiere C, Rochange C, Sainrat P (2005) A case for static branch prediction in real-time systems. In: 11th IEEE international conference on embedded and real-time computing systems and applications (RTCSA’05). IEEE, pp 33–38. https://doi.org/10.1109/RTCSA.2005.5
Colin A, Puaut I (2000) Worst case execution time analysis for a processor with branch prediction. Real-Time Syst 18:249–274. https://doi.org/10.1023/A:1008149332687
Falk H, Lokuciejewski P, Theiling H (2006) Design of a WCET-aware C compiler. In: Proceedings of the workshop on embedded systems for real time multimedia. IEEE Computer Society, pp 121–126. https://doi.org/10.1109/ESTMED.2006.321284
Fisher JA, Freudenberger SM (1992) Predicting conditional branch directions from previous runs of a program. In: Proceedings of the fifth international conference on architectural support for programming languages and operating systems—ASPLOS-V. ACM Press, New York, pp 85–95. https://doi.org/10.1145/143365.143493
Fisher JA, Faraboschi P, Young C (2005) Embedded computing: a VLIW approach to architecture, compilers and tools. Elsevier, New York
Gustafsson J, Betts A (2010) The mälardalen WCET benchmarks: past, present and future. In: Proceedings of the 10th international workshop on worst-case execution time analysis (WCET’10), Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, pp 136–146. https://doi.org/10.4230/OASIcs.WCET.2010.136
Hahn S, Jacobs M, Reineke J (2016) Enabling compositionality for multicore timing analysis. In: Proceedings of the 24th international conference on real-time networks and systems, pp 299–308. https://doi.org/10.1145/2997465.2997471
Lattner C, Adve V, (2004) LLVM: a compilation framework for lifelong program analysis & transformation. In: Proceedings of the international symposium on code generation and optimization (CGO’04). IEEE Computer Society, pp 75–86. https://doi.org/10.1109/CGO.2004.1281665
Lokuciejewski P, Marwedel P (2011) Worst-case execution time aware compilation techniques for real-time systems. Springer, Berlin
Louise S (2011) Improving branch prediction related WCET abstract interpretation. In: Proceedings of the 1st international workshop on cyber-physical systems, networks, and applications (CPSNA’11), workshop held during RTCSA 2, pp 130–133. https://doi.org/10.1109/RTCSA.2011.74
Patterson JRC (1995) Accurate static branch prediction by value range propagation. ACM SIGPLAN Not 30(6):67–78. https://doi.org/10.1145/223428.207117
Plazar S, Kleinsorge J, Falk H, Marwedel P (2011) WCET-driven branch prediction aware code positioning. In: Proceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems (CASES’11). ACM Press, New York, p 165. https://doi.org/10.1145/2038698.2038724
Smith J E (1981) A study of branch prediction strategies. In: Proceedings of the 8th annual symposium on computer architecture, pp 135–148. https://doi.org/10.1145/285930.285980
Starke RA, Carminati A, Oliveira RSD (2016) Evaluating the design of a VLIW processor for real-time systems. ACM Trans Embed Comput Syst 15(3):1–26. https://doi.org/10.1145/2889490
Wilhelm R, Mitra T, Mueller F, Puaut I, Puschner P, Staschulat J, Stenstrom P, Engblom J, Ermedahl A, Holsti N, Thesing S, Whalley D, Bernat G, Ferdinand C, Heckmann R (2008) The worst-case execution-time problem-overview of methods and survey of tools. ACM Trans Embed Comput Syst 7(3):1–53. https://doi.org/10.1145/1347375.1347389
Acknowledgements
The authors would like to thank CAPES and CNPq (through Grant 472602/2012-8) for the partial funding of this research.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Carminati, A., Starke, R.A. & Oliveira, R.S.d. On the use of static branch prediction to reduce the worst-case execution time of real-time applications. Real-Time Syst 54, 537–561 (2018). https://doi.org/10.1007/s11241-018-9306-y
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11241-018-9306-y