SlideShare a Scribd company logo
TinyOS
Overview
 Need

of TinyOS
 Market Target of TinyOS - WSNs
 What is TinyOS?
 Features of TinyOS
 TinyOS Structure
 TinyOS design models
 TinyOS Basic Constructs
 The nesC Language
Need of TinyOS


Problems with traditional OS :
 Multithreaded Architecture not useful
 Large Memory Footprint
 Does not help to conserve energy and power



Requirements for Wireless Sensor Networks :
 Efficient utilization of energy and power
 Small Footprint and support diversity in design
usage
Market Target of TinyOS


Wireless Sensor Network (Market Target
of TinyOS)

Wireless sensor networks mainly use broadcast
communication.Wireless sensing + Data
networking.
 Consist of sensor networks which have – Low
power, limited memory, energy constrained due to
small size.
 Large no. of heterogeneous sensor node devices
spread over a large field. Consist of sensors which
are distributed in an ad hoc manner.

Wireless Sensor Network
Typical architecture of sensor node
Operating System for WSN
Wireless Application Areas
What is TinyOS?
TinyOS is a free open source operating system.
 Designed for wireless sensor networks.
 TinyOS began as a collaboration between
University of California, Berkeley and Intel
Research.
 An embedded operating system written in nesC
language.
 It features a component based architecture.

TinyOS Design Models
 Component-based

model

(modularity)
Simple functions are incorporated in
components with clean interfaces;



Complex functions can be implemented
by composing components.


TinyOS Design Models
 Event-based model
 Interact with outside by events (no command
shell)
 There
•

•

are two kinds of events for TinyOS:
External events: Clock events and message
events;
Internal events: triggered by external events.
Hardware setup Overview
Features of TinyOS


Completely non-blocking



Programs are built out of software components.



Tasks are non-preemptive and run in FIFO
order.



TinyOS code is statically linked.
Structure of TinyOS
TinyOS as a Solution







Component based architecture allows frequent
changes while still keeping the size of code
minimum.
Event based execution model means no user/kernel
boundary and hence supports high concurrency.
It is power efficient as it makes the sensors sleep as
soon as possible.
Has small footprint as it uses a non-preemptable
FIFO task scheduling.
TinyOS Models
Data

Model
Thread Model
Programming Model
Component Model
Network Model
Data Memory Model


Static Memory Allocation
• No Heaps or any other dynamic structures used.
• Memory requirements determined at compile
time.
• This increases the runtime efficiency.
 Global variables
• Allocated on per frame basis.
 Local Variables
• Saved on the stack
• Defined in the function/method
Thread Model
 Power-Aware Two-levels Scheduling
Long running tasks and interrupt events
 Sleep unless tasks in queue, wakeup on event
 Tasks
 Time-flexible, background jobs
 Atomic with respect to other tasks
 Can be preempted by events
 Events
 Time-critical, shorter duration
 Last-in first-out semantic (no priority)
 Can post tasks for deferred execution

Programming Model





Separation construction/composition
Construction of Modules
 Modules implementation similar to C coding
 Programs are built out of components
 Each component specifies an interface
 Interfaces are “hooks” for wiring components
Composition of Configurations
 Components are statically wired together
 Increases programming efficiency (code reuse)
an runtime efficiency.
Component Model


Components should use and provide
bidirectional interfaces.



Components should call and implement
commands and signal and handle events.



Components must handle events of used
interfaces and also provide interfaces that
must implement commands.
Concurrency Model
TinyOS Basic Constructs
TinyOS Basic Constructs
 Commands


Cause actions to be initiated

 Events





Small amount of processing to be done in a timely
manner
E.g. timer, ADC interrupts
Notify that action has occurred.
Can interrupt longer running tasks
TinyOS Basic Constructs
 Tasks





Background Computation
Not time critical
Larger amount of processing. E.g. : computing the
average of a set of readings in an array
Run to completion with respect to other tasks.Only
need a single stack.
The nesC Language


nesC – network embedded
systems C

Application
(nesC)
nesC
compiler

TinyOS kernel(C)
TinyOS libs(nesC)

Application &
TinyOS (C)
C
compiler

Application
executable
The nesC Language








