skip to main content
research-article

Dynamic Data-Cache Locking for Minimizing the WCET of a Single Task

Authors Info & Claims
Published:02 January 2017Publication History
Skip Abstract Section

Abstract

Caches have been widely used in modern embedded processors to bridge the increasing speed gap between processors and off-chip memory. In real-time embedded systems, computing the Worst-Case Execution Time (WCET) of a task is essential for the task scheduler to construct a valid schedule for a task set. Unfortunately, caches make it much harder to compute the WCET of a task. Cache locking has been proposed to alleviate the timing unpredictability problem caused by caches. In this article, we investigate the following WCET-aware data-cache locking problem for a single task. Given a task, select a set of variables as locked cache contents such that the WCET of the task is minimized. We propose two dynamic full cache-locking approaches. The first formulates the problem as a global Integer Linear Programming (ILP) problem that simultaneously selects a minimum set of memory blocks of variables as locked cache contents and allocates them to the data cache. The second iteratively constructs a subgraph of the Control Flow Graph (CFG) of the task in which the lengths of all the paths are close to the longest path length, uses an ILP formulation to select a minimum set of memory blocks of variables in the subgraph as locked cache contents, and allocates the selected memory blocks to the data cache. We also propose two novel, efficient data-cache allocation algorithms for the global ILP approach and the iterative ILP approach, respectively. We have implemented both approaches and compared them with two state-of-the-art approaches, the longest path-based dynamic cache-locking approach and the static WCET analysis approach without cache locking by using a set of benchmarks from the Mälardalen WCET benchmark suite, SNU real-time benchmarks, and Powerstone benchmarks. Compared to the static WCET analysis approach, the average WCET improvements of the first approach range between 11.4% and 26.4%. Compared to the longest path--based, dynamic cache-locking approach, the average WCET improvements of the first approach range between 5.0% and 15.4%. The second approach performs slightly better than the first approach.

