SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
T2
                  What the Second Generation Holds
                                                         www.tinyos.net


Philip Levis, David Gay, Vlado Handziski, Jan Hauer, Jon Ko, Kevin Klues, John
Regehr, Janos Sallai, Miklos Maroti, Branislav Kusy, David Moss, Jan Beutel, Adam
Wolisz, and many more...
In the Beginning
                    (1999)




Sensor networks are on the horizon...
... but what are they going to do?
  What problems will be important?
  What will communication look like?
  What will hardware platforms look like?
Having an operating system is nice...
... but how do you design one with these
uncertainties?
The TinyOS Goals
               (ASPLOS 2000)




Allow high concurrency
Operate with limited resources
Adapt to hardware evolution
Support a wide range of applications
Be robust
Support a diverse set of platforms
TinyOS Basics

A program is a set of components
  Components can be easily developed and reused
     Adaptable to many application domains
  Components can be easily replaced
  Components can be hardware or software
     Allows boundaries to change unknown to programmer

Hardware has internal concurrency
  Software needs to be able to have it as well
Hardware is non-blocking
  Software needs to be so as well
TinyOS Basics, Continued
                    (2002)




 Non-volatile       Non-volatile
    Storage            Storage
Encrypt Encrypt    Encrypt Encrypt
 This   Finished    This     Finished

                                        Interface


  Hardware            Software
                                               Tasks
   Crypto              Crypto

  Component          Component
The TinyOS Goals
               (ASPLOS 2000)




Allow high concurrency
Operate with limited resources
Adapt to hardware evolution
Support a wide range of applications
Be robust
Support a diverse set of platforms
Outline


TinyOS
Issues facing a second-generation OS
T2 core structure
Multi-layer abstractions
Static binding and allocation
Power locks
Supporting Applications

Complexities stem from hidden
dependencies over shared resources
  E.g., SPI bus
Ineficiencies stem from tension between
local independence and global properties
  All 6 use the radio, but how can the app know?
A next generation OS needs to have true
APIs that encapsulate underlying services
in a usable whole
An Example: CC2420

Platform diversity: needs to be easily
portable to new platforms (micaZ + Telos)

Robustness: 1.x implementation breaks
TinyOS concurrency model due to shared
task queue

Applications: interactions with other
components are a big source of problems
Three Approaches

Multi-layer abstractions
  Present a true spectrum of abstraction layers,
  from the most general and portable to the most
  eficient and platform-specific
Static binding and allocation
  Anything and everything that can be determined
  statically, should be
Power locks
  Greatly simplify power management and writing
  device drivers
Outline


TinyOS
Issues facing a second-generation OS
T2 core
Multi-layer abstractions
Static binding and allocation
Power locks
T2 Core



Platforms
Concurrency model
Scheduler
T2 Platforms

A platform is a collection of chips
  Platform       MCU        Radio
   mica2       ATMega128   CC1000
   micaZ       ATMega128   CC2420
    Telos       MSP430     CC2420
    eyes        MSP430     Infineon

Chip implementations are platform
independent
Platforms provide adapter code
TinyOS 1.x Concurrency

Tasks run to completion (do not preempt)
  while(1) {runNextTaskOrSleep();}
Two kinds of function
  Synchronous: can only run in a task (main)
  Asynchronous: can run in a task or interrupt
     Asynchronous code can preempt
     Compile-time race condition detection

Posting is how you go from async to sync
Concurrency Model

T2 has the same basic concurrency model
   Tasks, sync vs. async
T2 changes the task semantics
   TinyOS 1.x: post() can return FAIL, can post()
   multiple times (shared slots)
   T2: post returns FAIL i the task is already in the
   queue (single reserved slot per task)




TinyOS 1.x                        T2
Outline


TinyOS
Issues facing a second-generation OS
T2 core
Multi-layer abstractions
Static binding and allocation
Power locks
Varying Specificity



I   send packets
I   send packets and expect acks
I   sometimes turn o CSMA
I   sometimes turn o address decoding
More Varying Specificity


I need a timer, roughly ms granularity,
some jitter is OK
I need a timer, 32kHz granularity, as low
jitter as possible
I need a timer, 32kHz granularity, that
works in low power mode X
Multi-Layer Abstractions

       Many fine-grained layers of increasing
       power and specificity


      ActiveMessageC              Active Message
                                  CSMA
                                  802.15.4 Packet
