TinyOS Operating System Introduction

Source: Internet
Author: User

TinyOS Operating System Introduction

The TinyOS operating system is an open-source operating system developed by UC Berkeley (University of California, Berkeley), specifically designed for embedded wireless sensor networks, which is based on components (component-based) architecture allows the program to update quickly, while reducing the length of code that is limited by node memory in the sensor network.

Generally speaking, the components of the TinyOS operating system are divided into 3 types: hardware abstraction Components , synthetic hardware components , and high-level software components . The hardware abstraction component TinyOS the physical hardware devices. In the TinyOS system platform, each hardware resource is abstracted into one or more easy-to-operate components, and the user program accesses these resources simply by invoking the corresponding functional interfaces of the corresponding components to implement the operation of the hardware. The role of synthetic hardware components is to connect hardware abstraction components to high-level software components. It can take advantage of the interface provided by the hardware abstraction component to implement functions that are higher than the hardware abstraction components, such as sending and receiving bytes. The high-level software component realizes the control of the whole system, establishes the routing and the data transmission and so on. Multiple lower-level components can be connected to make up a larger component, and the topmost component is the application. TinyOS is shown in hierarchy 1.

                                                                                                                             Figure 1 Hierarchy of TinyOS

TinyOS provides a two-level scheduling mechanism for tasks and events . Tasks are typically used for applications with low time requirements, which is actually a mechanism for delaying computation. Tasks are equal to each other, there is no priority, so the scheduling of tasks uses a simple FIFO. Tasks do not preempt each other, that is, once a task runs, it must be executed to the end, and the next task can be run when the task voluntarily discards the CPU usage. Hardware event handling handles to respond to hardware interrupts, which can preempt tasks or other hardware event handling handles. When an event is triggered, all tasks associated with the event are executed quickly, and when the event and task are processed, the CPU goes to sleep until other events wake it up. In general, the TinyOS scheduling model has the following characteristics:

(1) The task single-threaded run to the end, allocating only a single task stack, which is beneficial to the memory constrained system.

(2) The Task scheduling algorithm adopts non-preemptive FIFO algorithm, the task is equal to each other, and there is no priority.

(3) The TinyOS scheduling strategy has the energy consciousness, when the task queue is empty, the processor enters the sleep mode, until the external event wakes it up, which can effectively reduce the system energy consumption.

(4) This event-based scheduling strategy allows independent components to share the context of a single execution, allowing for a high degree of concurrency with minimal running space.

The dispatch procedure for TinyOS is shown in 2.


Figure 2 Scheduling process for TinyOS


TinyOS Operating System Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.