Compiler-Assisted Maximum Stack Usage Measurement Technique for Efficient Multi-threading in Memory-Limited Embedded Systems

被引:0
作者
Park, Sung Ho [1 ]
Lee, Dong Kyu [1 ]
Kang, Soon Ju [1 ]
机构
[1] Kyungpook Natl Univ EECS, Taegu, South Korea
来源
COMPUTERS, NETWORKS, SYSTEMS, AND INDUSTRIAL ENGINEERING 2011 | 2011年 / 365卷
关键词
D O I
暂无
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
One of the reasons why it is hard to use multi-threading in memory-limited embedded systems is the difficulty of stack optimization. Some solutions for this problem have been proposed in prior research, but the proposed solutions were not totally effective. This paper proposes the compiler-assisted maximum stack usage measurement technique as a new solution for this problem. This technique measures the maximum stack usage of each thread with special code that is automatically inserted at the beginning of each function by the compiler. With the help of the operating system, the special code records the maximum stack usage of each thread in run-time. Also, the special code predicts and prevents stack overflow in run-time. Therefore, with this technique, the maximum stack usage of each thread can be precisely determined during testing, and thus allowing the stack of each thread to be accurately optimized. Unlike the solutions proposed in previous research, this technique does not have problems such as limited availability, the possibility of undetectable stack usage, and memory fragmentation. Although this technique adds some overhead, the overhead is added only during the stack optimization process in the development phase. Also, despite the necessity for modification of the compiler and operating system, this technique is easy to implement. It can be implemented by slight modification of the existing compiler and operating system. To verify this technique, it was implemented and evaluated on the ARM platform by modifying the GNU ARM C compiler and the Ubinos, which is an operating system for memory-limited embedded systems.
引用
收藏
页码:113 / 129
页数:17
相关论文
共 24 条
[1]  
Arm ltd, 1998, A05 ARM LTD
[2]  
Arm ltd, 2008, PROC CALL STAND ARM
[3]  
Arm ltd, 2008, REALVIEW COMP TOOLS
[4]   MANTIS OS: An embedded multithreaded operating system for wireless micro sensor platforms [J].
Bhatti, S ;
Carlson, J ;
Dai, H ;
Deng, J ;
Rose, J ;
Sheth, A ;
Shucker, B ;
Gruenwald, C ;
Torgerson, A ;
Han, R .
MOBILE NETWORKS & APPLICATIONS, 2005, 10 (04) :563-579
[5]  
Biswas S., 2006, ACM Transactions on Embedded Computing Systems (TECS), V5, P719, DOI DOI 10.1145/1196636.1196637
[6]   Static checking of interrupt-driven software [J].
Brylow, D ;
Damgaard, N ;
Palsberg, J .
PROCEEDINGS OF THE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 2001, :47-56
[7]   Stack size analysis for interrupt-driven programs [J].
Chatterjee, K ;
Ma, D ;
Majumdar, R ;
Zhao, T ;
Henzinger, TA ;
Palsberg, J .
INFORMATION AND COMPUTATION, 2004, 194 (02) :144-174
[8]  
Dunkels A, 2004, CONF LOCAL COMPUT NE, P455
[9]  
Dunkels A., 2006, P 4 INT C EMB NETW S
[10]  
Dunkels A, 2006, UIP EMBEDDED TCP IP