An extension to the C programming language, to
embody the concepts and execution model
of TinyOS.
Filename extension .nc
Static language
 No dynamic memory(malloc)
 No function pointers
 No heap
Includes task FIFO scheduler.
Designed to encourage code reuse.

More Related Content

PPTX
Contiki Operating system tutorial
PPTX
Node level simulators
PPTX
WSN presentation
PPTX
Energy consumption of wsn
PPTX
Unit IOT NETCONF.pptx
PPTX
wireless sensor network
PPT
Sensor networks
PPT
Wireless sensor Networks.ppt
Contiki Operating system tutorial
Node level simulators
WSN presentation
Energy consumption of wsn
Unit IOT NETCONF.pptx
wireless sensor network
Sensor networks
Wireless sensor Networks.ppt

What's hot (20)

PDF
Issues in routing protocol
PPT
PPTX
Wireless Sensor Networks ppt
PPTX
Zigbee Presentation
PPTX
Wireless Sensor Networks
PPTX
Bluetooth
PPTX
SPINS: Security Protocols for Sensor Networks
PPTX
Wireless sensor network applications
PPTX
PDF
Application Layer Protocols for the IoT
PPTX
mobile ad-hoc network (MANET) and its applications
PPTX
Mac protocols
PPTX
Mobile IP
PDF
Sensor Networks Introduction and Architecture
PPTX
IoT Levels and Deployment Templates
PPTX
WSN network architecture -Sensor Network Scenarios & Transceiver Design Consi...
PPTX
Real time Operating System
PPT
WSN IN IOT
PPTX
Iot architecture
Issues in routing protocol
Wireless Sensor Networks ppt
Zigbee Presentation
Wireless Sensor Networks
Bluetooth
SPINS: Security Protocols for Sensor Networks
Wireless sensor network applications
Application Layer Protocols for the IoT
mobile ad-hoc network (MANET) and its applications
Mac protocols
Mobile IP
Sensor Networks Introduction and Architecture
IoT Levels and Deployment Templates
WSN network architecture -Sensor Network Scenarios & Transceiver Design Consi...
Real time Operating System
WSN IN IOT
Iot architecture
Ad

Similar to TinyOS (20)

PPT
Tiny os
PDF
EEEM048_Lecture5_Software platforms and services .pdf
PDF
TinyOS programming 1st Edition Philip Levis
PDF
Nesc tutorial
PDF
TinyOS programming 1st Edition Philip Levis
PDF
TinyOS programming 1st Edition Philip Levis
PDF
nesC Part 1 (1).pdfbhhhhjjjjjjjjjjjjjjjjjkk
PPT
Lecture 5: Software platforms and services
PDF
(Ebook) TinyOS programming by Philip Levis, David Gay ISBN 9780521896061, 052...
PPT
0903 1
PPT
Introduction To Tiny Os And Contiki Os
PPT
Introduction to Tiny OS
PPTX
Wireless Sensor System Architecture
PDF
Review on operating systems and routing protocols for wireless sensor
PDF
T2: What the Second Generation Holds
PPT
Wsn handbook
PDF
Task & resource self adaptive
PDF
TASK & RESOURCE SELF-ADAPTIVE EMBEDDED REAL-TIME OPERATING SYSTEM MICROKERNEL...
PDF
Tos tutorial
Tiny os
EEEM048_Lecture5_Software platforms and services .pdf
TinyOS programming 1st Edition Philip Levis
Nesc tutorial
TinyOS programming 1st Edition Philip Levis
TinyOS programming 1st Edition Philip Levis
nesC Part 1 (1).pdfbhhhhjjjjjjjjjjjjjjjjjkk
Lecture 5: Software platforms and services
(Ebook) TinyOS programming by Philip Levis, David Gay ISBN 9780521896061, 052...
0903 1
Introduction To Tiny Os And Contiki Os
Introduction to Tiny OS
Wireless Sensor System Architecture
Review on operating systems and routing protocols for wireless sensor
T2: What the Second Generation Holds
Wsn handbook
Task & resource self adaptive
TASK & RESOURCE SELF-ADAPTIVE EMBEDDED REAL-TIME OPERATING SYSTEM MICROKERNEL...
Tos tutorial
Ad

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Understanding_Digital_Forensics_Presentation.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Network Security Unit 5.pdf for BCA BBA.
CIFDAQ's Market Insight: SEC Turns Pro Crypto
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Modernizing your data center with Dell and AMD
Unlocking AI with Model Context Protocol (MCP)
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf

