InitRech 2015/2016, sujet 27
Summary
This documents talk about TinyOS which is an operating system for sensor networks. Due to their low cost, and their many possibilities of use, the Sensor networks are currently more and more spread. They will be lot of researches and jobs associated in this field because of some problem who needs to be resolve like limited resources due to their small size, reactive concurrency, flexibility to remove or replace some specific components (like sensor or software without bug) and finally the power cost which need to be reducing at the best.
Those four problemss are better and better resolve by TinyOs:
With few than 400 Bytes, TinyOS is a flexible Operating system implemented in NesC language. The NesC language is a language derivate form the C programming language. It allows to reduce the use of the memory and the power needs in calculation. This operating system doesn’t works like other OS, It is before anything else a device to program embedded systems to communicate and interact. All the components programmable by the tinyOS shares instructions for inter-component communication like commands and events, but also instructions for intra-component concurrency: tasks. Namely command can activate or initiate a sensor, event is used to signal the accomplishment of a command. A task allows scheduling the handler of commands and events.
A component can use two different types of interfaces, the first ones which are supply by it and on the contrary the seconds ones which are used by the component. An interface is a constituent of the component which is itself a component of a TinyOS program. Interfaces contain rightly commands and events. Above all of this, the NesC divide component in two types : modules and configurations. Modules are the programming code on the opposite, configurations are here to connect component together.
Several hardware interfaces are already implemented in the TinyOS to enable the System to be install and interact with lot of different devices.
The scheduling is made by asynchronous handlers. It is a FIFO scheduler which organize the executions of tasks. Handlers can interrupt a task if a task need to be quickly executed. Thanks to the NesC detection of data races, lots of bug are avoided. But Tiny OS can use some other method of scheduling g like earliest-deadline first if the users wants to. To improve the quality of schedule, the code is categorized in two different types: The asynchronous code opposite to the Synchronous code. The first is reachable from at least one interrupt handler while the second is one is only reachable from tasks. All these things enable TinyOS to have a real quick concurrency.
To limit the size of a Tiny OS program, the component graph of a program can know which component it needs, thanks to this it will not contains the other which are useless. During the compilation of a program, Tiny will reduce at the best the size of the code by removing redundancy and some other annoying stuffs.
Actually TinyOs can be used to make Habitat monitoring, objet tracking to localize precisely an object moving in a sensor field, which will be our sensor network with Tiny OS, or TinyDb which is a declarative query processor.