Shared Resource Contention in MCUs: A Reality Check and the Quest for Timeliness

Authors Daniel Oliveira , Weifan Chen , Sandro Pinto , Renato Mancuso



PDF
Thumbnail PDF

File

LIPIcs.ECRTS.2024.5.pdf
  • Filesize: 1.39 MB
  • 25 pages

Document Identifiers

Author Details

Daniel Oliveira
  • Centro ALGORITMI, University of Minho, Guimarães, Portugal
Weifan Chen
  • Department of Computer Science, Boston University, MA, USA
Sandro Pinto
  • Centro ALGORITMI, University of Minho, Guimarães, Portugal
Renato Mancuso
  • Department of Computer Science, Boston University, MA, USA

Acknowledgements

We would like to express our gratitude to the reviewers for their valuable feedback and suggestions.

Cite AsGet BibTex

Daniel Oliveira, Weifan Chen, Sandro Pinto, and Renato Mancuso. Shared Resource Contention in MCUs: A Reality Check and the Quest for Timeliness. In 36th Euromicro Conference on Real-Time Systems (ECRTS 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 298, pp. 5:1-5:25, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.ECRTS.2024.5

Abstract

Microcontrollers (MCUs) are steadily embracing multi-core technology to meet growing performance demands. This trend marks a shift from their traditionally simple, deterministic designs to more complex and inherently less predictable architectures. While shared resource contention is well-studied in mid to high-end embedded systems, the emergence of multi-core architectures in MCUs introduces unique challenges and characteristics that existing research has not fully explored. In this paper, we conduct an in-depth investigation of both mainstream and next-generation MCU-based platforms, aiming to identify the sources of contention on systems typically lacking these problems. We empirically demonstrate substantial contention effects across different MCU architectures (i.e., from single- to multi-core configurations), highlighting significant application slowdowns. Notably, we observe that slowdowns can reach several orders of magnitude, with the most extreme cases showing up to a 3800x (times, not percent) increase in execution time. To address these issues, we propose and evaluate muTPArtc, a novel mechanism designed for Timely Progress Assessment (TPA) and TPA-based runtime control specifically tailored to MCUs. muTPArtc is an MCU-specialized TPA-based mechanism that leverages hardware facilities widely available in commercial off-the-shelf MCUs (i.e., hardware breakpoints and cycle counters) to successfully monitor applications' progress, detect, and mitigate timing violations. Our results demonstrate that muTPArtc effectively manages performance degradation due to interference, requiring only minimal modifications to the build pipeline and no changes to the source code of the target application, while incurring minor overheads.

Subject Classification

ACM Subject Classification
  • Computer systems organization → Real-time systems
Keywords
  • multi-core microcontrollers
  • shared resources contention
  • progress-aware regulation

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Benny Akesson, Mitra Nasri, Geoffrey Nelissen, Sebastian Altmeyer, and Robert I. Davis. A Comprehensive Survey of Industry Practice in Real-Time Systems. Real-Time Systems, 58(3):358-398, 2022. Google Scholar
  2. Arm. Arm Delivers Record Revenues and Record Profits in FY21, 2022. URL: https://newsroom.arm.com/news/arm-delivers-record-revenues-and-record-profits-in-fy21.
  3. Michael G. Bechtel and Heechul Yun. Denial-of-Service Attacks on Shared Cache in Multicore: Analysis and Prevention. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 357-367, 2019. Google Scholar
  4. Jacob Beningo. Why and How to Get Started with Multicore Microcontrollers for IoT Devices at the Edge, 2020. URL: https://www.digikey.com/en/articles/why-and-how-to-get-started-with-multicore-microcontrollers.
  5. Marko Bertogna. A View on Future Challenges for the Real-Time Community, 2019. URL: https://www.irit.fr/rtns2019/wp-content/uploads/2019/11/bertogna_keynote.pdf.
  6. Weifan Chen, Ivan Izhbirdeev, Denis Hoornaert, Shahin Roozkhosh, Patrick Carpanedo, Sanskriti Sharma, and Renato Mancuso. Low-Overhead Online Assessment of Timely Progress as a System Commodity. In Euromicro Conference on Real-Time Systems (ECRTS), volume 262, pages 13:1-13:26, 2023. Google Scholar
  7. Diogo Costa, Luca Cuomo, Daniel Oliveira, Ida Maria Savino, Bruno Morelli, José Martins, Fabrizio Tronci, Alessandro Biasci, and Sandro Pinto. IRQ Coloring: Mitigating Interrupt-Generated Interference on ARM Multicore Platforms. In Next Generation Real-Time Embedded Systems (NG-RES), volume 108, pages 2:1-2:13, 2023. Google Scholar
  8. Miguel Costa, Diogo Costa, Tiago Gomes, and Sandro Pinto. Shifting capsule networks from the cloud to the deep edge. ACM Transactions on Intelligent Systems and Technology, 13(6), September 2022. Google Scholar
  9. Dakshina Dasari, Benny Akesson, Vincent Nélis, Muhammad Ali Awan, and Stefan M. Petters. Identifying the Sources of Unpredictability in COTS-based Multicore Systems. In IEEE International Symposium on Industrial Embedded Systems (SIES), pages 39-48, 2013. Google Scholar
  10. Kinjal Dave. Optimizing ARM Cortex-A and Cortex-M Based Heterogeneous Multiprocessor Systems for Rich Embedded Applications. In Embedded World Conference, 2017. Google Scholar
  11. Jack Ganssle. On Wait States, 2015. URL: https://www.embedded.com/on-wait-states/.
  12. Hamed HaddadPajouh, Ali Dehghantanha, Reza M. Parizi, Mohammed Aledhari, and Hadis Karimipour. A Survey on Internet of Things Security: Requirements, Challenges, and Solutions. Internet of Things, 14:100129, 2021. Google Scholar
  13. Přemysl Houdek, Michal Sojka, and Zdeněk Hanzálek. Towards Predictable Execution Model on ARM-based Heterogeneous Platforms. In International Symposium on Industrial Electronics (ISIE), pages 1297-1302, 2017. Google Scholar
  14. Infineon. PSoC 6 MCU: CY8C63x6, CY8C63x7 Architecture Technical Reference Manual, 2020. Google Scholar
  15. Gideon Intrater. On Wait States, 2019. URL: https://embeddedcomputing.com/technology/storage/execute-in-place-xip-an-external-flash-architecture-ideal-for-the-code-and-performance-requirements-of-edge-iot-and-ai.
  16. Dan Iorga, Tyler Sorensen, John Wickerson, and Alastair F. Donaldson. Slow and Steady: Measuring and Tuning Multicore Interference. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 200-212, 2020. Google Scholar
  17. Ian Johnson Joseph Yiu. Multi-core Microcontroller Design with Cortex-M Processors and CoreSight SoC. Technical report, Arm, 2013. Google Scholar
  18. Chung Hwan Kim, Taegyu Kim, Hongjun Choi, Zhongshu Gu, Byoungyoung Lee, X. Zhang, and Dongyan Xu. Securing Real-Time Microcontroller Systems through Customized Memory View Switching. In Network and Distributed System Security Symposium (NDSS), 2018. Google Scholar
  19. Tomasz Kloda, Marco Solieri, Renato Mancuso, Nicola Capodieci, Paolo Valente, and Marko Bertogna. Deterministic Memory Hierarchy and Virtualization for Modern Multi-Core Embedded Systems. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 1-14, 2019. Google Scholar
  20. Angeliki Kritikakou, Claire Pagetti, Olivier Baldellon, Matthieu Roy, and Christine Rochange. Run-Time Control to Increase Task Parallelism In Mixed-Critical Systems. In Euromicro Conference on Real-Time Systems (ECRTS), pages 119-128, 2014. Google Scholar
  21. Angeliki Kritikakou, Christine Rochange, Madeleine Faugère, Claire Pagetti, Matthieu Roy, Sylvain Girbal, and Daniel Gracia Pérez. Distributed Run-Time WCET Controller for Concurrent Critical Tasks in Mixed-Critical Systems. In International Conference on Real-Time Networks and Systems (RTNS), pages 139-148, 2014. Google Scholar
  22. Tamara Lugo, Santiago Lozano, Javier Fernández, and Jesus Carretero. A Survey of Techniques for Reducing Interference in Real-Time Applications on Multicore Platforms. IEEE Access, 10:21853-21882, 2022. Google Scholar
  23. Claire Maiza, Hamza Rihani, Juan M. Rivas, Joël Goossens, Sebastian Altmeyer, and Robert I. Davis. A Survey of Timing Verification Techniques for Multi-Core Real-Time Systems. ACM Computing Surveys, 52(3), 2019. Google Scholar
  24. Renato Mancuso, Roman Dudko, Emiliano Betti, Marco Cesati, Marco Caccamo, and Rodolfo Pellizzoni. Real-Time Cache Management Framework for Multi-Core Architectures. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 45-54, 2013. Google Scholar
  25. José Martins and Sandro Pinto. Shedding Light on Static Partitioning Hypervisors for Arm-based Mixed-Criticality Systems. In Real-Time and Embedded Technology and Applications Symposium (RTAS), 2023. Google Scholar
  26. José Martins, Adriano Tavares, Marco Solieri, Marko Bertogna, and Sandro Pinto. Bao: A Lightweight Static Partitioning Hypervisor for Modern Multi-Core Embedded Systems. In Next Generation Real-Time Embedded Systems (NG-RES), volume 77, pages 3:1-3:14, 2020. Google Scholar
  27. Paolo Modica, Alessandro Biondi, Giorgio Buttazzo, and Anup Patel. Supporting temporal and spatial isolation in a hypervisor for ARM multicore platforms. In International Conference on Industrial Technology (ICIT), pages 1651-1657, 2018. Google Scholar
  28. Fabio Montagna, Giuseppe Tagliavini, Davide Rossi, Angelo Garofalo, and Luca Benini. Streamlining the openmp programming model on ultra-low-power multi-core mcus. In International Conference on Architecture of Computing Systems (ARCS), volume 12800, pages 167-182, 2021. Google Scholar
  29. NXP. LPC55S6x/LPC55S2x/LPC552x User manual, 2022. Google Scholar
  30. Daniel Oliveira, Weifan Chen, Sandro Pinto, and Renato Mancuso. MCU Contention Evaluation Framework. Software, version 0.1., swhId: https://archive.softwareheritage.org/swh:1:dir:ac8ce99c9ea41bf6dba2aaa197f4bda471aa5790;origin=https://github.com/danielRep/mcu-tpa-eval;visit=swh:1:snp:0830cfc1ab9c1a89b90af8d1f5cfbd34009f6593;anchor=swh:1:rev:491481ac0a296ec2f9fa62acce39b2e717f79f46 (visited on 2024-06-19). URL: https://github.com/danielRep/mcu-tpa-eval.
  31. Daniel Oliveira, Weifan Chen, Sandro Pinto, and Renato Mancuso. Investigating and Mitigating Contention on Low-End Multi-Core Microcontrollers. In Real-time And IntelliGent Edge Computing Workshop (RAGE), pages 221-226, 2023. Google Scholar
  32. David Patterson, Jeremy Bennett, Palmer Dabbelt, Cesare Garlati, G. S. Madhusudan, and Trevor Mudge. Embench: A Modern Embedded Benchmark Suite. URL: https://www.embench.org/.
  33. Rodolfo Pellizzoni, Andreas Schranzhofer, Jian-Jia Chen, Marco Caccamo, and Lothar Thiele. Worst Case Delay Analysis for Memory Interference in Multicore Systems. In Design, Automation & Test in Europe Conference & Exhibition (DATE), pages 741-746, 2010. Google Scholar
  34. Sandro Pinto, Hugo Araujo, Daniel Oliveira, José Martins, and Adriano Tavares. Virtualization on TrustZone-Enabled Microcontrollers? Voilà! In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 293-304, 2019. Google Scholar
  35. Petar Radojković, Sylvain Girbal, Arnaud Grasset, Eduardo Quiñones, Sami Yehia, and Francisco J. Cazorla. On the Evaluation of the Impact of Shared Resources in Multithreaded COTS Processors in Time-Critical Environments. ACM Transactions on Architecture and Code Optimization, 8(4), 2012. Google Scholar
  36. Grand View Research. Microcontroller Market Size & Share and Trends Analysis Report By Product (8-bit, 16-bit, 32-bit), By Application (Consumer Electronics & Telecom, Automotive, Industrial, Medical Devices, Aerospace & Defense), By Region, And Segment Forecasts, 2023 - 2030, 2022. URL: https://www.grandviewresearch.com/industry-analysis/microcontroller-market.
  37. Precedence Research. Microcontroller (MCU) Market - Global Market Size, Trends Analysis, Segment Forecasts, Regional Outlook 2023 - 2032, 2023. URL: https://www.precedenceresearch.com/microcontroller-mcu-market.
  38. Cristiano Rodrigues, Daniel Oliveira, and Sandro Pinto. BUSted!!! Microarchitectural Side-Channel Attacks on the MCU Bus Interconnect. In Security and Privacy (S&P), pages 62-62, 2024. Google Scholar
  39. Ahsan Saeed, Dakshina Dasari, Dirk Ziegenbein, Varun Rajasekaran, Falk Rehm, Michael Pressler, Arne Hamann, Daniel Mueller-Gritschneder, Andreas Gerstlauer, and Ulf Schlichtmann. Memory Utilization-Based Dynamic Bandwidth Regulation for Temporal Isolation in Multi-Cores. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 133-145, 2022. Google Scholar
  40. Alejandro Serrano-Cases, Juan M. Reina, Jaume Abella, Enrico Mezzetti, and Francisco J. Cazorla. Leveraging Hardware QoS to Control Contention in the Xilinx Zynq UltraScale+ MPSoC. In Euromicro Conference on Real-Time Systems (ECRTS), volume 196, pages 3:1-3:26, 2021. Google Scholar
  41. Haoqi Shan, Dean Sullivan, and Orlando Arias. When Memory Mappings Attack: On the (Mis)use of the ARM Cortex-M FPB Unit. In Asian Hardware Oriented Security and Trust Symposium (AsianHOST). IEEE, 2023. Google Scholar
  42. Yan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens, Mario Polino, Audrey Dutcher, John Grosen, Siji Feng, Christophe Hauser, Christopher Kruegel, and Giovanni Vigna. SoK: (State of) The Art of War: Offensive Techniques in Binary Analysis. In Security and Privacy (S&P), 2016. Google Scholar
  43. Soham Sinha, Richard West, and Ahmad Golchin. PAStime: Progress-Aware Scheduling for Time-Critical Computing. In Euromicro Conference on Real-Time Systems (ECRTS), volume 165, pages 3:1-3:24, 2020. Google Scholar
  44. Parul Sohal, Rohan Tabish, Ulrich Drepper, and Renato Mancuso. E-WarP: A System-wide Framework for Memory Bandwidth Profiling and Management. In Real-Time Systems Symposium (RTSS), pages 345-357, 2020. Google Scholar
  45. Statista. Microcontroller Unit (MCU) Market Revenues from 2005 to 2021 by Type. Technical report, Statista, 2021. Google Scholar
  46. Ashley Stevens. Quality of Service (QoS) in ARM Systems: An Overview. Technical report, Arm, 2014. Google Scholar
  47. STMicroelectronics. STM32L42xxx advanced Arm-based 32-bit MCUs, 2018. Google Scholar
  48. Xi Tan, Zheyuan Ma, Sandro Pinto, Le Guan, Ning Zhang, Jun Xu, Zhiqiang Lin, Hongxin Hu, and Ziming Zhao. Where’s the "up"?! A Comprehensive (bottom-up) Study on the Security of Arm Cortex-M Systems, 2024. URL: https://arxiv.org/abs/2401.15289.
  49. Ken Tindell. Raspberry Pi Pico Priority Inversion, 2021. URL: https://kentindell.github.io/2021/03/05/pico-priority-inversion/.
  50. Prathap Kumar Valsan, Heechul Yun, and Farzad Farshchi. Taming Non-Blocking Caches to Improve Isolation in Multicore Real-Time Systems. In Real-Time and Embedded Technology and Applications Symposium (RTAS), 2016. Google Scholar
  51. Joseph Yiu. Definitive Guide to Arm Cortex-M23 and Cortex-M33 Processors. Newnes, 1st edition, 2021. Google Scholar
  52. Heechul Yun, Renato Mancuso, Zheng-Pei Wu, and Rodolfo Pellizzoni. PALLOC: DRAM bank-aware memory allocator for performance isolation on multicore platforms. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 155-166, 2014. Google Scholar
  53. Heechul Yun, Gang Yao, Rodolfo Pellizzoni, Marco Caccamo, and Lui Sha. MemGuard: Memory bandwidth reservation system for efficient performance isolation in multi-core platforms. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 55-64, 2013. Google Scholar
  54. Heechul Yun, Gang Yao, Rodolfo Pellizzoni, Marco Caccamo, and Lui Sha. Memory Bandwidth Management for Efficient Performance Isolation in Multi-Core Platforms. IEEE Transactions on Computers, 65(2):562-576, 2016. Google Scholar
  55. Matteo Zini, Giorgiomaria Cicero, Daniel Casini, and Alessandro Biondi. Profiling and controlling I/O-related memory contention in COTS heterogeneous platforms. Software: Practice and Experience, 52(5):1095-1113, 2022. Google Scholar
  56. Alexander Zuepke, Andrea Bastoni, Weifan Chen, Marco Caccamo, and Renato Mancuso. MemPol: Policing Core Memory Bandwidth from Outside of the Cores. In Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 235-248, 2023. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail