ArticleslgStudy

computer science

TinyOS

TinyOS is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand TinyOS rather than just read about it. In short: TinyOS is an embedded, component-based operating system and platform for low-power wireless devices, such as those used in wireless sensor networks (WSNs), smartdust, ubiquitous computing, personal area networks, building automation, and smart meters. It is written in the programming language nesC, as a set of cooperating tasks and processes.

TinyOS — main illustration
TinyOS — illustration

Key takeaways

  • TinyOS belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect TinyOS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of TinyOS from memory before moving on to harder problems.

Reference excerpt

TinyOS is an embedded, component-based operating system and platform for low-power wireless devices, such as those used in wireless sensor networks (WSNs), smartdust, ubiquitous computing, personal area networks, building automation, and smart meters. It is written in the programming language nesC, as a set of cooperating tasks and processes. It began as a collaboration between the University of California, Berkeley, Intel Research, and Crossbow Technology, was released as free and open-source software under a BSD license, and has since grown into an international consortium, the TinyOS Alliance. TinyOS has been used in space, being implemented in ESTCube-1.

Implementation TinyOS applications are written in the programming language nesC, a dialect of the C language optimized for the memory limits of sensor networks. Its supplementary tools are mainly in the form of 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 software components, some of which present hardware abstractions. Components are connected to each other using interfaces. TinyOS provides interfaces and components for common abstractions such as packet communication, routing, sensing, actuation and storage. TinyOS is fully non-blocking: it has one call stack. Thus, all input/output (I/O) operations that last longer than a few hundred microseconds are asynchronous and have a 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-preemptive and run in first in, first out order. This simple concurrency model is typically sufficient for I/O centric applications, but its difficulty with CPU-heavy applications has led to developing a thread library for the OS, named TOSThreads. TOSThreads are unmaintained and have been deprecated. 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.

History TinyOS began as a project at UC Berkeley as part of the DARPA NEST program. It has since grown to involve thousands of academic and commercial developers and users worldwide. (list in reverse chronological order)

August 2012: TinyOS 2.1.2 released April 2010: TinyOS 2.1.1 released. August 2008: TinyOS 2.1.0 released. July 2007: TinyOS 2.0.2 released. Work on TinyOS 2.1, which involves slight changes to a few interfaces, begins. April 2007: TinyOS 2.0.1 released at the 4th TinyOS Technology Exchange in Cambridge, MA. November 2006: TinyOS 2.0 released at the SenSys conference in Boulder, CO. July 2006: TinyOS 2.0 beta2 released. February 2006: TinyOS 2.0 beta1 released at the 3rd TinyOS Technology Exchange in Stanford, CA. December 2005: TinyOS 1.1.15, the last 1.1 version, is released. July 2005: NEST project concludes. June 2004: Working group forms on next steps for TinyOS, based on experiences porting to new platforms. Group agrees to start work on 2.0. September 2003 – December 2005: TinyOS begins a periodic minor release process. August 2003: TinyOS version 1.1 is released, which includes new nesC features including data race detection. September 2002: TinyOS version 1.0, implemented in nesC, is released. April 2002: Work on the nesC programming language begins as a collaboration between Intel Research and UC Berkeley. February 2002: Berkeley distributes 1000 mica nodes to other participants in the NEST project. 2001: Berkeley develops the mica platform and releases TinyOS version 0.6. 2000: Berkeley designs the rene platform and partners with Crossbow, Inc., who mass-produces the hardware. TinyOS version 0.43 is made available to the public via SourceForge. Pre-1.0 versions of TinyOS are a mix of C and Perl scripts. 1999: First TinyOS platform (WeC) and OS implementations are developed at Berkeley.

Integrated development environments As of 2010, three integrated development environments (IDEs) are available for TinyOS, as plug-ins for Eclipse:

YETI 2, ETH Zürich (development stopped) XPairtise by Rasmus Pedersen, Copenhagen Business School TinyDT, Vanderbilt University

References

External links TinyOS on GitHub

Illustrations

TinyOS illustration

Worked examples

Example 1 — a first encounter with TinyOS

Start with the simplest possible case. Write down what TinyOS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to TinyOS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about TinyOS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of TinyOS

In research
TinyOS appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses TinyOS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
TinyOS is common in secondary-school and first-year university syllabi. It links to neighbouring topics Embedded operating systems, Software using the BSD license, Wireless sensor network, so understanding it makes those chapters shorter.
In everyday life
Look for TinyOS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study TinyOS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what TinyOS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain TinyOS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is TinyOS in simple terms?

TinyOS is an embedded, component-based operating system and platform for low-power wireless devices, such as those used in wireless sensor networks (WSNs), smartdust, ubiquitous computing, personal area networks, building automation, and smart meters. It is written in the programming language nesC…

Why does TinyOS matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study TinyOS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on TinyOS.

Tags

  • Embedded operating systems
  • Software using the BSD license
  • Wireless sensor network

Keep exploring