TY - GEN
T1 - Compiler-assisted maximum stack usage measurement technique for efficient multi-threading in memory-limited embedded systems
AU - Park, Sung Ho
AU - Lee, Dong Kyu
AU - Kang, Soon Ju
PY - 2011
Y1 - 2011
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=79960963227&partnerID=8YFLogxK
U2 - 10.1007/978-3-642-21375-5_10
DO - 10.1007/978-3-642-21375-5_10
M3 - Conference contribution
AN - SCOPUS:79960963227
SN - 9783642213748
T3 - Studies in Computational Intelligence
SP - 113
EP - 129
BT - Computers,Networks, Systems, and Industrial Engineering 2011
A2 - Lee, Roger
A2 - Byun, Yung-Cheol
A2 - Akingbehin, Kiumi
ER -