Protothreads - Lightweight Stackless Threads in C

Protothreads are a extremely lightweight, stackless threads designed for use in severely memory constrained systems such as embedded systems. Software for memory constrained embedded systems sometimes are based on an event-driven model rather than on multi-threading. While event-driven systems allow for reduced memory usage, they require programs to be developed as explicit state machines. Since implementing programs as explicit state machines is hard, developing, maintaining, and debugging programs for event-driven systems is difficult. Protothreads simplify implementation of high-level functionality on top of event-driven systems, without significantly increasing the memory requirements. Protothreads can be implemented in in the C programming language using 10 lines of code and 2 bytes of RAM per protothread.

[1]  Adam Dunkels,et al.  Full TCP/IP for 8-bit architectures , 2003, MobiSys '03.

[2]  Marvin Theimer,et al.  Cooperative Task Management Without Manual Stack Management , 2002, USENIX Annual Technical Conference, General Track.

[3]  John C. Reynolds,et al.  The discoveries of continuations , 1993, LISP Symb. Comput..

[4]  David E. Culler,et al.  The Emergence of Networking Abstractions and Techniques in TinyOS , 2004, NSDI.

[5]  Eric A. Brewer,et al.  USENIX Association Proceedings of HotOS IX : The 9 th Workshop on Hot Topics in Operating Systems , 2003 .

[6]  Adam Dunkels,et al.  Contiki - a lightweight and flexible operating system for tiny networked sensors , 2004, 29th Annual IEEE International Conference on Local Computer Networks.

[7]  Roger M. Needham,et al.  On the duality of operating system structures , 1979, OPSR.

[8]  Robert Tappan Morris,et al.  Event-driven programming for robust software , 2002, EW 10.

[9]  Ian F. Akyildiz,et al.  Sensor Networks , 2002, Encyclopedia of GIS.

[10]  Kay Römer,et al.  Beyond event handlers: programming wireless sensors with attributed state machines , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..