Storage Abstractions in TinyOS 2.x - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Storage Abstractions in TinyOS 2.x

Description:

Mica Family, Telos rev. A, Eyes 2. But has very different characteristics ... STM25P Telos rev. B, Eyes 1. Alpha (incomplete, etc) code on SourceForge, in: ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 17
Provided by: joepol
Category:

less

Transcript and Presenter's Notes

Title: Storage Abstractions in TinyOS 2.x


1
Storage Abstractionsin TinyOS 2.x
  • Jonathan Hui
  • jwhui_at_cs.berkeley.edu
  • University of California, Berkeley

David Gay dgay_at_acm.org Intel Research, Berkeley
2
Non-Volatile Storage
  • Flash storage becoming more widely used
  • Mass data storage
  • logging sensor data
  • network programming
  • event logging for debugging
  • Configuration data that survives
  • power-failure
  • reprogramming

3
Flash Storage Variety
  • STMicro M25P (NOR)
  • Telos rev. B, Eyes 1
  • Intel StrataFlash (NOR)
  • iMote 2
  • Atmel AT45DB (NOR)
  • Mica Family, Telos rev. A, Eyes 2
  • But has very different characteristics

4
Technology Differences
  • One write per bit per erase cycle
  • Flash characteristics

Not used in current motes
5
Architecture
  • Differences limited RAM preclude common
    low-level HIL interfaces (e.g. block interface)
  • Provide high-level storage services useful for
    sensor network applications
  • Large Objects
  • Small Objects
  • Large Sequential Objects
  • Separate implementations of these abstractions
    for each class of storage chip

6
Large Objects
  • Get a large object, write to each byte once in
    any arbitrary order, and commit.
  • Characteristics
  • Size Large (100B to 100KB, or more)
  • Reads random
  • Writes random (write once)
  • Fault tolerance validity check
  • Example Applications
  • Network Programming
  • Large Data Transfer

7
Small Objects
  • Maintain a small chunk of values. Requires
    multiple and random reads/writes.
  • Characteristics
  • Size Small (lt 100B)
  • Reads random
  • Writes random
  • Fault tolerance writes are atomic
  • Failure between/during writes ? no data loss
  • Example Applications
  • Configuration data storage

8
Large Sequential Object
  • Some applications (e.g., low-rate data
    collection) may want to reliably log all their
    results.
  • Characteristics
  • Size Large
  • Reads sequential
  • Writes sequential
  • Fault tolerance user-specified commit points
  • Failure between/during writes ? entire object is
    not lost
  • Example Applications
  • Logging

9
Putting It Together
  • Sharing the flash through Volumes, with numerical
    identifiers
  • Volumes allocated similar to using fdisk.
  • A utility explicitly formats the flash.
  • 1) Init volume table
  • 2) Allocate each desired volume (user specifies
    UID and size)
  • 3) Commit volume table
  • Volume table kept in non-volatile storage.

Volume 0
Volume 1
Volume 2
Volume 3
Flash
10
Putting It Together
  • TinyOS apps must mount volume before use.
  • Mount by specifying UID of volume
  • No unmount operation
  • A volume is used by at most one HIL.
  • Allows switching of applications while managing
    the sharing of flash.

Small Object
Large Object
Log
Log
Volume 0
Volume 1
Volume 2
Volume 3
Flash
11
Implementation Status
  • Currently under development
  • AT45DB Mica family, Telos rev. A, Eyes 2
  • STM25P Telos rev. B, Eyes 1
  • Alpha (incomplete, etc) code on SourceForge, in
  • tinyos-2.x/tos/chips/at45db
  • tinyos-2.x/tos/chips/stm25p
  • Thanks!

12
Backup Slides
13
BlockStorage
  • interface BlockRead
  • command result_t read(addr_t addr, void dest,
    addr_t len)
  • event void readDone(storage_result_t result)
  • command result_t verify()
  • event void verifyDone(storage_result_t result)
  • interface BlockWrite
  • command result_t write(addr_t addr, void
    source, addr_t len)
  • event void writeDone(storage_result_t result)
  • command result_t erase()
  • event void eraseDone(storage_result_t result)
  • command result_t commit()
  • event void commitDone(storage_result_t result)

14
ConfigStorage
  • interface ConfigStorage
  • command result_t read(addr_t addr, void dest,
    addr_t len)
  • event void readDone(storage_result_t result)
  • command result_t write(addr_t addr void
    source, addr_t len)
  • event void writeDone(storage_result_t result)
  • command result_t commit()
  • event void commitDone(storage_result_t result)

15
Logger
  • interface LogRead
  • command result_t read(uint8_t data, uint32_t
    numBytes)
  • event void readDone(uint8_t data, uint32_t
    numBytes,
  • storage_result_t success)
  • command result_t seek(uint32_t cookie)
  • event void seekDone(storage_result_t success)
  • interface LogWrite
  • command result_t erase()
  • event void eraseDone(storage_result_t success)
  • command result_t append(uint8_t data, uint32_t
    numBytes)
  • event void appendDone(uint8_t data, uint32_t
    numBytes,
  • storage_result_t
    success)
  • command uint32_t currentOffset()
  • command result_t sync()
  • event void syncDone(storage_result_t success)

16
Volume Management
  • interface FStorage
  • command result_t init()
  • command result_t allocate(uint8_t id, addr_t
    size)
  • command result_t allocateFixed(uint8_t id,
    addr_t addr,
  • addr_t size)
  • command result_t commit()
  • event void commitDone(storage_result_t result,
    uint8_t id)
  • interface Mount
  • command result_t mount(uint8_t id)
  • event void mountDone(storage_result_t result,
    uint8_t id)
Write a Comment
User Comments (0)
About PowerShow.com