skip to main content
tutorial

WCET-Aware Dynamic D-cache Locking for A Single Task

Authors Info & Claims
Published:04 June 2015Publication History
Skip Abstract Section

Abstract

Caches have been extensively used to bridge the increasing speed gap between processors and off-chip memory. However, caches make it much harder to compute the WCET (Worst-Case Execution Time) of a program. Cache locking is an effective technique for overcoming the unpredictability problem of caches. We investigate the WCET aware D-cache locking problem for a single task, and propose two dynamic cache locking approaches. The first approach formulates the problem as a global ILP (Integer Linear Programming) problem that simultaneously selects a near-optimal set of variables as the locked cache contents and allocates them to the D-cache. The second one iteratively constructs a subgraph of the CFG of the task where the lengths of all the paths are close to the longest path length, and uses an ILP formulation to select a near-optimal set of variables in the subgraph as the locked cache contents and allocate them to the D-cache. For both approaches, we propose a novel, efficient D-cache allocation algorithm. We have implemented both approaches and compared them with the longest path-based, dynamic cache locking approach proposed in [22] and the static WCET analysis approach without cache locking proposed in [14] by using a set of benchmarks from the Mälardalen WCET benchmark suite, SNU real-time benchmarks and the benchmarks used in [27]. Compared to the static WCET analysis approach, the average WCET improvements of the first approach range between 11.3% and 31.6%, and the average WCET improvements of the second approach range between 12.3% and 32.9%. Compared to the longest path-based, dynamic cache locking approach, the average WCET improvements of the first approach range between 4.7% and 14.3%, and the average WCET improvements of the second approach range between 5.3% and 15.0%.

