The development of a modern sensor network is difficult because of the long-term unattended operation mode, diverse application requirements, and stringent resource constraints. To address these issues, we design SenSpire OS, a predictable, flexible, and efficient operating system for sensor networks. We achieve system flexibility by providing a hybrid model for both event-driven programming and multithreaded programming. We have also designed an object-oriented programming language (CSpire) to enhance system usability and programming convenience. SenSpire OS has been implemented on three most commonly used sensor node platforms. The system is reported in IEEE TC 2011.