Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
TinyOS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Implementation== TinyOS applications are written in the programming language [[nesC]], a dialect of the [[C (programming language)|C language]] optimized for the memory limits of sensor networks.<ref name="programming">{{cite book |last1=Levis |first1=Philip |last2=Gay |first2=David |date=2009 |title=Programming TinyOS |url=https://www.cambridge.org/us/universitypress/subjects/engineering/wireless-communications/tinyos-programming |publisher=Cambridge University Press |isbn=9780521896061}}</ref> Its supplementary tools are mainly in the form of [[Java (programming language)|Java]] and [[shell script]] front-ends. Associated libraries and tools, such as the nesC compiler and [[Atmel AVR]] binutils toolchains, are mostly written in C. TinyOS programs are built of [[component-based software engineering|software components]], some of which present hardware abstractions. Components are connected to each other using [[interface (computer science)|interfaces]]. TinyOS provides interfaces and components for common abstractions such as packet communication, routing, sensing, actuation and storage. TinyOS is fully [[Asynchronous I/O|non-blocking]]: it has one [[call stack]]. Thus, all [[input/output]] (I/O) operations that last longer than a few hundred [[microsecond]]s are asynchronous and have a [[Callback (computer science)|callback]]. To enable the native [[compiler]] to better optimize across call boundaries, TinyOS uses nesC's features to link these callbacks, called events, statically. While being non-blocking enables TinyOS to maintain high concurrency with one stack, it forces programmers to write complex logic by stitching together many small event handlers. To support larger computations, TinyOS provides tasks, which are similar to a [[Deferred Procedure Call]] and [[interrupt handler]] bottom halves. A TinyOS component can post a task, which the OS will schedule to run later. Tasks are non-[[Preemption (computing)|preemptive]] and run in [[FIFO (computing and electronics)|first in, first out]] order. This simple [[Concurrency (computer science)|concurrency]] model is typically sufficient for I/O centric applications, but its difficulty with CPU-heavy applications has led to developing a [[Thread (computer science)|thread]] library for the OS, named TOSThreads. TOSThreads are unmaintained and have been deprecated.<ref>{{cite web |title=TinyOS development repository TOSThreads deprecated |url=https://github.com/tp-freeforall/prod/tree/2308921ea2f2a1d48abb24c115a7691e1e400140/deprecated |website=TinyOS current development repository |access-date=3 December 2018}}</ref> TinyOS code is statically linked with program code and is compiled into a small binary, using a custom [[GNU toolchain]]. Associated utilities are provided to complete a development platform for working with TinyOS.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)