References

  1. Matlab - the language of technical computing. http://www.mathworks.com/matlab/.Google ScholarGoogle Scholar
  2. Snu real-time benchmarks. http://www.cprover.org/satabs/examples/.Google ScholarGoogle Scholar
  3. K. Anand and R. Barua. Instruction cache locking inside a binary rewriter. In Proceedings of the 2009 international conference on Compilers, architecture, and synthesis for embedded systems, pages 185--194. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Burger and T. M. Austin. The simplescalar tool set, version 2.0. ACM SIGARCH Computer Architecture News, 25(3):13--25, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. V. Busquets-Mataix, J. J. Serrano-Martin, R. Ors-Carot, P. Gil, and A. Wellings. Adding instruction cache effect to an exact schedulability analysis of preemptive real-time systems. In Proceedings of the Eighth Euromicro Workshop on Real-Time Systems, pages 271--276. IEEE, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. M. Campoy, A. Ivars, and J. Busquets-Mataix. Using genetic algorithms in content selection for locking-caches. In Proceedings of the international symposium on applied informatics, pages 271--276, 2001.Google ScholarGoogle Scholar
  7. A. M. Campoy, A. P. Ivars, and J. Busquets-Mataix. Dynamic use of locking caches in multitask, preemptive real-time systems. In Proceedings of the 15th Triennial World Congress of the International Federation of Automatic Control, 2002.Google ScholarGoogle ScholarCross RefCross Ref
  8. A. M. Campoy, A. Perles, F. Rodriguez, and J. Busquets-Mataix. Static use of locking caches vs. dynamic use of locking caches for real-time systems. In Proceedings of Canadian Conference on Electrical and Computer Engineering, 2003., volume 2, pages 1283--1286. IEEE, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  9. J. Deverge and I. Puaut. Wcet-directed dynamic scratchpad memory allocation of data. In Proceedings of the 19th Euromicro Conference on Real-Time Systems, pages 179--190, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. H. Ding, Y. Liang, and T. Mitra. Wcet-centric partial instruction cache locking. In Proceedings of the 49th Design Automation Conference (DAC), pages 412--420. IEEE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Ding, Y. Liang, and T. Mitra. Wcet-centric dynamic instruction cache locking. In Proceedings of the conference on Design, Automation & Test in Europe, page 27. European Design and Automation Association, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. Falk, S. Plazar, and H. Theiling. Compile-time decided instruction cache locking using worst-case execution paths. In Proceedings of the 5th IEEE/ACM international conference on Hardware/software codesign and system synthesis, pages 143--148. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Gustafsson, A. Betts, A. Ermedahl, and B. Lisper. The Mälardalen WCET benchmarks -- past, present and future. pages 137--147, Brussels, Belgium, July 2010. OCG.Google ScholarGoogle Scholar
  14. B. K. Huynh, L. Ju, and A. Roychoudhury. Scope-aware data cache analysis for wcet estimation. In Proceedings of the 17th IEEEReal-Time and Embedded Technology and Applications Symposium (RTAS), pages 203--212. IEEE, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Li, J. Xue, and J. Knoop. Scratchpad memory allocation for data aggregates via interval coloring in superperfect graphs. ACM Trans. Embed. Comput. Syst., 10(2):28:1--28:42, Jan. 2011. ISSN 1539-9087. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. X. Li, Y. Liang, T. Mitra, and A. Roychoudhury. Chronos: A timing analyzer for embedded software. Science of Computer Programming, 69(1-3):56--67, 2007. http://www.comp.nus.edu.sg/~rpembed/chronos. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Y. Liang and T. Mitra. Instruction cache locking using temporal reuse profile. In Proceedings of the 47th Design Automation Conference, pages 344--349. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Liu, M. Li, and C. J. Xue. Minimizing wcet for real-time embedded systems via static instruction cache locking. In Real-Time and Embedded Technology and Applications Symposium, 2009. RTAS 2009. 15th IEEE, pages 35--44. IEEE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Liu, Y. Zhao, M. Li, and C. J. Xue. Task assignment with cache partitioning and locking for wcet minimization on mpsoc. In Parallel Processing (ICPP), 2010 39th International Conference on, pages 573--582. IEEE, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Liu, M. Li, and C. J. Xue. Instruction cache locking for embedded systems using probability profile. Journal of Signal Processing Systems, 69(2):173--188, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S. Plazar, J. C. Kleinsorge, P. Marwedel, and H. Falk. Wcet-aware static locking of instruction caches. In Proceedings of the Tenth International Symposium on Code Generation and Optimization, pages 44--52. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. I. Puaut. Wcet-centric software-controlled instruction caches for hard real-time systems. In Proceedings of the 18th Euromicro Conference on Real-Time Systems, 2006, pages 10--pp. IEEE, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. I. Puaut and A. Arnaud. Dynamic instruction cache locking in hard real-time systems. In Proceedings of the 14th International Conference on Real-Time and Network Systems, 2006.Google ScholarGoogle Scholar
  24. I. Puaut and D. Decotigny. Low-complexity algorithms for static cache locking in multitasking hard real-time systems. In Proceedings of the 23rd IEEE Real-Time Systems Symposium, pages 114--123. IEEE, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. V. Suhendra, A. Roychoudhury, and T. Mitra. Scratchpad allocation for concurrent embedded software. ACM Trans. Program. Lang. Syst., 32(4), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. X. Vera, B. Lisper, and J. Xue. Data cache locking for higher program predictability. In ACM SIGMETRICS Performance Evaluation Review, volume 31, pages 272--282. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. X. Vera, B. Lisper, and J. Xue. Data cache locking for tight timing calculations. ACM Transactions on Embedded Computing Systems (TECS), 7(1):4, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Q. Wan, H. Wu, and J. Xue. Wcet-aware data selection and allocation for scratchpad memory. In ACM SIGPLAN Notices, volume 47, pages 41--50. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. X. Yang, L. Wang, J. Xue, and Q. Wu. Comparability graph coloring for optimizing utilization of software-managed stream register files for stream processors. ACM Trans. Archit. Code Optim., 9(1):5:1--5:30, Mar. 2012. ISSN 1544-3566. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. W. Zheng and H. Wu. Wcet aware dynamic instruction cache locking. In Proceedings of the 2014 SIGPLAN/SIGBED conference on Languages, compilers and tools for embedded systems, pages 53--62. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. WCET-Aware Dynamic D-cache Locking for 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!