skip to main content
research-article

Enabling dynamic binary translation in embedded systems with scratchpad memory

Published:01 January 2013Publication History
Skip Abstract Section

Abstract

Important challenges for embedded systems can be addressed by dynamic binary translation. A dynamic binary translator stores translated instructions in a software-managed code cache, which is usually large to minimize overhead. This article shows how to use a small scratchpad memory for the code cache. A small code cache may require frequent code evictions and retranslation, which degrade performance. We propose techniques to reduce the number of instructions inserted by the translator and a way to form fragments that minimizes translated code size. With our techniques, a much smaller code cache can hold a program's translated code working set.

References

  1. Austin, T., Larson, E., and Ernst, D. 2002. Simplescalar: An infrastructure for computer system modeling. Computer 35, 2, 59--67. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Baiocchi, J. and Childers, B. 2011. Demand code paging for nand flash in mmu-less embedded systems. In Proceedings of Design, Automation Test in Europe Conference Exhibition (DATE). 1--6.Google ScholarGoogle Scholar
  3. Baiocchi, J., Childers, B., Davidson, J., Hiser, J., and Misurda, J. 2007. Fragment cache management for dynamic binary translators in embedded systems with scratchpad. In Proceedings of the International Conference on Compilers, Architecture and Synthesis for Embedded Systems. ACM, New York, NY, 75--84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bala, V., Duesterwald, E., and Banerjia, S. 2000. Dynamo: A transparent dynamic optimization system. In Proceedings of the Conference on Programming Language Design and Implementation. ACM, New York, NY, 1--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Banakar, R., Steinke, S., Lee, B.-S., Balakrishnan, M., and Marwedel, P. 2002. Scratchpad memory: design alternative for cache on-chip memory in embedded systems. In Proceedings of the IEEE/ACM/IFIP International Conference on Hardware/Software Codesign. ACM, New York, NY, 73--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bruening, D. and Amarasinghe, S. 2005. Maintaining consistency and bounding capacity of software code caches. In Proceedings of the International Symposium on Code Generation and Optimization. 74--85. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bruening, D. and Kiriansky, V. 2008. Process-shared and persistent code caches. In Proceedings of the International Conference on Virtual Execution Environments. ACM, New York, NY, 61--70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bruening, D., Kiriansky, V., Garnett, T., and Banerji, S. 2006. Thread-shared software code caches. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE Computer Society, Los Alamitos, CA, 28--38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Bruening, D. L. 2004. Efficient, transparent, and comprehensive runtime code manipulation. Ph.D. thesis, Massachussets Institute of Technology. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Desoli, G., Mateev, N., Duesterwald, E., Faraboschi, P., and Fisher, J. 2002. Deli: a new run-time control point. In Proceedings of the International Symposium on Microarchitecture. 257--268. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Guha, A., Hazelwood, K., and Soffa, M. 2010. Balancing memory and performance through selective flushing of software code caches. In Proceedings of the International conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES). ACM, New York, NY, 1--10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Guha, A., Hazelwood, K., and Soffa, M. L. 2007. Reducing exit stub memory consumption in code caches. In Proceedings of the International Conference on High-Performance Embedded Architectures and Compilers. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Guha, A., Hazelwood, K., and Soffa, M. L. 2008. Code lifetime based memory reduction for virtual execution environments. In Proceedings of the Workshop on Optimizations for DSP and Embedded Systems.Google ScholarGoogle Scholar
  14. Guthaus, M. R., Ringenberg, J. S., Ernst, D., Austin, T. M., Mudge, T., and Brown, R. B. 2001. Mibench: A free, commercially representative embedded benchmark suite. In Proceedings of the IEEE International Workshop on Workload Characterization. 3--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hazelwood, K. and Smith, M. 2002. Code cache management schemes for dynamic optimizers. In Proceedings of the Workshop on Interaction between Compilers and Computer Architectures. 92--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Hazelwood, K. and Smith, M. 2006. Managing bounded code caches in dynamic binary optimization systems. ACM Trans. Archit. Code Optimiz. 3, 3, 263--294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hiser, J., Williams, D., Filipi, A., Davidson, J., and Childers, B. 2006. Evaluating fragment construction policies for sdt systems. In Proceedings of the International Conference on Virtual Execution Environments. ACM, New York, NY, 122--132. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Hiser, J. D., Williams, D. W., Hu, W., Davidson, J. W., Mars, J., and Childers, B. R. 2011. Evaluating indirect branch handling mechanisms in software dynamic translation systems. ACM Trans. Archit. Code Optimiz. 8, 9:1--9:28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Hu, W., Hiser, J., Williams, D., Filipi, A., Davidson, J., Evans, D., Knight, J., Nguyen-Tuong, A., and Rowanhill, J. 2006. Secure and practical defense against code-injection attacks using software dynamic translation. In Proceedings of the International Conference on Virtual Execution Environments. ACM, New York, NY, 2--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Intel Corp. 2006. Intel PXA27x Processor's Family - Developer's Manual. Intel Corp.Google ScholarGoogle Scholar
  21. Kiriansky, V., Bruening, D., and Amarasinghe, S. 2002. Secure execution via program shepherding. In Proceedings of the USENIX Security Symposium. USENIX Association, Berkeley, CA, 191--206. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Luk, C.-K., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V. J., and Hazelwood, K. 2005. Pin: Building customized program analysis tools with dynamic instrumentation. In Proceedings of the Conference on Programming Language Design and Implementation. ACM, New York, NY, 190--200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Miller, J. E. and Agarwal, A. 2006. Software-based instruction caching for embedded processors. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems. ACM, New York, NY, 293--302. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Moore, R. W., Baiocchi, J. A., Childers, B. R., Davidson, J. W., and Hiser, J. D. 2009. Addressing the challenges of dbt for the arm architectures. In Proceedings of the Conference on Language, Compilers and Tools for Embedded Systems. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Nethercote, N. and Seward, J. 2007. Valgrind: a framework for heavyweight dynamic binary instrumentation. In Proceedings of the Conference on Programming Language Design and Implementation. ACM, New York, NY, 89--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Scott, K., Kumar, N., Velusamy, S., Childers, B., Davidson, J., and Soffa, M. L. 2003. Retargetable and reconfigurable software dynamic translation. In Proceedings of the International Symposium on Code Generation and Optimization. 36--47. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Shogan, S. and Childers, B. 2004. Compact binaries with code compression in a software dynamic translator. In Proceedings of the Design, Automation and Test in Europe Conference and Exhibition. Vol. 2, 1052--1057. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Smith, J. E. and Nair, R. 2005. Virtual Machines: Versatile Platforms for Systems and Processes. The Morgan Kaufmann Series in Computer Architecture and Design, Morgan Kaufmann Publishers Inc., San Francisco, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Sridhar, S., Shapiro, J., Northup, E., and Bungale, P. 2006. HDTrans: An open source, low-level dynamic instrumentation systems. In Proceedings of the International Conference on Virtual Execution Environments. ACM, New York, NY, 175--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Udayakumaran, S., Dominguez, A., and Barua, R. 2006. Dynamic allocation for scratch-pad memory using compile-time decisions. ACM Trans. Embed. Comput. Syst. 5, 2, 472--511. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Verma, M. and Marwedel, P. 2006. Overlay techniques for scratchpad memories in low power embedded processors. IEEE Trans. VLSI 14, 8, 802--815. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Wu, Q., Reddi, V., Wu, Y., Lee, J., Connors, D., Brooks, D., Martonosi, M., and Clark, D. 2005. A dynamic compilation framework for controlling microprocessor energy and performance. In Proceedings of the International Symposium on Microarchitecture. IEEE Computer Society, Los Alamitos, CA, 271--282. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Enabling dynamic binary translation in embedded systems with scratchpad memory

              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!