References

  1. Kapil Anand and Rajeev Barua. 2009. Instruction cache locking inside a binary rewriter. In Proceedings of Compilers, Architecture, and Synthesis for Embedded Systems (CASES’09). ACM, 185--194. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Luis C. Aparicio, Juan Segarra, Clemente Rodríguez, and Víctor Viñals. 2011. Improving the WCET computation in the presence of a lockable instruction cache in multitasking real-time systems. Journal of Systems Architecture 57, 7, 695--706. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Doug Burger and Todd M. Austin. 1997. The SimpleScalar tool set, version 2.0. ACM SIGARCH Computer Architecture News 13--25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Marti Campoy, A. P. Ivars, and J. V. Busquets-Mataix. 2001. Using genetic algorithms in content selection for locking-caches. In Proceedings of the International Symposium on Applied Informatics. 271--276.Google ScholarGoogle Scholar
  5. Antonio Marti Campoy, Isabelle Puaut, Angel Perles Ivars, and Jose Vicente Busquets Mataix. 2005. Cache contents selection for statically-locked instruction caches: An algorithm comparison. In Proceedings of the 17th Euromicro Conference on Real-Time Systems. IEEE, 49--56. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Cekleov and M. Dubois. 1997. Virtual-address caches. Part 1: Problems and solutions in uniprocessors. IEEE Micro 64--71. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Huping Ding, Yun Liang, and Tulika Mitra. 2012. WCET-centric partial instruction cache locking. In Proceedings of the 49th Design Automation Conference (DAC’12). IEEE, 412--420. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Huping Ding, Yun Liang, and Tulika Mitra. 2013. Integrated instruction cache analysis and locking in multitasking real-time systems. In Proceedings of the 50th Annual Design Automation Conference (DAC’13). ACM, 147. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Huping Ding, Yun Liang, and Tulika Mitra. 2014. WCET-centric dynamic instruction cache locking. In Proceedings of Design, Automation 8 Test in Europe (DATE’14). IEEE, 1--6.Google ScholarGoogle Scholar
  10. Heiko Falk, Sascha Plazar, and Henrik Theiling. 2007. Compile-time decided instruction cache locking using worst-case execution paths. In Proceedings of the 5th Hardware/Software Codesign and System Synthesis (CODES’07). ACM, 143--148. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Giovani Gracioli, Ahmed Alhammad, Renato Mancuso, Antônio Augusto Fröhlich, and Rodolfo Pellizzoni. 2015. A survey on cache management mechanisms for real-time embedded systems. ACM Computing Surveys 48, 2 36 pages.Google ScholarGoogle Scholar
  12. Jan Gustafsson, Adam Betts, Andreas Ermedahl, and Björn Lisper. 2010. The Mälardalen WCET benchmarks -- past, present and future. In 10th International Workshop on Worst-Case Execution Time Analysis (WCET’10). 136--146.Google ScholarGoogle Scholar
  13. Matthew Sterling Hecht and Jeffrey David Ullman. 1975. A simple algorithm for global data flow analysis problems. SIAM Journal on Computing 519--532. Google ScholarGoogle ScholarCross RefCross Ref
  14. Bach Khoa Huynh, Lei Ju, and Abhik Roychoudhury. 2011. Scope-aware data cache analysis for WCET estimation. In Proceedings of the 17th Real-Time and Embedded Technology and Applications Symposium (RTAS’11). IEEE, 203--212. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Lian Li, Jingling Xue, and Jens Knoop. 2010. Scratchpad memory allocation for data aggregates via interval coloring in superperfect graphs. ACM Transactions on Embedded Computing Systems 28:1--28:42.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Xianfeng Li, Yun Liang, Tulika Mitra, and Abhik Roychoudhury. 2007. Chronos: A timing analyzer for embedded software. Science of Computer Programming 56--67. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Yun Liang and Tulika Mitra. 2010. Instruction cache locking using temporal reuse profile. In Proceedings of the 47th Design Automation Conference (DAC’10). ACM, 344--349. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Sung-Soo Lim. 2009. SNU real-time benchmarks suite. Retrieved November 22, 2016 from http://archi.snu.ac.kr/realtime/benchmark/.Google ScholarGoogle Scholar
  19. Tiantian Liu, Minming Li, and Chun Jason Xue. 2009. Minimizing WCET for real-time embedded systems via static instruction cache locking. In Proceedings of Real-Time and Embedded Technology and Applications Symposium (RTAS’09). IEEE, 35--44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Tiantian Liu, Minming Li, and Chun Jason Xue. 2012. Instruction cache locking for embedded systems using probability profile. Journal of Signal Processing Systems 173--188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Tiantian Liu, Yingchao Zhao, Minming Li, and Chun Jason Xue. 2010. Task assignment with cache partitioning and locking for WCET minimization on MPSOC. In Proceedings of International Conference on Parallel Processing (ICPP’10). IEEE, 573--582. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Sascha Plazar, Jan C. Kleinsorge, Peter Marwedel, and Heiko Falk. 2012. WCET-aware static locking of instruction caches. In Proceedings of the 10th International Symposium on Code Generation and Optimization (CGO’12). ACM, 44--52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Isabelle Puaut. 2006. WCET-centric software-controlled instruction caches for hard real-time systems. In Proceedings of the 18th Euromicro Conference on Real-Time Systems (ECRTS’06). IEEE, 216--226. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Isabelle Puaut and Alexis Arnaud. 2006. Dynamic instruction cache locking in hard real-time systems. In Proceedings of the 14th Real-Time and Network Systems (RTNS’06). Citeseer.Google ScholarGoogle Scholar
  25. Isabelle Puaut and David Decotigny. 2002. Low-complexity algorithms for static cache locking in multitasking hard real-time systems. In Proceedings of the 23rd Real-Time Systems Symposium (RTSS’02). IEEE, 114--123. Google ScholarGoogle ScholarCross RefCross Ref
  26. Jeff Scott, Lea Hwang Lee, John Arends, and Bill Moyer. 1998. Designing the low-power M*CORE TM architecture. In Power Driven Microarchitecture Workshop. Citeseer, 145--150.Google ScholarGoogle Scholar
  27. Vivy Suhendra, Abhik Roychoudhury, and Tulika Mitra. 2010. Scratchpad allocation for concurrent embedded software. ACM Transactions on Programming Languages and Systems 1--43. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Xavier Vera, Björn Lisper, and Jingling Xue. 2003. Data cache locking for higher program predictability. In Proceedings of ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems. ACM, 272--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Xavier Vera, Björn Lisper, and Jingling Xue. 2007. Data cache locking for tight timing calculations. ACM Transactions on Embedded Computing Systems 4:1--4:37.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Qing Wan, Hui Wu, and Jingling Xue. 2012. WCET-aware data selection and allocation for scratchpad memory. In Proceedings of the 13th Languages, Compilers, Tools and Theory for Embedded Systems (LCTES’12). ACM, 41--50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Xuejun Yang, Li Wang, Jingling Xue, and Qingbo Wu. 2012. Comparability graph coloring for optimizing utilization of software-managed stream register files for stream processors. ACM Transactions on Architecture and Code Optimization 5:1--5:30.Google ScholarGoogle Scholar
  32. Wenguang Zheng and Hui Wu. 2014. WCET-aware dynamic instruction cache locking. In Proceedings of Languages, Compilers and Tools for Embedded Systems (LCTES’14 ). ACM, 53--62.Google ScholarGoogle Scholar
  33. Wenguang Zheng and Hui Wu. 2015. WCET-aware dynamic d-cache locking for a single task. In Proceedings of the 16th Languages, Compilers and Tools for Embedded Systems (LCTES’15). ACM, 8:1--8:10. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dynamic Data-Cache Locking for Minimizing the WCET of a Single Task

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!