Protothread

Ein Protothread ist in der Informatik ein leichtgewichtiger Mechanismus zur parallelen Programmierung.

Protothreads kommen im Gegensatz zu Threads ohne eigenen Stapelspeicher aus. Sie können blockierende Kontexte mit geringstmöglichem Speicherbedarf abbilden. Solche Aufgabenstellungen findet man in der Informatik häufig, zum Beispiel beim Umsetzen von Protokollen, bei Schnittstellen zwischen Computern und in eingebetteten Systemen.

Protothreads ist eine Art des kooperativen Multitasking. Deshalb können Kontextwechsel nur an speziell vorgesehenen Programmstellen stattfinden. Protothreads haben keinen eigenen Stapelspeicher, deshalb müssen lokale Variable statisch oder global definiert werden, wenn sie über einen Kontextwechsel hinweg erhalten bleiben sollen.

Protothreads verbinden die Vorteile von ereignisgetriebener (bzw. durch Zustandsautomaten gesteuerter) Programmierung mit threadorientierter Programmierung. Protothreads wurden von Adam Dunkels entwickelt und veröffentlicht.[1] Die Umsetzung von Adam Dunkels ist ANSI-C-konform und kommt ohne Maschinensprache aus. Eine weitere Umsetzung[2] nutzt spezifische Spracherweiterungen der GCC-Toolchain. Zwei bekannte, ebenfalls von Adam Dunkels veröffentlichte Projekte, der TCP/IP-Stack uIP[3] und das Betriebssystem Contiki[4], nutzen Protothreads.

Siehe auch

Belege

  1. Adam Dunkels: Protothreads - Lightweight, Stackless Threads in C (Memento des Originals vom 13. Oktober 2005 im Internet Archive)  Info: Der Archivlink wurde automatisch eingesetzt und noch nicht geprüft. Bitte prüfe Original- und Archivlink gemäß Anleitung und entferne dann diesen Hinweis.@1@2Vorlage:Webachiv/IABot/www.sics.se.
  2. Larry Ruane: Protothreads
  3. Adam Dunkels: The open source TCP/IP stack for embedded 8-Bit microcontrollers (Memento des Originals vom 30. April 2010 im Internet Archive)  Info: Der Archivlink wurde automatisch eingesetzt und noch nicht geprüft. Bitte prüfe Original- und Archivlink gemäß Anleitung und entferne dann diesen Hinweis.@1@2Vorlage:Webachiv/IABot/www.sics.se.
  4. Adam Dunkels: The Operating System for Embedded Smart Objects - the Internet of Things (Memento des Originals vom 25. August 2010 im Internet Archive)  Info: Der Archivlink wurde automatisch eingesetzt und noch nicht geprüft. Bitte prüfe Original- und Archivlink gemäß Anleitung und entferne dann diesen Hinweis.@1@2Vorlage:Webachiv/IABot/www.sics.se.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.