SlideShare a Scribd company logo
Ubiquitous Resources Abstraction
 using a File System Interface
        on Sensor Nodes




                   Till Riedel, Christian Decker
                   TecO, University of Karlsruhe
                   Institut for Telematics
                   Telecooperation Office (TecO)
                   www.teco.edu
Outline

 Analysis
 Design of a Resource Abstraction
 Evaluation
 Applications




 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   2
Embedded Sensor Devices in
Ubicomp




         Motes                            Particles                          Telos



 Limited computing power, 8-bit microcontroller
 Few kilobytes … 512 kilobytes of Flash memory
 Customized radio protocols
 Battery powered
 Extensible by various sensors

 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   3
Analysis
 Big variety of sensors




 Growing APIs

 Experiences with developers
    Hesitate to develop code for „new“ sensors

    Stick to the stuff they know

    Use example program




 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   4
Ubicomp Development –
State-of-the-Art

 Lightweight OS (e.g. TinyOS)
     OS shields resources, e.g. sensors

     No direct access

     Communication through events -> event dispatching




 Library based access models
     Abstract access functions

     Direct access, virtually no overhead




 But… shielding/abstraction causes still confusion



 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   5
File System for Sensor Nodes
Design principles                                                                      Application
 Developer in the center
 Support developer to                            Name                File System                                      Type
                                                                                              File System
  follow the simplest way                         Space               Operations                                      System


 Easy-to-understand
  interfaces -> generic                        Direct Resources                                Mediated Resources




                                                                                                         Detection
                                                                                  Actuators
                                                                      unication
                                               Sensors
                                                            Memory




                                                                                                                     Volume
                                                                       Comm-




                                                                                               Battery
                                                                                               Status
                                                                                                          Shock


                                                                                                                      Audio
                                                                                                                              ...
Support in two ways
 Uniform representation of
  all resources
 Uniform access model                         Hardware
                                               Microphone




                                                                       Frontend
                                                             Memory
                                                                        Radio

                                                                                   LEDs
    TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005                                      6
File System Interface
Operation                           Explanation


size_t read                         Reads n data bytes from the resource identified by fd
  (int fd, void* buf, size_t n)     to buf; returns number of bytes or -1 if error occurred

size_t write                        writes n data bytes from buf to the resource fd; returns
  (int fd, void* buf, size_t n)     number of bytes or -1 if an error occurred

int open(char* resource_path)       Returns a descriptor for the resource; -1 if it is not
                                    valid.

int close(int fd)                   Frees the descriptor of a resource; -1 if fd is not valid


int getType(int fd)                 Returns the type of a resource fd; -1 if fd is not valid.


int mount                           Creates a resource in the name space. Type and
  (char* resource_path, int type,   function pointers to their specific read and write
   (*pFunc) read, (*pFunc)          operations are given. -1 is returned if the
write)                              resource_path already exists.
int umount(char* resource_path)     Removes a resource; -1 is returned if it is not valid.




 TecO        KuVs FG System Software für Pervasive Computing 2005, October 12, 2005             7
Namespace and Ressources
                                                                                 Mount Table
                                                                   name                    type    read*              write*
             Name Space Table                            0         audio                   6       readMic            setRate
0   /dev                                                 1         audiovolume             .       calcVol            setRange
1          /light                                        ...       ...                     3       ...                ...
2          /audio                                        n-1       light                           readLight          nop
3   /usr                                                 n         [free]
4          /file1
5          /subdir
6                    /file2
7   /audiolib                                                   Storage Table
8              /audiovolume                                     name                       type    read*               write*
9   [free]                                               0      file1




                                                                                                                                writeFile
                                                                                                           readFile
                                                         1      file2.frag
                                                         ...




                                                                                               1
                                                         2047   [free]
                                                         2048   file2




    TecO                        KuVs FG System Software für Pervasive Computing 2005, October 12, 2005                                      8
File System – Access Model
Name space
 Hierarchical
 Textual representation of                          fd= o p en(”/ com /rf”)

  resources                                           read       write         state     typ e   com           rf


 Combine freely resource                                             fil desc rip tor
                                                                        e                         rf d river
  and specific behavior

Streams                                              write(fd ,...)


 Access functions “read”, “write”
                                                      read       write         state     typ e
 Sequential access
    enforced by state                              rf_ read    rf_ write         0      21 3


 Pass data between streams
  -> Stacking of streams

     TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005                      9
Hardware
 TecO Particle Computer
 18f6720 PIC microcontroller
 128KB FlashROM, 4KB RAM,
  512KB external Flash