TinyOS

  • 2. Overview  Need of TinyOS  Market Target of TinyOS - WSNs  What is TinyOS?  Features of TinyOS  TinyOS Structure  TinyOS design models  TinyOS Basic Constructs  The nesC Language
  • 3. Need of TinyOS  Problems with traditional OS :  Multithreaded Architecture not useful  Large Memory Footprint  Does not help to conserve energy and power  Requirements for Wireless Sensor Networks :  Efficient utilization of energy and power  Small Footprint and support diversity in design usage
  • 4. Market Target of TinyOS  Wireless Sensor Network (Market Target of TinyOS) Wireless sensor networks mainly use broadcast communication.Wireless sensing + Data networking.  Consist of sensor networks which have – Low power, limited memory, energy constrained due to small size.  Large no. of heterogeneous sensor node devices spread over a large field. Consist of sensors which are distributed in an ad hoc manner. 
  • 9. What is TinyOS? TinyOS is a free open source operating system.  Designed for wireless sensor networks.  TinyOS began as a collaboration between University of California, Berkeley and Intel Research.  An embedded operating system written in nesC language.  It features a component based architecture. 
  • 10. TinyOS Design Models  Component-based model (modularity) Simple functions are incorporated in components with clean interfaces;  Complex functions can be implemented by composing components. 
  • 11. TinyOS Design Models  Event-based model  Interact with outside by events (no command shell)  There • • are two kinds of events for TinyOS: External events: Clock events and message events; Internal events: triggered by external events.
  • 13. Features of TinyOS  Completely non-blocking  Programs are built out of software components.  Tasks are non-preemptive and run in FIFO order.  TinyOS code is statically linked.
  • 15. TinyOS as a Solution     Component based architecture allows frequent changes while still keeping the size of code minimum. Event based execution model means no user/kernel boundary and hence supports high concurrency. It is power efficient as it makes the sensors sleep as soon as possible. Has small footprint as it uses a non-preemptable FIFO task scheduling.
  • 16. TinyOS Models Data Model Thread Model Programming Model Component Model Network Model
  • 17. Data Memory Model  Static Memory Allocation • No Heaps or any other dynamic structures used. • Memory requirements determined at compile time. • This increases the runtime efficiency.  Global variables • Allocated on per frame basis.  Local Variables • Saved on the stack • Defined in the function/method
  • 18. Thread Model  Power-Aware Two-levels Scheduling Long running tasks and interrupt events  Sleep unless tasks in queue, wakeup on event  Tasks  Time-flexible, background jobs  Atomic with respect to other tasks  Can be preempted by events  Events  Time-critical, shorter duration  Last-in first-out semantic (no priority)  Can post tasks for deferred execution 
  • 19. Programming Model    Separation construction/composition Construction of Modules  Modules implementation similar to C coding  Programs are built out of components  Each component specifies an interface  Interfaces are “hooks” for wiring components Composition of Configurations  Components are statically wired together  Increases programming efficiency (code reuse) an runtime efficiency.
  • 20. Component Model  Components should use and provide bidirectional interfaces.  Components should call and implement commands and signal and handle events.  Components must handle events of used interfaces and also provide interfaces that must implement commands.
  • 23. TinyOS Basic Constructs  Commands  Cause actions to be initiated  Events     Small amount of processing to be done in a timely manner E.g. timer, ADC interrupts Notify that action has occurred. Can interrupt longer running tasks
  • 24. TinyOS Basic Constructs  Tasks     Background Computation Not time critical Larger amount of processing. E.g. : computing the average of a set of readings in an array Run to completion with respect to other tasks.Only need a single stack.
  • 25. The nesC Language  nesC – network embedded systems C Application (nesC) nesC compiler TinyOS kernel(C) TinyOS libs(nesC) Application & TinyOS (C) C compiler Application executable
  • 26. The nesC Language      An extension to the C programming language, to embody the concepts and execution model of TinyOS. Filename extension .nc Static language  No dynamic memory(malloc)  No function pointers  No heap Includes task FIFO scheduler. Designed to encourage code reuse.