Abstract
Despite a rapid decrease in the price of solid state memory devices, system memory is still a very precious resource in embedded systems. The use of shared libraries and execution-in-place (XIP) is known to be effective in significantly reducing memory usage. Unfortunately, many resource-constrained embedded systems lack an MMU, making it extremely difficult to support these techniques. To address this problem, we propose a novel shared library technique called a quasi-static shared library and an XIP, both based on our enhanced position independent code technique. In our quasistatic shared libraries, global symbols are bound to pseudoaddresses at linking time and actual physical addresses are bound at loading time. Unlike conventional shared libraries, they do not require symbol tables that take up valuable memory space and, therefore, allow for expedited address translation at runtime. Our XIP technique is facilitated by our enhanced position independent code where a data section can be arbitrarily located. Both the shared library and XIP techniques are made possible by emulating an MMU's memory mapping feature with a data section base register (DSBR) and a data section base table (DSBT).
We have implemented these proposed techniques in a commercial ADSL (Asymmetric Digital Subscriber Line) home network gateway equipped with an MMU-less ARM7TDMI processor core, 2MB flash memory, and 16MB RAM. We measured its memory usage and evaluated its performance overhead by conducting a series of experiments. These experiments clearly demonstrate the effectiveness of our techniques in reducing memory usage. The results are impressive: 35% reduction in flash memory usage when using only the shared library and 30% reduction in RAM usage when using the shared library and XIP together. These results were achieved with only a negligible performance penalty of less than 4%. Even though these techniques were applied to uClinux-based embedded systems, they can be used for any MMU-less real-time operating system.
- Advanced Risc Machines, Ltd. 1995. An introduction to THUMB. http://www.cse.unsw.edu.au/~pcb/LPC210x/Thumb_intro.pdf.Google Scholar
- Advanced Risc Machines, Ltd. 2003. Procedure call standard for the ARM architecture. http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042c/IHI0042C_aapcs.pdf.Google Scholar
- Arnold, J. 1986. Shared libraries on UNIX System V. In Proceedings of the USENIX Summer Conference. USENIX, Berkeley, CA.Google Scholar
- Bai, L., Yang, L., and Dick, R. 2006. Automated compile-time and run-time techniques to increase usable memory in MMU-less embedded systems. In Proceedings of the International Conference on Compilers, Architecture and Synthesis for Embedded Systems. ACM, New York, 125--135. Google Scholar
Digital Library
- Bansal, S. and Modha, D. 2004. CAR: clock with adaptive replacement. In Proceedings of the 3rd USENIX Conference on File and Storage Technologies. USENIX, Berkeley, CA, 187--200. Google Scholar
Digital Library
- Beazley, D., Ward, B., and Cooke, I. 2001. The inside story on shared libraries and dynamic loading. IEEE Comput. Sci. Engin. 3, 5, 90--97. Google Scholar
Digital Library
- Benini, L., Bruni, D., Macii, A., and Macii, E. 2002. Hardware-assisted data compression for energy minimization in systems with embedded processors. In Proceedings of the Conference on Design, Automation and Test in Europe. IEEE, Los Alamitos, CA, 449--453. Google Scholar
Digital Library
- Bingham, J. A. C. 2001. ADSL, VDSL, and Multicarrier Modulation. John Wiley & Sons, New York. Google Scholar
Digital Library
- Cadenux. 2002. Cadenux XFLAG shared libraries. http://www.cadenux.com/xflat/.Google Scholar
- Choi, J., Noh, S., Min, S., Ha, E., and Cho, Y. 2002. Design, implementation, and performance evaluation of adetection-based adaptive block replacement scheme. IEEE Trans. Comput. 51, 7, 793--800. Google Scholar
Digital Library
- Choudhuri, S. and Givargis, T. 2005. Software virtual memory management for MMU-less embedded systems. Tech. rep. 05-16. University of California, Irvine.Google Scholar
- Cortes, T., Becerra, Y., and Cervera, R. 2000. Swap compression: resurrecting old ideas. Softw. Prac. Exper. 30, 5, 567--587. Google Scholar
Digital Library
- Gingell, R., Lee, M., Dang, X., and Weeks, M. 1987. Shared libraries in SunOS. In Proceedings of the USENIX Conference. USENIX, Berkeley, CA.Google Scholar
- Goodman, J. and Hsu, W. 1988. Code scheduling and register allocation in large basic blocks. In Proceedings of the 2nd International Conference on Supercomputing. ACM, New York, 442--452. Google Scholar
Digital Library
- Jiang, S., Chen, F., and Zhang, X. 2005. CLOCK-Pro: an effective improvement of the CLOCK replacement. In Proceedings of USENIX Annual Technical Conference. USENIX, Berkeley, CA. Google Scholar
Digital Library
- Lee, D., Choi, J., Kim, J., Noh, S., Min, S., Cho, Y., and Kim, C. 1999. On the existence of a spectrum of policies that subsumes the least recently used (LRU) and least frequently used (LFU) policies. In Proceedings of the ACM SIGMETRICS Conference on the Measurement and Modeling of Computer Systems (SIGMETRICS'99). ACM, New York, 134--143. Google Scholar
Digital Library
- Lee, J., Park, J., and Hong, S. 2006. Memory footprint reduction with quasi-static shared libraries in MMU-less embedded systems. In Proceedings of the 12th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'06). IEEE, Los Alamitos, CA, 24--36. Google Scholar
Digital Library
- Lekatsas, H., Henkel, J., and Wolf, W. 2000. Code compression for low power embedded system design. In Proceedings of the 37th Design Automation Conference (DAC'00). IEEE, Los Alamitos, CA, 294--299. Google Scholar
Digital Library
- Levine, J. R. 2000. Linkers and Loaders. Morgan Kaufmann, San Francisco, CA. Google Scholar
Digital Library
- Mahlke, S., Chen, W., Chang, P., and Hwu, W. 1992. Scalar program performance on multiple-instruction-issue processors with a limited number of registers. In Proceedings of the 25th Annual Hawaii International Conference on System Sciences (HICSS'25). IEEE, Los Alamitos, CA, 1--2.Google Scholar
- McCullough, D. 2004. uCLinux for Linux programmers. Linux J. 123. Google Scholar
Digital Library
- Megiddo, N. and Modha, D. 2003. ARC: a self-tuning, low overhead replacement cache. In Proceedings of the 2nd USENIX Conference on File and Storage Technologies. UNSNIX, Berkeley, CA, 115--130. Google Scholar
Digital Library
- Microsoft. 2006. Visual studio, microsoft portable executable and common object file format specification, Revision 8.0. http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx.Google Scholar
- Murphy, D. 1972. Storage organization and management in TENEX. In Proceedings of the Fall Joint Computer Conference. ACM, New York, 23--32. Google Scholar
Digital Library
- Organick, E. 1972. The Multics System: An Examination of Its Structure. MIT Press, Cambridge, MA. Google Scholar
Digital Library
- Park, C., Lim, J., Kwon, K., Lee, J., and Min, S. 2004. Compiler-assisted demand paging for embedded systems with flash memory. In Proceedings of the 4th ACM International Conference on Embedded Software (EMSOFT'04). ACM, New York, 114--124. Google Scholar
Digital Library
- Park, C., Seo, J., Bae, S., Kim, H., Kim, S., and Kim, B. 2003. A low-cost memory architecture with NAND XIP for mobile embedded systems. In Proceedings of the 1st IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis. ACM, New York, 138--143. Google Scholar
Digital Library
- Peacock, C. 2005. uClinux - BFLT binary flat format. http://www.beyondlogic.org/uClinux/bflt.htm.Google Scholar
- Pietrek, M. 2002. An in-depth look into the Win32 portable executable file format. MSDN Mag. 17, 2, 80--90.Google Scholar
- Rizzo, L. 1997. A very fast algorithm for RAM compression. ACM SIGOPS Oper. Syst. Rev. 31, 2, 36--45. Google Scholar
Digital Library
- Roy, S., Kumar, R., and Prvulovic, M. 2001. Improving system performance with compressed memory. In Proceedings of the IEEE 15th International Parallel and Distributed Processing Symposium (IPDPS'01). IEEE, Los Alamitos, CA. Google Scholar
Digital Library
- Sabatella, M. 1990. Issues in shared library design. In Proceedings of the USENIX Summer Conference. USENIX, Berkeley, CA.Google Scholar
- Scott, M. 2006. Programming Language Pragmatics. Morgan Kaufmann, San Francisco, CA. Google Scholar
Digital Library
- Smaragdakis, Y., Kaplan, S., and Wilson, P. 1999. EELRU: simple and effective adaptive page replacement. In Proceedings of the ACM SIGMETRICS Conference. 122--133. Google Scholar
Digital Library
- Stallman, R. M. 1999. Using and Porting the GNU Compiler Collection. Free Software Foundation.Google Scholar
- Thomas, R. and Reddy, B. 2006. Dynamic linking in Linux and Windows. http://www.securityfocus.com/infocus/1872.Google Scholar
- Tool Interface Standards Committee. 1995. Executable and linking format (ELF) specification version 1.2. Tool Interface Standards Committee.Google Scholar
- Tremaine, R. and Franaszek, P. 2001. IBM memory expansion technology (MXT). IBM J. Resear. Devel. 45, 2, 271--285. Google Scholar
Digital Library
- uClinux. uClinux Embedded Linux/Microcontroller Project. http://www.uClinux.org/.Google Scholar
- Verneer, D. 1991. eXecute-in-place. Memory Card Mag.Google Scholar
- Wells, N. 2000. BusyBox: A Swiss army knife for Linux. Linux J. 78. Google Scholar
Digital Library
- Xu, X. H., Clarke, C. T., and Jones, S. R. 2004. High performance code compression architecture for the embedded arm/thumb processor. In Proceedings of the International Conference on Computing Frontiers. 451--456. Google Scholar
Digital Library
- Yang, L., Dick, R., Lekatsas, H., and Chakradhar, S. 2006. Online memory compression for embedded systems. ACM Trans. Embed. Comput. Syst. 5, 4, 719--752.Google Scholar
- Zucker, S. and Karhi, K. 1995. System V application binary interface: PowerPC processor supplement. SunSoft, Santa Carla, CA.Google Scholar
Index Terms
Quasistatic shared libraries and XIP for memory footprint reduction in MMU-less embedded systems
Recommendations
Memory Footprint Reduction with Quasi-Static Shared Libraries in MMU-less Embedded Systems
RTAS '06: Proceedings of the 12th IEEE Real-Time and Embedded Technology and Applications SymposiumDespite a rapid decrease in the price of solid state memory devices, system memory is still a very precious resource in embedded systems. The use of shared libraries is known to be effective in significantly reducing memory usage. Unfortunately, many ...
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 ...
A compiler assisted wear leveling for morphable PCM in embedded systems
Phase change memory (PCM) is considered as a promising alternative of DRAM-based main memory in embedded systems. A PCM cell can be dynamically programmed to be in either multiple-level cell(MLC) mode or single-level cell(SLC) mode. With this morphable ...






Comments