Resources
 Memory – 512KB Flash
 Power supply – AAA battery
 Wireless communication
 Sensors – acceleration, light, force, temperature, audio,
  ball switch
 Actuators – LEDs, speaker



    TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   10
Optimization
 Paralallize write operations
  (Flash Buffer, Flash, EEPROM)
           13 ms Flash, 4 ms EEPROM, assynchronously programmable


 Mimimize writes on Flash/EEPROM
           only 50.000-100.000 erase/write cycles per page


 Minimize read times for sensor devices
           support relatively high sampling rates / bytewise sampling


 Minimize RAM consumption
        only 4K of RAM available




 TecO       KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   11
Performance
Access overhead
                                        cycles            PIC18F6720
Table look up function                      15   cycles            3   µs
Dereferencing state                          4   cycles          0.8   µs
Passing Parameters                          10   cycles            2   µs
Function pointer call                       26   cycles          5.2   µs
Accessing Parameters                        10   cycles            2   µs
Writing the buffer                          15   cycles            3   µs
Returning                                   13   cycles          2.6   µs


Overhead of file system read                93 cycles           18.6 µs
Overhead of simple Library call             26 cycles            5.2 µs

Relative overhead                           67 cycles           13.2 µs




TecO      KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   12
Performance
Memory Consumption

 File library
     2 byte on flash per resource (129 per page)

     12 byte per file descriptor (3 byte state)




       Non-Persistent ressources
         ▫ 6 byte + name in RAM


   + Library Code in internal flash
         ▫ about 12 KB (10%)
         ▫ 6K without persistent storage



 TecO      KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   13
Integration of persistent storage

 Simple flash FS
 Sequential append-only files
 Non-blocking operation
 Uncontrolled extrusion




TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   14
Application - Integration

                                                          Compiled
FTP Proxy                                                 Program
 Seamless transfer of data
  between backend infrastructure                                                          PC
  and sensor nodes
 Composition of name spaces
  using URI scheme
                                                                                     ste;1;33
                                                                                    ^C




                               FTP Proxy
                                                                                     Network
 Programming is file copy
 Sensor logging is downloading
                                         Bridge
                                                                         Particle

   TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005     15
POSIX interface
Applications can be easily ported

libc standard I/O
    fprintf

    stdout




compliant C Programming Environment




TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   16
Application - Shell
File system as interactive runtime environment
“cat audiovolume“                Application
                                                   Command
                                                     Shell

                                 ParticleFS

                                 Reources                           cat
                                      audio



                                                         audioVolume

                                Direct Resources             Mediated Resources
                                 Hardware

                                     Microphone




 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005    17
Application - Shell
File system as interactive runtime environment
 Standard output as context
 Popping stack elements from pipe stack




 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   18
Asynchronous Interaction
Service




                         /service/
                         result


Client




Simple IPC mechanism




 TecO    KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   19
Dynamic Loadable Modules
 No linking of function calls needded

 Specify fixed location for
    file descriptor table

    open

    mount




Functionality instantly available after mount

Hot code replacement




 TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   20
Thank you.



TecO   KuVs FG System Software für Pervasive Computing 2005, October 12, 2005   21

More Related Content

PDF
Defeating Windows memory forensics
PDF
Binary translation
KEY
Why Graphics Is Fast, and What It Can Teach Us About Parallel Programming
PPT
Modeling System Behaviors: A Better Paradigm on Prototyping
PDF
PDF
Utp pds_l4_procesamiento de señales del habla con mat_lab
DOC
Type of Embedded core
PPT
Ch11 file system interface
Defeating Windows memory forensics
Binary translation
Why Graphics Is Fast, and What It Can Teach Us About Parallel Programming
Modeling System Behaviors: A Better Paradigm on Prototyping
Utp pds_l4_procesamiento de señales del habla con mat_lab
Type of Embedded core
Ch11 file system interface

Viewers also liked (6)

PPTX
File System Interface
PPT
G.ho.st Cloud Computing Paperless Office
PPT
SmartLattice eSmart Office
PPT
Galvin-operating System(Ch9)
PPT
10.file system interface
PPT
Ch11: File System Interface
File System Interface
G.ho.st Cloud Computing Paperless Office
SmartLattice eSmart Office
Galvin-operating System(Ch9)
10.file system interface
Ch11: File System Interface
Ad

Similar to Ubiquitous Resources Abstraction using a File System Interface on Sensor Nodes (20)

