While a multithreading approach provides a convenient sensor application developing environment with automatic control flow and stack managment, it is considered to have a larger data memory requirement and energy consumption than an event-driven model. Current threaded sensor operating systems unfortunately do not provide appropriate solutions. This paper presents multithreading optimization techniques for sensor network operating systems. Our work focuses on the three major problems of implementing threads on resource-constraint sensor nodes--memory resources, energy consumption, and scheduling policy. Single kernel stack and the thread stack-size analysis techniques reduce the RAM requirement of thread model. The variable timer saves energy consumption and the event-boosting thread scheduling reflects the characteristics of sensor applications and provides fast response time to threads. The experimental results on a common sensor node show that the multithreaded system could be effe...