Abstract
The limited built-in configurability of Linux can lead to expensive code size overhead when it is used in the embedded market. To overcome this problem, we propose the application of link-time compaction and specialization techniques that exploit the a priori known, fixed runtime environment of many embedded systems. In experimental setups based on the ARM XScale and i386 platforms, the proposed techniques are able to reduce the kernel memory footprint with over 16%. We also show how relatively simple additions to existing binary rewriters can implement the proposed techniques for a complex, very unconventional program, such as the Linux kernel. We note that even after specialization, a lot of seemingly unnecessary code remains in the kernel and propose to reduce the footprint of this code by applying code-compression techniques. This technique, combined with the previous ones, reduces the memory footprint with over 23% for the i386 platform and 28% for the ARM platform. Finally, we pinpoint an important code size growth problem when compaction and compression techniques are combined on the ARM platform.
- Anckaert, B., Vandeputte, F., De Bus, B., De Sutter, B., and De Bosschere, K. 2004. Link-time optimization of IA64 binaries. In Proceedings of the 2004 Euro-Par Conference. 284--291.Google ScholarCross Ref
- Bhatia, S., Consel, C., and Pu, C. 2004. Remote customization of systems code for embedded devices. In EMSOFT '04: Proceedings of the 4th ACM international conference on Embedded software. ACM Press, New York. 7--15. Google ScholarDigital Library
- Chanet, D., De Sutter, B., De Bus, B., Van Put, L., and De Bosschere, K. 2005. System-wide compaction and specialization of the Linux kernel. In Proc. of the 2005 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES). 95--104. Google ScholarDigital Library
- Citron, D., Haber, G., and Levin, R. 2004. Reducing program image size by extracting frozen code and data. In EMSOFT '04: Proceedings of the 4th ACM international conference on Embedded software. ACM Press, New York. 297--305. Google ScholarDigital Library
- Clausen, L., Schultz, U., Consel, C., and Muller, G. 2000. Java bytecode compression for low-end embedded systems. ACM Transactions on Programming Languages and Systems 22, 3 (May), 471--489. Google ScholarDigital Library
- Cohn, R., Goodwin, D., Lowney, P., and Rubin, N. 1997. Spike: An optimizer for Alpha/NT executables. In Proceedings of the USENIX Windows NT Workshop. 17--24. Google ScholarDigital Library
- Corliss, M., Lewis, E., and Roth, A. 2003. A DISE implementation of dynamic code decompression. In Proceedings of the ACM SIGPLAN 2003 Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES'03). 232--243. Google ScholarDigital Library
- Cours, J., Navarro, N., and Hwu, W. 2004. Using coverage-based analysis to automate the customization of the Linux kernel for embedded applications. M.S. thesis, University of Illinois at Urbana-Champaign.Google Scholar
- De Bus, B. 2005. Reliable, retargetable and extensible link-time program rewriting. Ph.D. thesis, Ghent University.Google Scholar
- De Bus, B., Kästner, D., Chanet, D., Van Put, L., and De Sutter, B. 2003. Post-pass compaction techniques. Communications of the ACM 46, 8 (Aug.), 41--46. Google ScholarDigital Library
- De Bus, B., De Sutter, B., Van Put, L., Chanet, D., and De Bosschere, K. 2004. Link-time optimization of ARM binaries. In Proc. of the 2004 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES). 211--220. Google ScholarDigital Library
- De Sutter, B., De Bus, B., De Bosschere, K., and Debray, S. 2001. Combining global code and data compaction. In Proc. of the ACM SIGPLAN Workshop on Languages, Compilers, and Tools for Embedded Systems. 29--38. Google ScholarDigital Library
- De Sutter, B., De Bus, B., and De Bosschere, K. 2002. Sifting out the mud: low level C++ code reuse. In Proceedings of the 17th ACM SIGPLAN conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 275--291. Google ScholarDigital Library
- De Sutter, B., De Bus, B., and De Bosschere, K. 2005. Link-time binary rewriting techniques for program compaction. ACM Transactions on Programming Languages and Systems 27, 5 (9), 882--945. Google ScholarDigital Library
- De Sutter, B., Van Put, L., Chanet, D., De Bus, B., and De Bosschere, K. 2006. Link-time compaction and optimization of ARM executables. ACM Transactions on Embedded Computing Systems. To appear. Google ScholarDigital Library
- Debray, S., Muth, R., and Weippert, M. 1998. Alias analysis of executable code. In Proceedings of the ACM 1998 Symposium on Principles of Programming Languages (POPL'98). 12--24. Google ScholarDigital Library
- Debray, S. and Evans, W. 2002. Profile-guided code compression. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation. ACM Press, New York. 95--105. Google ScholarDigital Library
- Debray, S., Evans, W., Muth, R., and De Sutter, B. 2002. Compiler techniques for code compaction. ACM Transactions on Programming Languages and Systems 22, 2 (3), 378--415. Google ScholarDigital Library
- Denys, G., Piessens, F., and Matthijs, F. 2002. A survey of customizability in operating systems research. ACM Comput. Surv. 34, 4, 450--468. Google ScholarDigital Library
- Ernst, J., Evans, W., Fraser, C., Lucco, S., and Proebsting, T. 1997. Code compression. In Proceedings of the 1997 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'97). 358--365. Google ScholarDigital Library
- Evans, W. S. and Fraser, C. W. 2001. Bytecode compression via profiled grammar rewriting. In PLDI '01: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation. ACM Press, New York. 148--155. Google ScholarDigital Library
- Fassino, J.-P., Stefani, J.-B., Lawall, J. L., and Muller, G. 2002. Think: A software framework for component-based operating system kernels. In Proceedings of the General Track: 2002 USENIX Annual Technical Conference. USENIX Association, Berkeley, CA. 73--86. Google ScholarDigital Library
- Flower, R., Luk, C.-K., Muth, R., Patil, H., Shakshober, J., Cohn, R., and Lowney, G. 2001. Kernel optimizations and prefetch with the spike executable optimizer. In Proc of the 4th Workshop on Feedback-Directed and Dynamic Optimization (FDDO-4).Google Scholar
- Ford, B., Back, G., Benson, G., Lepreau, J., Lin, A., and Shivers, O. 1997. The flux oskit: a substrate for kernel and language research. In SOSP '97: Proceedings of the 16th ACM symposium on Operating systems principles. ACM Press, New York. 38--51. Google ScholarDigital Library
- Franz, M. 1997. Adaptive compression of syntax trees and iterative dynamic code optimization: Two basic technologies for mobile-object systems. In Mobile Object Systems: Towards the Programmable Internet, J. Vitek and C. Tschudin, Eds. Number 1222 in LNCS. Springer, New York. 263--276. Google ScholarDigital Library
- Franz, M. and Kistler, T. 1997. Slim binaries. Communications of the ACM 40, 12 (Dec.), 87--94. Google ScholarDigital Library
- Fraser, C. 1999. Automatic inference of models for statistical code compression. In Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation (PLDI'99). 242--246. Google ScholarDigital Library
- Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., and Culler, D. 2003. The nesC language: A holistic approach to networked embedded systems. In PLDI '03: Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation. ACM Press, New York. 1--11. Google ScholarDigital Library
- Hind, M. 2001. Pointer analysis: Haven't we solved this problem yet? In 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE'01). Snowbird, UT. Google ScholarDigital Library
- Kemp, T. M., Montoye, R. M., Harper, J. D., Palmer, J. D., and Auerbach, D. J. 1998. A decompression core for PowerPC. IBM J. Research and Development 42, 6 (Nov.). Google ScholarDigital Library
- Kirovski, D., Kin, J., and Mangione-Smith, W. H. 1997. Procedure based program compression. In Proceedings of the 30th Annual International Symposium on Microarchitecture (MICRO-30). Google ScholarDigital Library
- Krintz, C. and Wolski, R. 2005. Using phase behavior in scientific application to guide Linux operating system customization. In IPDPS '05: Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS'05)---Workshop 10. IEEE Computer Society, Washington, DC. 219.1. Google ScholarDigital Library
- Lee, C.-T., Lin, J.-M., Hong, Z.-W., and Lee, W.-T. 2004. An application-oriented Linux kernel customization for embedded systems. Journal of Information Science and Engineering 20, 6, 1093--1107.Google Scholar
- Lekatsas, H., Henkel, J., Chakradhar, S., Jakkula, V., and Sankaradass, M. 2003. Coco: a hardware/software platform for rapid prototyping of code compression technologies. In Proceedings of the 40th conference on Design Automation (DAC). 306--311. Google ScholarDigital Library
- Levine, J. 2000. Linkers & Loaders. Morgan Kaufmann, San Matco, CA.Google Scholar
- Linn, C., Debray, S., Andrews, G., and Schwarz, B. 2004. Stack analysis of x86 executables. Available from http://www.cs.arizona.edu/people/debray.Google Scholar
- Madou, M., De Sutter, B., De Bus, B., Van Put, L., and De Bosschere, K. 2004. Link-time optimization of MIPS programs. In Proceedings of the 2004 International Conference on Embedded Systems and Applications (ESA'04).Google Scholar
- McNamee, D., Walpole, J., Pu, C., Cowan, C., Krasic, C., Goel, A., Wagle, P., Consel, C., Muller, G., and Marlet, R. 2001. Specialization tools and techniques for systematic optimization of system software. ACM Trans. Comput. Syst. 19, 2, 217--251. Google ScholarDigital Library
- McVoy, L. and Staelin, C. 1996. lmbench: Portable tools for performance analysis. In USENIX Annual Technical Conference. Google ScholarDigital Library
- Muchnick, S. S. 1997. Advanced Compiler Design & Implementation. Morgan Kaufmann, San Matco, CA. Google ScholarDigital Library
- Muth, R., Debray, S., Watterson, S., and De Bosschere, K. 2001. Alto: a link-time optimizer for the Compaq Alpha. Software---Practice and Experience 31, 1, 67--101. Google ScholarDigital Library
- Proebsting, T. 1995. Optimizing an ANSI C interpreter with superoperators. In Proceedings of the ACM SIGPLAN-SIGACT 1995 Symposium on Principles of Programming Languages (POPL'95). 322--332. Google ScholarDigital Library
- Pugh, W. 1999. Compressing Java class files. In Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'99). 247--258. Google ScholarDigital Library
- Ros, M. and Sutton, P. 2003. Compiler optimization and ordering effects on VLIW code compression. In Proceedings of the 2003 International Conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES). 95--103. Google ScholarDigital Library
- Schmidt, W., Roediger, R., Mestad, C., Mendelson, B., Shavit-Lottem, I., and Bortnikov-Sitnitsky, V. 1998. Profile-directed restructuring of operating system code. IBM Systems Journal 37, 2. Google ScholarDigital Library
- Schwarz, B., Debray, S., Andrews, G., and Legendre, M. 2001. PLTO: A link-time optimizer for the Intel IA-32 architecture. In Proc. 2001 Workshop on Binary Rewriting (WBT-2001).Google Scholar
- Speer, S. E., Kumar, R., and Partridge, C. 1994. Improving UNIX kernel performance using profile based optimization. In 1994 Winter USENIX. 181--188. Google ScholarDigital Library
- Srivastava, A. and Wall, D. 1994. Link-time optimization of address calculation on a 64-bit architecture. In Proc. of the 1994 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). 49--60. Google ScholarDigital Library
- Tamches, A. and Miller, B. P. 1999. Fine-grained dynamic instrumentation of commodity operating system kernels. In Operating Systems Design and Implementation. 117--130. Google ScholarDigital Library
- Tamches, A. and Miller, B. P. 2001. Dynamic kernel code optimization. In Workshop on Binary Translation (WBT-2001).Google Scholar
- TriMedia Technologies Inc. 2000. TriMedia32 Architecture. TriMedia Technologies Inc.Google Scholar
Index Terms
- Automated reduction of the memory footprint of the Linux kernel
Recommendations
System-wide compaction and specialization of the linux kernel
LCTES '05: Proceedings of the 2005 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systemsThe limited built-in configurability of Linux can lead to expensive code size overhead when it is used in the embedded market. To overcome this problem, we propose the application of link-time compaction and specialization techniques that exploit the a ...
Memory footprint reduction for embedded systems
SCOPES '08: Proceedings of the 11th international workshop on Software & compilers for embedded systemsThe memory footprint is considered an important constraint for embedded systems. This is especially important in the context of increasing sophistication of embedded software, and the increasing use of modern software engineering techniques like ...
System-wide compaction and specialization of the linux kernel
Proceedings of the 2005 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systemsThe limited built-in configurability of Linux can lead to expensive code size overhead when it is used in the embedded market. To overcome this problem, we propose the application of link-time compaction and specialization techniques that exploit the a ...
Comments