PPT
EPROM, PROM & ROM
PPT
PDF
Tos tutorial
PPT
Mem hierarchy
PPTX
EASA Part-66 Module 5.6 : Basic Computer Structure
PDF
Processor architecture
PPTX
Basics Of Embedded Systems
PDF
Nios II Embedded Processor: Embedded World 2010
PPT
natchatra
PDF
CapSense Data Viewing Tool - Design Aids
PDF
Drra brief
PDF
Drra brief
PDF
8051 tutorial
PDF
Lect08
PDF
Hardware basics: inside the box
PDF
Diseño digital
PDF
Local file systems update
PDF
13986149 c-pgming-for-embedded-systems
PPT
Unit 4 memory system
EPROM, PROM & ROM
Tos tutorial
Mem hierarchy
EASA Part-66 Module 5.6 : Basic Computer Structure
Processor architecture
Basics Of Embedded Systems
Nios II Embedded Processor: Embedded World 2010
natchatra
CapSense Data Viewing Tool - Design Aids
Drra brief
Drra brief
8051 tutorial
Lect08
Hardware basics: inside the box
Diseño digital
Local file systems update
13986149 c-pgming-for-embedded-systems
Unit 4 memory system
Ad

More from Till Riedel (15)

PPTX
From Load Forecasting to Demand Response - A Web of Things Use Case
PPTX
IoT 2014 Value Creation Workshop: SDIL
PDF
A device-free future of ubicomp?
PDF
Thesis presentation: Middleware for Ubicomp - A Model Driven Development Appr...
PPTX
Relate: Architecture, Systems and Tools for Relative Positioning
PDF
ParticleVM
PPT
Protocol Optimizations using anonymous EPC Gen2 Inventories
PPT
Pluggable Realworld Interfaces
PPTX
A Community Platform for Auto-Annotated Recreational Maps
PDF
Architecture for Collaborative Business Items
PPT
Implicit Middleware
PPT
Syncob
ODP
Barcodes, RFID or Smart Items? Evaluating track and trace technology today a...
PPTX
uBox A Distributed Resource Management Architecture for the Web-of-Things
PDF
Using Web Service Gateways and Code Generation for Sustainable IoT System Dev...
From Load Forecasting to Demand Response - A Web of Things Use Case
IoT 2014 Value Creation Workshop: SDIL
A device-free future of ubicomp?
Thesis presentation: Middleware for Ubicomp - A Model Driven Development Appr...
Relate: Architecture, Systems and Tools for Relative Positioning
ParticleVM
Protocol Optimizations using anonymous EPC Gen2 Inventories
Pluggable Realworld Interfaces
A Community Platform for Auto-Annotated Recreational Maps
Architecture for Collaborative Business Items
Implicit Middleware
Syncob
Barcodes, RFID or Smart Items? Evaluating track and trace technology today a...
uBox A Distributed Resource Management Architecture for the Web-of-Things
Using Web Service Gateways and Code Generation for Sustainable IoT System Dev...

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
KodekX | Application Modernization Development
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Spectroscopy.pptx food analysis technology
PPTX
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
NewMind AI Weekly Chronicles - August'25 Week I
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
KodekX | Application Modernization Development
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectral efficient network and resource selection model in 5G networks
Spectroscopy.pptx food analysis technology
MYSQL Presentation for SQL database connectivity