CC2420ActiveMessageC
                                  802.15.4 Specific

       CC2420RadioC
Partial Virtualization


Some abstractions are shared and virtual
  Basic timers, packet transmission
Some are dedicated and physical
  Compare register B2 for CC2420 MAC timing
Some are shared and physical
  SPI bus between CC2420 and flash storage
  More on these later
Their Eect


Make it clear when your code is portable
vs. platform specific
  Improve robustness by making exchanging
  hidden dependencies for explicit ones
Enable a wider range of applications
  Support full spectrum of simple and portable to
  high-performance subsystems
Outline


TinyOS
Issues facing a second-generation OS
T2 core
Multi-layer abstractions
Static binding and allocation
Power locks
Static Binding

     nesC components can only interact
     through interfaces
                    interface SendMsg {...}
configuration MyAppC {               configuration CommC {
  uses interface SendMsg;              provides interface SendMsg;
}                                    }




                MyAppC.SendMsg - CommC.SendMsg
Static Binding, Continued

          Run-time vs. compile time parameters
interface CC2420Register {
  command uint16_t read(uint8_t reg);
  command uint8_t write(uint8_t reg, uint16_t val);
  command uint8_t strobe();
}
component CC2420C {
  provides interface CC2420Register;
}

interface CC2420StrobeReg {
  command uint8_t strobe();
}
component CC2420C {
  provides interface CC2420StrobeReg as SNOP;
  provides interface CC2420StrobeReg as STXONCCA;
   ....
}
Static Allocation

You know what you’ll need: allocate it at
compile-time (statically)
Depending on probabilities is a bet
  I.e., “it’s very unlikely they’ll all need to post
  tasks at once” = “they will”
You know what components will use a
resource, can allocate accordingly
  In some cases, static allocation can save memory
Saving Memory

module Foo {                           module Foo {
  bool busy;                             bool busy;

  command result_t request() {          command result_t request() {
    if (!busy()                         return post fooTask();
        post fooTask() == SUCCESS) {    }
      busy = TRUE;
      return SUCCESS;
    }
    else {
      return FAIL;
    }
  }


           TinyOS 1.x                                 T2
Eects


Static binding improves robustness
  Push as many checks to compile-time as possible
  Bad parameters become impossible compositions
Static allocation improves robustness
  You can make safe assumptions in code
  Code is shorter, simpler, and more deterministic
Outline


TinyOS
Issues facing a second-generation OS
T2 core
Multi-layer abstractions
Static binding and allocation
Power locks
Common Belief


Power management requires application
knowledge and control
OS provides explicit power management
  TinyOS 1.x: StdControl/SplitControl
  MantiOS: on/o
  SOS: device-specific functions
No limits, but also no help
Power Locks


                                       Power Lock
Define three classes of driver
power management: virtual,
dedicated, shared               Lock
Integrate power
management and
concurrency control at
lowest levels of OS
                                       Power Control
Reduces sample application
from 400 to 50 lines, 99%
eficiency of hand-tuned
Basic Application

Every 5 minutes:             Every 12 hours:
Turn on SPI bus              Turn on SPI bus
Turn on flash chip           Turn on radio
Turn on voltage reference    Turn on flash chip
Turn on I2C bus              while (new readings):
Log prior readings             turn on SPI bus
Start humidity sample          send prior reading
Wait 5ms for log               get next reading
Turn off flash chip            wait 5ms for log
Turn off SPI bus               turn off SPI bus
Wait 12ms for vref             wait for send
Turn on ADC
Start total solar sample
Wait 2ms for total solar
Start photo active sample            Every 5 minutes:      Every 12 hours:
Wait 2ms for photo active            Write prior samples   For all new log entries:
Turn off ADC                         Sample photo active     Send current sample
Turn off vref                        Sample total solar      Read next sample
Wait 34ms for humidity               Sample temperature
Start temperature sample             Sample humidity
Wait 220ms for temperature
Turn off I2C bus
Shared

