skip to main content
research-article

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

Authors Info & Claims
Published:04 January 2009Publication History
Skip Abstract Section

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

Index Terms

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

        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

        • Article Metrics

          • Downloads (Last 12 months)4
          • Downloads (Last 6 weeks)0

          Other Metrics

        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!