Ubiquitous Resources Abstraction using a File System Interface on Sensor Nodes

  • 1. Ubiquitous Resources Abstraction using a File System Interface on Sensor Nodes Till Riedel, Christian Decker TecO, University of Karlsruhe Institut for Telematics Telecooperation Office (TecO) www.teco.edu
  • 2. Outline  Analysis  Design of a Resource Abstraction  Evaluation  Applications TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 2
  • 3. Embedded Sensor Devices in Ubicomp Motes Particles Telos  Limited computing power, 8-bit microcontroller  Few kilobytes … 512 kilobytes of Flash memory  Customized radio protocols  Battery powered  Extensible by various sensors TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 3
  • 4. Analysis  Big variety of sensors  Growing APIs  Experiences with developers  Hesitate to develop code for „new“ sensors  Stick to the stuff they know  Use example program TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 4
  • 5. Ubicomp Development – State-of-the-Art  Lightweight OS (e.g. TinyOS)  OS shields resources, e.g. sensors  No direct access  Communication through events -> event dispatching  Library based access models  Abstract access functions  Direct access, virtually no overhead  But… shielding/abstraction causes still confusion TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 5
  • 6. File System for Sensor Nodes Design principles Application  Developer in the center  Support developer to Name File System Type File System follow the simplest way Space Operations System  Easy-to-understand interfaces -> generic Direct Resources Mediated Resources Detection Actuators unication Sensors Memory Volume Comm- Battery Status Shock Audio ... Support in two ways  Uniform representation of all resources  Uniform access model Hardware Microphone Frontend Memory Radio LEDs TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 6
  • 7. File System Interface Operation Explanation size_t read Reads n data bytes from the resource identified by fd (int fd, void* buf, size_t n) to buf; returns number of bytes or -1 if error occurred size_t write writes n data bytes from buf to the resource fd; returns (int fd, void* buf, size_t n) number of bytes or -1 if an error occurred int open(char* resource_path) Returns a descriptor for the resource; -1 if it is not valid. int close(int fd) Frees the descriptor of a resource; -1 if fd is not valid int getType(int fd) Returns the type of a resource fd; -1 if fd is not valid. int mount Creates a resource in the name space. Type and (char* resource_path, int type, function pointers to their specific read and write (*pFunc) read, (*pFunc) operations are given. -1 is returned if the write) resource_path already exists. int umount(char* resource_path) Removes a resource; -1 is returned if it is not valid. TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 7
  • 8. Namespace and Ressources Mount Table name type read* write* Name Space Table 0 audio 6 readMic setRate 0 /dev 1 audiovolume . calcVol setRange 1 /light ... ... 3 ... ... 2 /audio n-1 light readLight nop 3 /usr n [free] 4 /file1 5 /subdir 6 /file2 7 /audiolib Storage Table 8 /audiovolume name type read* write* 9 [free] 0 file1 writeFile readFile 1 file2.frag ... 1 2047 [free] 2048 file2 TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 8
  • 9. File System – Access Model Name space  Hierarchical  Textual representation of fd= o p en(”/ com /rf”) resources read write state typ e com rf  Combine freely resource fil desc rip tor e rf d river and specific behavior Streams write(fd ,...)  Access functions “read”, “write” read write state typ e  Sequential access  enforced by state rf_ read rf_ write 0 21 3  Pass data between streams -> Stacking of streams TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 9
  • 10. Hardware  TecO Particle Computer  18f6720 PIC microcontroller  128KB FlashROM, 4KB RAM, 512KB external Flash Resources  Memory – 512KB Flash  Power supply – AAA battery  Wireless communication  Sensors – acceleration, light, force, temperature, audio, ball switch  Actuators – LEDs, speaker TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 10
  • 11. Optimization  Paralallize write operations (Flash Buffer, Flash, EEPROM) 13 ms Flash, 4 ms EEPROM, assynchronously programmable  Mimimize writes on Flash/EEPROM only 50.000-100.000 erase/write cycles per page  Minimize read times for sensor devices support relatively high sampling rates / bytewise sampling  Minimize RAM consumption only 4K of RAM available TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 11
  • 12. Performance Access overhead cycles PIC18F6720 Table look up function 15 cycles 3 µs Dereferencing state 4 cycles 0.8 µs Passing Parameters 10 cycles 2 µs Function pointer call 26 cycles 5.2 µs Accessing Parameters 10 cycles 2 µs Writing the buffer 15 cycles 3 µs Returning 13 cycles 2.6 µs Overhead of file system read 93 cycles 18.6 µs Overhead of simple Library call 26 cycles 5.2 µs Relative overhead 67 cycles 13.2 µs TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 12
  • 13. Performance Memory Consumption  File library  2 byte on flash per resource (129 per page)  12 byte per file descriptor (3 byte state)  Non-Persistent ressources ▫ 6 byte + name in RAM + Library Code in internal flash ▫ about 12 KB (10%) ▫ 6K without persistent storage TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 13
  • 14. Integration of persistent storage  Simple flash FS  Sequential append-only files  Non-blocking operation  Uncontrolled extrusion TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 14
  • 15. Application - Integration Compiled FTP Proxy Program  Seamless transfer of data between backend infrastructure PC and sensor nodes  Composition of name spaces using URI scheme ste;1;33 ^C FTP Proxy Network  Programming is file copy  Sensor logging is downloading Bridge Particle TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 15
  • 16. POSIX interface Applications can be easily ported libc standard I/O  fprintf  stdout compliant C Programming Environment TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 16
  • 17. Application - Shell File system as interactive runtime environment “cat audiovolume“ Application Command Shell ParticleFS Reources cat audio audioVolume Direct Resources Mediated Resources Hardware Microphone TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 17
  • 18. Application - Shell File system as interactive runtime environment  Standard output as context  Popping stack elements from pipe stack TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 18
  • 19. Asynchronous Interaction Service /service/ result Client Simple IPC mechanism TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 19
  • 20. Dynamic Loadable Modules  No linking of function calls needded  Specify fixed location for  file descriptor table  open  mount Functionality instantly available after mount Hot code replacement TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 20
  • 21. Thank you. TecO KuVs FG System Software für Pervasive Computing 2005, October 12, 2005 21

Editor's Notes

  • #2: - computation embedded in the physical world