          Many clients, explicit concurrency (lock)
               Allow clients to manage atomicity
               No request buering/scheduling
                                        Virtualized
          Lock has request information, manages
          power
                                        Virtualizer                 Dedicated

generic configuration Msp430Spi0C() {
  provides interface Resource;
  provides interface SpiByte;
  provides interface SpiPacket;                           Arbiter
                                                 Shared
}



                                                 System
Internals

           Need a general, simple mechanism for
           a huge variety of subsystems, devices,
           and policies
       Power Lock
                       Lock                Arbiter
Lock

                                  Power
                                                 Configurator
                                 Manager

       Power Control
Utility

       Power locks have been applied to the
       entire TinyOS code base (114 drivers)

ADC on atmega128                             USART on msp430
ADC Client
                                              I2C Client
                                                                        Arbiter
                                                                  L
                    L
ReadVirtualizer                Arbiter              SPI Client

                                                                        AC
                          AC
                                                                              D
                                                            I2C       SPI
                                     D
    Adc           Config
                   HC                                            HC
                                Power                                    Power
                          P                                           P Manager
    Atm128Adc                                    Msp430Usart
                               Manager
Power Locks
• TEP 108: Resource Arbitration
• Detailed paper in SOSP 2007
• Power trace from sample low-rate sensing application with
  no explicit power management:
Conclusion
The State of the Art Today

