Global Information Lookup Global Information

Protothread information


A protothread is a low-overhead mechanism for concurrent programming.

Protothreads function as stackless, lightweight threads, or coroutines, providing a blocking context cheaply using minimal memory per protothread (on the order of single bytes).

Protothreads are used to accomplish a non-preempted form of concurrency known as cooperative multitasking and, therefore, do not incur context switch when yielding to another thread. Within a protothread, yielding is accomplished by utilizing Duff's device within a thread's function and an external variable used in within the switch statement. This allows jumping (resuming) from a yield upon another function call. In order to block threads, these yields may be guarded by a conditional so that successive calls to the same function will yield unless the guard conditional is true.

A feature of protothreads relative to other implementations of coroutines, or proper threads, is that they are stackless. This has advantages and disadvantages. A disadvantage is that local variables within the protothread cannot be trusted to have retained their values across a yield to another context. They must retain their state through the use of static or external, often global, variables.[1] An advantage is that they are very lightweight and therefore useful on severely memory constrained systems like small microcontrollers where other solutions are impractical or less desirable.

Tom Duff, of Duff's device fame, had this to say about the shortcomings of the method: "a similar trick for interrupt-driven state machines that is too horrible to go into. [...] I never thought it was an adequate general-purpose coroutine implementation because it’s not easy to have multiple simultaneous activations of a coroutine and it’s not possible using this method to have coroutines give up control anywhere but in their top-level routine. A simple assembly-language stack-switching library lets you do both of those."[2]

The protothread concept was developed by Adam Dunkels and Oliver Schmidt,[3] based on prior work by Simon Tatham[4] and Tom Duff.[2]

  1. ^ A. Dunkels, O. Schmidt, T. Voigt, and M. Ali, Protothreads: Simplifying Event-Driven Programming of Memory-Constrained Embedded Systems, Proc. ACM SenSys, Boulder, CO, USA, Nov 2006. (PDF, Presentation slides)
  2. ^ a b "Brainwagon » Coroutines in C".
  3. ^ Adam Dunkels. "Protothreads - Lightweight, Stackless Threads in C". Dunkels.com. Retrieved April 21, 2017.
  4. ^ "Coroutines in C".

and 15 Related for: Protothread information

Request time (Page generated in 0.5431 seconds.)

Protothread

Last Update:

A protothread is a low-overhead mechanism for concurrent programming. Protothreads function as stackless, lightweight threads, or coroutines, providing...

Word Count : 465

Contiki

Last Update:

small-memory systems, the Contiki programming model is based on protothreads. A protothread is a memory-efficient programming abstraction that shares features...

Word Count : 1365

Muneeb Ali

Last Update:

dissertation which formed the basis of the Stacks network. He is a co-author of Protothread and Proof-of-Transfer (PoX) consensus. Ali studied Computer Science at...

Word Count : 331

Microthread

Last Update:

Continuation Coroutine Fiber (computer science) Micro-thread (multi-core) Protothread Helmut Grohne (2006). "libmuth tutorial: Microthreads". subdivi.de. Retrieved...

Word Count : 199

Arduino

Last Update:

version is freely available. There is also a threading tool, named Protothreads. Protothreads are described as "extremely lightweight stackless threads designed...

Word Count : 4695

PowWow

Last Update:

(5 kbytes) uses event-driven programming and is currently derived from the Protothread library of Contiki. PowWow hardware platform is composed of a motherboard...

Word Count : 804

List of Internet entrepreneurs

Last Update:

RocketMail, Desktop.com Rod Drury Xero Adam Dunkels Contiki, LwIP, Protothread, uIP (micro IP) David Duffield Workday, Inc. PeopleSoft Kris Duggan BetterWorks...

Word Count : 134

Coroutine

Last Update:

Tom Duff in a discussion on its relative merits vs. the method used by Protothreads.[non-primary source needed] On platforms which provide the POSIX sigaltstack...

Word Count : 4991

Wireless sensor network

Last Update:

programming style in C while providing advances such as 6LoWPAN and Protothreads. RIOT (operating system) is a more recent real-time OS including similar...

Word Count : 6401

Green thread

Last Update:

Global interpreter lock Fiber (computer science) GNU Portable Threads Protothreads Sintes, Tony (April 13, 2001). "Four for the ages". JavaWorld. Retrieved...

Word Count : 1879

Virtual thread

Last Update:

Global interpreter lock Fiber (computer science) GNU Portable Threads Protothreads Rudell, Harald (2022-03-19). "massivevirtualparallelism". baeldung (2022-01-02)...

Word Count : 1399

List of programmers

Last Update:

operating system, the lwIP and uIP embedded TCP/IP stacks, invented protothreads Les Earnest – authored finger program Alan Edelman – Edelman's Law, stochastic...

Word Count : 3725

List of computer scientists

Last Update:

Susan Dumais – information retrieval Adam Dunkels – Contiki, lwIP, uIP, protothreads Jon Michael Dunn – founding dean of Indiana University School of Informatics...

Word Count : 5134

Adam Dunkels

Last Update:

(micro-IP) and lwIP TCP/IP Internet protocol suite (stacks). He invented protothreads and the operating system Contiki. The MIT Technology Review placed him...

Word Count : 414

Swedish Institute of Computer Science

Last Update:

multi-platform programming system Nemesis, a concept exokernel operating system Protothreads, light-weight stackless threads Quintus Prolog and SICStus Prolog, Prolog...

Word Count : 502

PDF Search Engine © AllGlobal.net