Abstract
Embedded systems usually lack virtual memory and are vulnerable to memory overflow since they lack a mechanism to detect overflow or use swap space thereafter. We present a method to detect memory overflows using compiler-inserted software run-time checks. Its overheads in run-time and energy are 1.35 and 1.12%, respectively. Detection of overflow allows system-specific remedial action. We also present techniques to grow the stack or heap segment after they overflow, into previously unutilized space, such as dead variables, free holes in the heap, and space freed by compressing live variables. These may avoid the out-of-memory error if the space recovered is enough to complete execution. The reuse methods are able to grow the stack or heap beyond its overflow by an amount that varies widely by application---the amount of recovered space ranges from 0.7 to 93.5% of the combined stack and heap size.
- Analysis, S. Ó. S. U. AbsInt Inc. http://www.absint.com/stackanalyzer/.Google Scholar
- Appel, A. W. and Ginsburg, M. 1998. Modern Compiler Implementation in C. Cambridge Univ. Press, Cambridge. Google Scholar
- Baynes, K., Collins, C., Fiterman, E., Ganesh, B., Kohout, P., Smit, C., Zhang, T., and Jacob, B. 2003. The performance and energy consumption of embedded real-time operating systems. IEEE Trans. Comput. 52, 11 (Nov.), 1454--1469. Google Scholar
- Behren, R. V., Condit, J., Zhou, F., Necula, G., and Brewer, E. 2003. Cappricio: Scalable threads for internet services. In Proc., ACM Symposium on Operating Systems Principles (SOSP) (New York). Google Scholar
- Bobrow, D. and Wegbreit, B. 1973. A model and stack implementation of multiple environments. In Communications of the ACM. 591--603. Google Scholar
- Brylow, D., Damgaard, N., and Palsberg, J. 2000. Stack-size Estimation for Interrupt-driven Microcontrollers. Tech. rep., Purdue University. June. http://www.brics.dk/~damgaard/Download/zilog-test.pdf.Google Scholar
- Carbone, J. 2004. Efficient memory protection for embedded systems. RTC Magazine. http://www.rtcmagazine.com/home/article.php?id=100120.Google Scholar
- Chatterjee, K., Ma, D., Majumdar, R., Zhao, T., Henzinger, T. A., and Palsberg, J. 2003. Stack size analysis of interrupt driven software. In Proceedings of the International Static Analysis Symposium (SAS). 109--126. Google Scholar
- Chen, G., Shetty, R., Kandemir, M., Vijaykrishnan, N., and Irwin, M. 2002. Tuning garbage collection in an embedded Java environment. In Eighth International Symposium on High-Performance Computer Architecture (HPCA'02). IEEE, Boston, MA. 92--106. Google Scholar
- compiler, T. G. Free Software Foundation. http://gcc.gnu.org/.Google Scholar
- Diwan, A., Moss, J. E., and McKinley, K. 1996. Simple and effective analysis of statically-typed object-oriented programs. In Proc. of the 11th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, New York. 292--305. Google Scholar
- Durrant, M. 2000. Running Linux on low cost, low power MMU-less processors. http://www.linuxdevices.com/articles/AT6245686197.html.Google Scholar
- Engblom, J. 1999. Static properties of commercial embedded real-time programs and their implication for worst-case execution time analysis. In Proc. of the IEEE Real-Time Technology & Applications Symposium (RTAS) Vancouver, Canada. Google Scholar
- 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 4th Annual Workshop on Workload Characterization. Google Scholar
- Hauck, E. and Dent, B. 1968. Burroughs b 6500/b 7500 stack mechanism. In Proceedings of AFIPS, SJCC, Vol. 32. 245--251.Google Scholar
- Heckmann, R. and Ferdinand, C. 2005. Verifying safety-critical timing and memory-usage properties of embedded software by abstract interpretation. In Proceedings of Design, Automation and Test in Europe (DATE'05). 618--619. Google Scholar
- Hennessy, J. and Patterson, D. 2002. Computer Architecture: A Quantitative Approach, 3rd Ed. Morgan Kaufmann, San Mateo, CA. Google Scholar
- Jacob, B. L. and Mudge, T. N. 2001. Uniprocessor virtual memory without TLBs. IEEE Transactions on Computers 50, 5 (May), 482--499. Google Scholar
- Jagger, D. and Seal, D. 2000. ARM Architecture Reference Manual. Addison Wesley, Reading, MA. Google Scholar
- Janzen, J. 2001. Calculating Memory System Power for DDR SDRAM. In DesignLine Journal. Vol. 10(2). Micron Technology Inc. http://www.micron.com/publications/designline.html.Google Scholar
- Kleidermacher, D. and Griglock, M. 2001. Safety-Critical Operating Systems. Embedded Systems Programming 14, 10 (Sept.). http://www.embedded.com/story/OEG20010829S0055.Google Scholar
- Krapf, R. C., Mattos, J. C. B., Spellmeier, G., and Carro, L. 2002. A study on a garbage collector for embedded applications. In 15th Symposium on Integrated Circuits and Systems Design. Porto Alegre, Brazil. 127--134. Google Scholar
- Larin, S. Y. and Conte, T. M. 1999. Compiler-driven cached code compression schemes for embedded ILP processors. In 32nd Int'l Symposium on Microarchitecture. Haifa, Israel. 82--92. Google Scholar
- Lea, D. 2000. A Memory Allocator. http://gee.cs.oswego.edu/dl/html/malloc.html.Google Scholar
- micron-datasheet. 2003. 128Mb DDR SDRAM data sheet. (Dual data-rate synchronous DRAM) Micron Technology Inc. http://www.micron.com/products/dram/ddrsdram/.Google Scholar
- Neville-Neil, G. V. 2003. Programming without A net. ACM Queue: Tomorrow's Computing Today 1, 2 (Apr.), 16--23. Google Scholar
- Persson, P. 1999. Live memory analysis for garbage collection in embedded systems. In Proceedings of the ACM SIGPLAN 1999 Workshop on Languages, Compilers, and Tools for Embedded Systems. ACM Press, New York. 45--54. Google Scholar
- project debugger, G. T. G. Free Software Foundation. http://www.gnu.org/software/gdb/gdb.html.Google Scholar
- Red Hat, Inc. Newlib C Library. Red Hat, Inc. http://sources.redhat.com/newlib.Google Scholar
- Regehr, J., Reid, A., and Webb, K. 2003. Eliminating stack overflow by abstract interpretation. In Proceedings of the 3rd international conference on embedded software (EMSOFT). Springer-Verlag, New York.Google Scholar
- Simpson, M., Biswas, S., and Barua, R. 2003. Analysis of Compression Algorithms for Program Data. Tech. rep., U. of Maryland, ECE department. August. http://www.ece.umd.edu/~barua/matt-compress-tr.pdf.Google Scholar
- Simpson, M., Middha, B., and Barua, R. 2005. Segment protection for embedded systems using run-time checks. In Proceedings of the International Conference on Compilers, Architectures and Synthesis for Embedded Systems. Google Scholar
- Sinha, A. and Chandrakasan, A. 2001. JouleTrack---a web based tool for software energy profiling. In Design Automation Conference. 220--225. Google Scholar
- Solomon, D. 2000. Data Compression: The Complete Reference. Springer-Verlag, New York. Google Scholar
- Sundaresan, K. and Mahapatra, N. R. 2003. Code compression techniques for embedded systems and their effectiveness. In IEEE Computer Society Annual Symposium on VLSI (ISVLSI'03). Tampa, Florida. 262--263. Google Scholar
- Udayakumaran, S. and Barua, R. 2003. Compiler-decided dynamic memory allocation for scratch-pad based embedded systems. In Proceedings of the International Conference on Compilers, Architectures and Synthesis for Embedded Systems. ACM Press, New York. 276--286. Google Scholar
- Uhlig, R., Nagle, D., Stanley, T., Mudge, T., Sechrest, S., and Brown, R. 1994. Design tradeoffs for software-managed TLBs. Transactions on Computer Systems (TOCS) 12, 3, 175--205. Google Scholar
- Wilson, P. R., Kaplan, S. F., and Smaragdakis, Y. 1999. The case for compressed caching in virtual memory systems. In Proceedings of the USENIX Annual Technical Conference. Monterey, CA. Google Scholar
- Wind River, Inc. High availability design for embedded systems. Tech. rep., Wind River, Inc. http://www.windriver.com/whitepapers/high_availability_design.html.Google Scholar
- Witchel, E., Cates, J., and Asanović, K. 2002. Mondrian memory protection. In Proc. of the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). 304--316. Google Scholar
- Zhang, Y. and Gupta, R. 2002. Data compression transformations for dynamically allocated data structures. In Proceedings of the International Conference on Compiler Construction LNCS 2304. 14--28. Google Scholar
Index Terms
Memory overflow protection for embedded systems using run-time checks, reuse, and compression
Recommendations
Memory overflow protection for embedded systems using run-time checks, reuse and compression
CASES '04: Proceedings of the 2004 international conference on Compilers, architecture, and synthesis for embedded systemsOut-of-memory errors are a serious source of unreliability in most embedded systems. Applications run out of main memory because of the frequent difficulty of estimating the memory requirement before deployment, either because it depends on input data, ...
MTSS: Multitask stack sharing for embedded systems
Out-of-memory errors are a serious source of unreliability in most embedded systems. Applications run out of main memory because of the frequent difficulty of estimating the memory requirement before deployment, either because it depends on input data, ...
MTSS: multi task stack sharing for embedded systems
CASES '05: Proceedings of the 2005 international conference on Compilers, architectures and synthesis for embedded systemsOut-of-memory errors are a serious source of unreliability in most embedded systems [22]. Applications run out of main memory because of the frequent difficulty of estimating the memory requirement before deployment, either because it depends on input ...






Comments