 Sensor networks are dierent
 Revisiting old problems and assumptions
   Dierent resource constraints
   Dierent design tradeos
   Sometimes new problems, sometimes not
 Opening the doors to innovation
 Systems to support a huge range of
 requirements, applications, and
 abstractions
Components

Innovation and exploration require
flexible systems
  Arbitrary boundaries
  Arbitrary composition
Current systems maximize flexibility
  TinyOS: collections of components
This flexibility sacrifices reliability
  E.g, TinyOS - SOS
  Inherent tension between flexibility/reliability
The Hidden Cost

Arbitrary flexibility prevents you from
promising anything
  Robustness, performance, etc.
You can still build applications, but it’s
hard and time consuming
T2: leverage nine years of experience
  Not all flexibility is needed
  Can we trade o some for improved usability and
  performance?
TinyOS Alliance

Working groups have a charter and write
permission to a subset of the tree
  core, net2, doc, zigbee, etc.
  Each working group has its own member policies
  Anyone can join, contact a working group chair

Tinyos-devel list for development
discussion (administrative on WG lists)

Tinyos-help for users
Working Groups

Active
  core: TinyOS core, hardware abstractions
  net2: multihop protocols (e.g., collection, IP)
  15-4: 802.15.4 standard
  zigbee: ZigBee protocol standard
  doc: documentation
Inactive
  sim: simulation infrastructure
  tools: Safe TinyOS, compilation tools (completed)
Questions

Weitere ähnliche Inhalte

Was ist angesagt?

Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...Stefano Salsano
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTTAndy Piper
 
Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies Kuniyasu Suzaki
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest thingsIan Craggs
 
Messaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsMessaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsAndy Piper
 
Open comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systemsOpen comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systemsEric Verhulst
 
MQTT - Austin IoT Meetup
MQTT - Austin IoT MeetupMQTT - Austin IoT Meetup
MQTT - Austin IoT MeetupBryan Boyd
 
Open stack journey from folsom to grizzly
Open stack journey from folsom to grizzlyOpen stack journey from folsom to grizzly
Open stack journey from folsom to grizzlyopenstackindia
 
Openstack Networking Internals - first part
Openstack Networking Internals - first partOpenstack Networking Internals - first part
Openstack Networking Internals - first partlilliput12
 
OpenStack Quantum: Cloud Carrier Summit 2012
OpenStack Quantum: Cloud Carrier Summit 2012OpenStack Quantum: Cloud Carrier Summit 2012
OpenStack Quantum: Cloud Carrier Summit 2012Dan Wendlandt
 
Practical Security with MQTT and Mosquitto
Practical Security with MQTT and MosquittoPractical Security with MQTT and Mosquitto
Practical Security with MQTT and Mosquittonbarendt
 
Deploying of Unikernels in the NFV Infrastructure
Deploying of Unikernels in the NFV InfrastructureDeploying of Unikernels in the NFV Infrastructure
Deploying of Unikernels in the NFV InfrastructureStefano Salsano
 
Threads Basic : Features, Types & Implementation
Threads Basic : Features, Types  & ImplementationThreads Basic : Features, Types  & Implementation
Threads Basic : Features, Types & ImplementationSoumen Santra
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolFatih Özlü
 
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge MigrationJames Denton
 
Mobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 Card
Mobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 CardMobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 Card
Mobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 Cardtelestax
 
MQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of ThingsMQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of ThingsUniversity of Pretoria
 

Was ist angesagt? (20)

Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTT
 
Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies
 
Message queues
Message queuesMessage queues
Message queues
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest things
 
Messaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsMessaging for the Internet of Awesome Things
Messaging for the Internet of Awesome Things
 
Open comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systemsOpen comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systems
 
MQTT - Austin IoT Meetup
MQTT - Austin IoT MeetupMQTT - Austin IoT Meetup
MQTT - Austin IoT Meetup
 
Open stack journey from folsom to grizzly
Open stack journey from folsom to grizzlyOpen stack journey from folsom to grizzly
Open stack journey from folsom to grizzly
 
Openstack Networking Internals - first part
Openstack Networking Internals - first partOpenstack Networking Internals - first part
Openstack Networking Internals - first part
 
OpenStack Quantum: Cloud Carrier Summit 2012
OpenStack Quantum: Cloud Carrier Summit 2012OpenStack Quantum: Cloud Carrier Summit 2012
OpenStack Quantum: Cloud Carrier Summit 2012
 
Practical Security with MQTT and Mosquitto
Practical Security with MQTT and MosquittoPractical Security with MQTT and Mosquitto
Practical Security with MQTT and Mosquitto
 
Deploying of Unikernels in the NFV Infrastructure
Deploying of Unikernels in the NFV InfrastructureDeploying of Unikernels in the NFV Infrastructure
Deploying of Unikernels in the NFV Infrastructure
 
Threads Basic : Features, Types & Implementation
Threads Basic : Features, Types  & ImplementationThreads Basic : Features, Types  & Implementation
Threads Basic : Features, Types & Implementation
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT Protocol
 
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
2014 OpenStack Summit - Neutron OVS to LinuxBridge Migration
 
Building Clouds One 1.4
Building Clouds One 1.4Building Clouds One 1.4
Building Clouds One 1.4
 
Mobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 Card
Mobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 CardMobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 Card
Mobicents Summit 2012 - Dmitri Soloviev - Telscale SS7 Card
 
Semantics
SemanticsSemantics
Semantics
 
MQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of ThingsMQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of Things
 

Andere mochten auch

Unit plan powerpoint[1]
Unit plan powerpoint[1]Unit plan powerpoint[1]
Unit plan powerpoint[1]mccloud20
 
Blestemul Diamantelor Africane
Blestemul Diamantelor AfricaneBlestemul Diamantelor Africane
Blestemul Diamantelor AfricaneAdina Stan
 
What’s the status with haiti
What’s the status with haitiWhat’s the status with haiti
What’s the status with haitimccloud20
 
An Easy Way Of Learning The Planets !
An Easy Way Of Learning The Planets !An Easy Way Of Learning The Planets !
An Easy Way Of Learning The Planets !tiffany cline
 
2009 Budget Preview
2009  Budget  Preview2009  Budget  Preview
2009 Budget Previewrprosch
 
Pw C Jim Brand Inside Presentation 083012 01
Pw C Jim Brand Inside Presentation 083012 01Pw C Jim Brand Inside Presentation 083012 01
Pw C Jim Brand Inside Presentation 083012 01James F Kelly
 

Andere mochten auch (6)

Unit plan powerpoint[1]
Unit plan powerpoint[1]Unit plan powerpoint[1]
Unit plan powerpoint[1]
 
Blestemul Diamantelor Africane
Blestemul Diamantelor AfricaneBlestemul Diamantelor Africane
Blestemul Diamantelor Africane
 
What’s the status with haiti
What’s the status with haitiWhat’s the status with haiti
What’s the status with haiti
 
An Easy Way Of Learning The Planets !
An Easy Way Of Learning The Planets !An Easy Way Of Learning The Planets !
An Easy Way Of Learning The Planets !
 
2009 Budget Preview
2009  Budget  Preview2009  Budget  Preview
2009 Budget Preview
 
Pw C Jim Brand Inside Presentation 083012 01
Pw C Jim Brand Inside Presentation 083012 01Pw C Jim Brand Inside Presentation 083012 01
Pw C Jim Brand Inside Presentation 083012 01
 

Ähnlich wie T2: What the Second Generation Holds

ClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptxClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptxBiHongPhc
 
ICS Security 101 by Sandeep Singh
ICS Security 101 by Sandeep SinghICS Security 101 by Sandeep Singh
ICS Security 101 by Sandeep SinghOWASP Delhi
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systemsSri Prasanna
 
OpenNebula - Mellanox Considerations for Smart Cloud
OpenNebula - Mellanox Considerations for Smart CloudOpenNebula - Mellanox Considerations for Smart Cloud
OpenNebula - Mellanox Considerations for Smart CloudOpenNebula Project
 
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solutionVirtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solutionFlavio Bertini
 
Docker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksDocker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksAdrien Blind
 
Sdn dell lab report v2
Sdn dell lab report v2Sdn dell lab report v2
Sdn dell lab report v2Oded Rotter
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOSICS
 
Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networksOCTO Technology
 
The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017Jian-Hong Pan
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probertyang
 

Ähnlich wie T2: What the Second Generation Holds (20)

ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN
 
Tos tutorial
Tos tutorialTos tutorial
Tos tutorial
 
L2 Attacks.pdf
L2 Attacks.pdfL2 Attacks.pdf
L2 Attacks.pdf
 
ClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptxClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptx
 
ICS Security 101 by Sandeep Singh
ICS Security 101 by Sandeep SinghICS Security 101 by Sandeep Singh
ICS Security 101 by Sandeep Singh
 
Again music
Again musicAgain music
Again music
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
 
OpenNebula - Mellanox Considerations for Smart Cloud
OpenNebula - Mellanox Considerations for Smart CloudOpenNebula - Mellanox Considerations for Smart Cloud
OpenNebula - Mellanox Considerations for Smart Cloud
 
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solutionVirtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
 
Interview Questions
Interview QuestionsInterview Questions
Interview Questions
 
Docker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksDocker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined Networks
 
Sdn dell lab report v2
Sdn dell lab report v2Sdn dell lab report v2
Sdn dell lab report v2
 
2337610
23376102337610
2337610
 
Vsync track c
Vsync   track cVsync   track c
Vsync track c
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
 
Mina2
Mina2Mina2
Mina2
 
Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networks
 
The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017
 
Oct2009
Oct2009Oct2009
Oct2009
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 

Kürzlich hochgeladen

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 

Kürzlich hochgeladen (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 

T2: What the Second Generation Holds

  • 1. T2 What the Second Generation Holds www.tinyos.net Philip Levis, David Gay, Vlado Handziski, Jan Hauer, Jon Ko, Kevin Klues, John Regehr, Janos Sallai, Miklos Maroti, Branislav Kusy, David Moss, Jan Beutel, Adam Wolisz, and many more...
  • 2. In the Beginning (1999) Sensor networks are on the horizon... ... but what are they going to do? What problems will be important? What will communication look like? What will hardware platforms look like? Having an operating system is nice... ... but how do you design one with these uncertainties?
  • 3. The TinyOS Goals (ASPLOS 2000) Allow high concurrency Operate with limited resources Adapt to hardware evolution Support a wide range of applications Be robust Support a diverse set of platforms
  • 4. TinyOS Basics A program is a set of components Components can be easily developed and reused Adaptable to many application domains Components can be easily replaced Components can be hardware or software Allows boundaries to change unknown to programmer Hardware has internal concurrency Software needs to be able to have it as well Hardware is non-blocking Software needs to be so as well
  • 5. TinyOS Basics, Continued (2002) Non-volatile Non-volatile Storage Storage Encrypt Encrypt Encrypt Encrypt This Finished This Finished Interface Hardware Software Tasks Crypto Crypto Component Component
  • 6. The TinyOS Goals (ASPLOS 2000) Allow high concurrency Operate with limited resources Adapt to hardware evolution Support a wide range of applications Be robust Support a diverse set of platforms
  • 7. Outline TinyOS Issues facing a second-generation OS T2 core structure Multi-layer abstractions Static binding and allocation Power locks
  • 8. Supporting Applications Complexities stem from hidden dependencies over shared resources E.g., SPI bus Ineficiencies stem from tension between local independence and global properties All 6 use the radio, but how can the app know? A next generation OS needs to have true APIs that encapsulate underlying services in a usable whole
  • 9. An Example: CC2420 Platform diversity: needs to be easily portable to new platforms (micaZ + Telos) Robustness: 1.x implementation breaks TinyOS concurrency model due to shared task queue Applications: interactions with other components are a big source of problems
  • 10. Three Approaches Multi-layer abstractions Present a true spectrum of abstraction layers, from the most general and portable to the most eficient and platform-specific Static binding and allocation Anything and everything that can be determined statically, should be Power locks Greatly simplify power management and writing device drivers
  • 11. Outline TinyOS Issues facing a second-generation OS T2 core Multi-layer abstractions Static binding and allocation Power locks
  • 13. T2 Platforms A platform is a collection of chips Platform MCU Radio mica2 ATMega128 CC1000 micaZ ATMega128 CC2420 Telos MSP430 CC2420 eyes MSP430 Infineon Chip implementations are platform independent Platforms provide adapter code
  • 14. TinyOS 1.x Concurrency Tasks run to completion (do not preempt) while(1) {runNextTaskOrSleep();} Two kinds of function Synchronous: can only run in a task (main) Asynchronous: can run in a task or interrupt Asynchronous code can preempt Compile-time race condition detection Posting is how you go from async to sync
  • 15. Concurrency Model T2 has the same basic concurrency model Tasks, sync vs. async T2 changes the task semantics TinyOS 1.x: post() can return FAIL, can post() multiple times (shared slots) T2: post returns FAIL i the task is already in the queue (single reserved slot per task) TinyOS 1.x T2
  • 16. Outline TinyOS Issues facing a second-generation OS T2 core Multi-layer abstractions Static binding and allocation Power locks
  • 17. Varying Specificity I send packets I send packets and expect acks I sometimes turn o CSMA I sometimes turn o address decoding
  • 18. More Varying Specificity I need a timer, roughly ms granularity, some jitter is OK I need a timer, 32kHz granularity, as low jitter as possible I need a timer, 32kHz granularity, that works in low power mode X
  • 19. Multi-Layer Abstractions Many fine-grained layers of increasing power and specificity ActiveMessageC Active Message CSMA 802.15.4 Packet CC2420ActiveMessageC 802.15.4 Specific CC2420RadioC
  • 20. Partial Virtualization Some abstractions are shared and virtual Basic timers, packet transmission Some are dedicated and physical Compare register B2 for CC2420 MAC timing Some are shared and physical SPI bus between CC2420 and flash storage More on these later
  • 21. Their Eect Make it clear when your code is portable vs. platform specific Improve robustness by making exchanging hidden dependencies for explicit ones Enable a wider range of applications Support full spectrum of simple and portable to high-performance subsystems
  • 22. Outline TinyOS Issues facing a second-generation OS T2 core Multi-layer abstractions Static binding and allocation Power locks
  • 23. Static Binding nesC components can only interact through interfaces interface SendMsg {...} configuration MyAppC { configuration CommC { uses interface SendMsg; provides interface SendMsg; } } MyAppC.SendMsg - CommC.SendMsg
  • 24. Static Binding, Continued Run-time vs. compile time parameters interface CC2420Register { command uint16_t read(uint8_t reg); command uint8_t write(uint8_t reg, uint16_t val); command uint8_t strobe(); } component CC2420C { provides interface CC2420Register; } interface CC2420StrobeReg { command uint8_t strobe(); } component CC2420C { provides interface CC2420StrobeReg as SNOP; provides interface CC2420StrobeReg as STXONCCA; .... }
  • 25. Static Allocation You know what you’ll need: allocate it at compile-time (statically) Depending on probabilities is a bet I.e., “it’s very unlikely they’ll all need to post tasks at once” = “they will” You know what components will use a resource, can allocate accordingly In some cases, static allocation can save memory
  • 26. Saving Memory module Foo { module Foo { bool busy; bool busy; command result_t request() { command result_t request() { if (!busy() return post fooTask(); post fooTask() == SUCCESS) { } busy = TRUE; return SUCCESS; } else { return FAIL; } } TinyOS 1.x T2
  • 27. Eects Static binding improves robustness Push as many checks to compile-time as possible Bad parameters become impossible compositions Static allocation improves robustness You can make safe assumptions in code Code is shorter, simpler, and more deterministic
  • 28. Outline TinyOS Issues facing a second-generation OS T2 core Multi-layer abstractions Static binding and allocation Power locks
  • 29. Common Belief Power management requires application knowledge and control OS provides explicit power management TinyOS 1.x: StdControl/SplitControl MantiOS: on/o SOS: device-specific functions No limits, but also no help
  • 30. Power Locks Power Lock Define three classes of driver power management: virtual, dedicated, shared Lock Integrate power management and concurrency control at lowest levels of OS Power Control Reduces sample application from 400 to 50 lines, 99% eficiency of hand-tuned
  • 31. Basic Application Every 5 minutes: Every 12 hours: Turn on SPI bus Turn on SPI bus Turn on flash chip Turn on radio Turn on voltage reference Turn on flash chip Turn on I2C bus while (new readings): Log prior readings turn on SPI bus Start humidity sample send prior reading Wait 5ms for log get next reading Turn off flash chip wait 5ms for log Turn off SPI bus turn off SPI bus Wait 12ms for vref wait for send Turn on ADC Start total solar sample Wait 2ms for total solar Start photo active sample Every 5 minutes: Every 12 hours: Wait 2ms for photo active Write prior samples For all new log entries: Turn off ADC Sample photo active Send current sample Turn off vref Sample total solar Read next sample Wait 34ms for humidity Sample temperature Start temperature sample Sample humidity Wait 220ms for temperature Turn off I2C bus
  • 32. Shared Many clients, explicit concurrency (lock) Allow clients to manage atomicity No request buering/scheduling Virtualized Lock has request information, manages power Virtualizer Dedicated generic configuration Msp430Spi0C() { provides interface Resource; provides interface SpiByte; provides interface SpiPacket; Arbiter Shared } System
  • 33. Internals Need a general, simple mechanism for a huge variety of subsystems, devices, and policies Power Lock Lock Arbiter Lock Power Configurator Manager Power Control
  • 34. Utility Power locks have been applied to the entire TinyOS code base (114 drivers) ADC on atmega128 USART on msp430 ADC Client I2C Client Arbiter L L ReadVirtualizer Arbiter SPI Client AC AC D I2C SPI D Adc Config HC HC Power Power P P Manager Atm128Adc Msp430Usart Manager
  • 35. Power Locks • TEP 108: Resource Arbitration • Detailed paper in SOSP 2007 • Power trace from sample low-rate sensing application with no explicit power management:
  • 37. The State of the Art Today Sensor networks are dierent Revisiting old problems and assumptions Dierent resource constraints Dierent design tradeos Sometimes new problems, sometimes not Opening the doors to innovation Systems to support a huge range of requirements, applications, and abstractions
  • 38. Components Innovation and exploration require flexible systems Arbitrary boundaries Arbitrary composition Current systems maximize flexibility TinyOS: collections of components This flexibility sacrifices reliability E.g, TinyOS - SOS Inherent tension between flexibility/reliability
  • 39. The Hidden Cost Arbitrary flexibility prevents you from promising anything Robustness, performance, etc. You can still build applications, but it’s hard and time consuming T2: leverage nine years of experience Not all flexibility is needed Can we trade o some for improved usability and performance?
  • 40. TinyOS Alliance Working groups have a charter and write permission to a subset of the tree core, net2, doc, zigbee, etc. Each working group has its own member policies Anyone can join, contact a working group chair Tinyos-devel list for development discussion (administrative on WG lists) Tinyos-help for users
  • 41. Working Groups Active core: TinyOS core, hardware abstractions net2: multihop protocols (e.g., collection, IP) 15-4: 802.15.4 standard zigbee: ZigBee protocol standard doc: documentation Inactive sim: simulation infrastructure tools: Safe TinyOS, compilation tools (completed)