skip to main content
research-article

Quasistatic shared libraries and XIP for memory footprint reduction in MMU-less embedded systems

Published: 04 January 2009 Publication History

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.

References

[1]
Advanced Risc Machines, Ltd. 1995. An introduction to THUMB. http://www.cse.unsw.edu.au/~pcb/LPC210x/Thumb_intro.pdf.
[2]
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.
[3]
Arnold, J. 1986. Shared libraries on UNIX System V. In Proceedings of the USENIX Summer Conference. USENIX, Berkeley, CA.
[4]
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.
[5]
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.
[6]
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.
[7]
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.
[8]
Bingham, J. A. C. 2001. ADSL, VDSL, and Multicarrier Modulation. John Wiley & Sons, New York.
[9]
Cadenux. 2002. Cadenux XFLAG shared libraries. http://www.cadenux.com/xflat/.
[10]
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.
[11]
Choudhuri, S. and Givargis, T. 2005. Software virtual memory management for MMU-less embedded systems. Tech. rep. 05-16. University of California, Irvine.
[12]
Cortes, T., Becerra, Y., and Cervera, R. 2000. Swap compression: resurrecting old ideas. Softw. Prac. Exper. 30, 5, 567--587.
[13]
Gingell, R., Lee, M., Dang, X., and Weeks, M. 1987. Shared libraries in SunOS. In Proceedings of the USENIX Conference. USENIX, Berkeley, CA.
[14]
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.
[15]
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.
[16]
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.
[17]
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.
[18]
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.
[19]
Levine, J. R. 2000. Linkers and Loaders. Morgan Kaufmann, San Francisco, CA.
[20]
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.
[21]
McCullough, D. 2004. uCLinux for Linux programmers. Linux J. 123.
[22]
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.
[23]
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.
[24]
Murphy, D. 1972. Storage organization and management in TENEX. In Proceedings of the Fall Joint Computer Conference. ACM, New York, 23--32.
[25]
Organick, E. 1972. The Multics System: An Examination of Its Structure. MIT Press, Cambridge, MA.
[26]
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.
[27]
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.
[28]
Peacock, C. 2005. uClinux - BFLT binary flat format. http://www.beyondlogic.org/uClinux/bflt.htm.
[29]
Pietrek, M. 2002. An in-depth look into the Win32 portable executable file format. MSDN Mag. 17, 2, 80--90.
[30]
Rizzo, L. 1997. A very fast algorithm for RAM compression. ACM SIGOPS Oper. Syst. Rev. 31, 2, 36--45.
[31]
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.
[32]
Sabatella, M. 1990. Issues in shared library design. In Proceedings of the USENIX Summer Conference. USENIX, Berkeley, CA.
[33]
Scott, M. 2006. Programming Language Pragmatics. Morgan Kaufmann, San Francisco, CA.
[34]
Smaragdakis, Y., Kaplan, S., and Wilson, P. 1999. EELRU: simple and effective adaptive page replacement. In Proceedings of the ACM SIGMETRICS Conference. 122--133.
[35]
Stallman, R. M. 1999. Using and Porting the GNU Compiler Collection. Free Software Foundation.
[36]
Thomas, R. and Reddy, B. 2006. Dynamic linking in Linux and Windows. http://www.securityfocus.com/infocus/1872.
[37]
Tool Interface Standards Committee. 1995. Executable and linking format (ELF) specification version 1.2. Tool Interface Standards Committee.
[38]
Tremaine, R. and Franaszek, P. 2001. IBM memory expansion technology (MXT). IBM J. Resear. Devel. 45, 2, 271--285.
[39]
uClinux. uClinux Embedded Linux/Microcontroller Project. http://www.uClinux.org/.
[40]
Verneer, D. 1991. eXecute-in-place. Memory Card Mag.
[41]
Wells, N. 2000. BusyBox: A Swiss army knife for Linux. Linux J. 78.
[42]
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.
[43]
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.
[44]
Zucker, S. and Karhi, K. 1995. System V application binary interface: PowerPC processor supplement. SunSoft, Santa Carla, CA.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Embedded Computing Systems
ACM Transactions on Embedded Computing Systems  Volume 8, Issue 1
December 2008
214 pages
ISSN:1539-9087
EISSN:1558-3465
DOI:10.1145/1457246
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Journal Family

Publication History

Published: 04 January 2009
Accepted: 01 March 2008
Revised: 01 November 2007
Received: 01 February 2007
Published in TECS Volume 8, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Embedded systems
  2. MMU-less
  3. memory footprint reduction
  4. quasi-static linking
  5. shared library

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 428
    Total Downloads
  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)1
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media