SlideShare une entreprise Scribd logo
1  sur  21
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

Contenu connexe

En vedette (6)

File System Interface
File System InterfaceFile System Interface
File System Interface
 
G.ho.st Cloud Computing Paperless Office
G.ho.st Cloud Computing Paperless OfficeG.ho.st Cloud Computing Paperless Office
G.ho.st Cloud Computing Paperless Office
 
SmartLattice eSmart Office
SmartLattice eSmart OfficeSmartLattice eSmart Office
SmartLattice eSmart Office
 
Galvin-operating System(Ch9)
Galvin-operating System(Ch9)Galvin-operating System(Ch9)
Galvin-operating System(Ch9)
 
10.file system interface
10.file system interface10.file system interface
10.file system interface
 
Ch11: File System Interface
Ch11: File System InterfaceCh11: File System Interface
Ch11: File System Interface
 

Similaire à Ubiquitous Resources Abstraction using a File System Interface on Sensor Nodes

2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf
cifoxo
 
Ian definitions 3rd try 2
Ian definitions 3rd try 2Ian definitions 3rd try 2
Ian definitions 3rd try 2
thomasmcd6
 
Ian definitions 3rd try 2
Ian definitions 3rd try 2Ian definitions 3rd try 2
Ian definitions 3rd try 2
thomasmcd6
 
Ov psim demo_slides_power_pc
Ov psim demo_slides_power_pcOv psim demo_slides_power_pc
Ov psim demo_slides_power_pc
simon56
 
Kieran dixon sound recording glossary
Kieran dixon sound recording glossaryKieran dixon sound recording glossary
Kieran dixon sound recording glossary
rwbybomb21
 
Bl ig2 url
Bl ig2 urlBl ig2 url
Bl ig2 url
benloynd
 
Ben white ig2 task 1 work sheet
Ben white   ig2 task 1 work sheetBen white   ig2 task 1 work sheet
Ben white ig2 task 1 work sheet
BenWhite101
 

Similaire à Ubiquitous Resources Abstraction using a File System Interface on Sensor Nodes (20)

Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
 
2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf
 
Sound analysis draft 2
Sound analysis draft 2Sound analysis draft 2
Sound analysis draft 2
 
Lecture1 Introduction
Lecture1  IntroductionLecture1  Introduction
Lecture1 Introduction
 
IG2 Task 1 Work Sheet
IG2 Task 1 Work SheetIG2 Task 1 Work Sheet
IG2 Task 1 Work Sheet
 
淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
Sound Recording Glossary
Sound Recording GlossarySound Recording Glossary
Sound Recording Glossary
 
Windows Forensics
Windows ForensicsWindows Forensics
Windows Forensics
 
Ian definitions 3rd try 2
Ian definitions 3rd try 2Ian definitions 3rd try 2
Ian definitions 3rd try 2
 
Inferno O.S.
Inferno O.S.Inferno O.S.
Inferno O.S.
 
K2presentation
K2presentationK2presentation
K2presentation
 
The CLAM Framework
The CLAM FrameworkThe CLAM Framework
The CLAM Framework
 
Ian definitions 3rd try 2
Ian definitions 3rd try 2Ian definitions 3rd try 2
Ian definitions 3rd try 2
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Ov psim demo_slides_power_pc
Ov psim demo_slides_power_pcOv psim demo_slides_power_pc
Ov psim demo_slides_power_pc
 
Kieran dixon sound recording glossary
Kieran dixon sound recording glossaryKieran dixon sound recording glossary
Kieran dixon sound recording glossary
 
Bl ig2 url
Bl ig2 urlBl ig2 url
Bl ig2 url
 
MIDP: Music and Sound
MIDP: Music and SoundMIDP: Music and Sound
MIDP: Music and Sound
 
Ben white ig2 task 1 work sheet
Ben white   ig2 task 1 work sheetBen white   ig2 task 1 work sheet
Ben white ig2 task 1 work sheet
 
Kqueue : Generic Event notification
Kqueue : Generic Event notificationKqueue : Generic Event notification
Kqueue : Generic Event notification
 

Plus de Till Riedel

Relate: Architecture, Systems and Tools for Relative Positioning
Relate: Architecture, Systems and Tools for Relative PositioningRelate: Architecture, Systems and Tools for Relative Positioning
Relate: Architecture, Systems and Tools for Relative Positioning
Till Riedel
 
Protocol Optimizations using anonymous EPC Gen2 Inventories
Protocol Optimizations using anonymous EPC Gen2 InventoriesProtocol Optimizations using anonymous EPC Gen2 Inventories
Protocol Optimizations using anonymous EPC Gen2 Inventories
Till Riedel
 
Pluggable Realworld Interfaces
Pluggable Realworld InterfacesPluggable Realworld Interfaces
Pluggable Realworld Interfaces
Till Riedel
 
A Community Platform for Auto-Annotated Recreational Maps
A Community Platform for Auto-Annotated Recreational MapsA Community Platform for Auto-Annotated Recreational Maps
A Community Platform for Auto-Annotated Recreational Maps
Till Riedel
 
Architecture for Collaborative Business Items
Architecture for Collaborative Business ItemsArchitecture for Collaborative Business Items
Architecture for Collaborative Business Items
Till Riedel
 
Barcodes, RFID or Smart Items? Evaluating track and trace technology today a...
Barcodes, RFID or Smart Items? Evaluating track and trace technology  today a...Barcodes, RFID or Smart Items? Evaluating track and trace technology  today a...
Barcodes, RFID or Smart Items? Evaluating track and trace technology today a...
Till Riedel
 
Using Web Service Gateways and Code Generation for Sustainable IoT System Dev...
Using Web Service Gateways and Code Generation for Sustainable IoT System Dev...Using Web Service Gateways and Code Generation for Sustainable IoT System Dev...
Using Web Service Gateways and Code Generation for Sustainable IoT System Dev...
Till Riedel
 

Plus de Till Riedel (15)

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

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

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

Notes de l'éditeur

  1. - computation embedded in the physical world