Title: ELF: An Efficient LogStructured Flash File System For Micro Sensor Nodes
1ELF An Efficient Log-Structured Flash File
System For Micro Sensor Nodes
- Hui Dai, Michael Neufeld, Richard Han
- Presenter
- Yamuna Krishnamurthy
2Sensor Node Memory Usage
3Existing File Systems
4Flash Memory Characteristics
- Most common storage medium for micro sensors
- Flash is divided into sectors (sector n
264byte page) - On-chip cache (264 bytes)
- Concurrent read/writes prohibited
- Flash pages have limited life
- Reliability mechanisms like logging can either
use Flash or EEPROM as is done for ELFs
implementation on Mica2 mote
5Sensor Data Types and Their Characteristics
- Sensor Data
- Form major part of the data stored
- Data written sequentially without modifying
earlier records - Cleared periodically
- Configuration Data
- Changes infrequently after deployment
- Require high reliability for proper sensor
functioning - Binary Program Images
- Dynamic reprogramming of sensor nodes with either
a complete new binary image or patches - Store the binary image in flash memory before
rebooting the system - Requires high reliability
6ELF Design Goals
- Allow access to flash memory with simple file
operations like write-modify,write-append,reading,
creation and deletion - Extend the operational lifetime of the flash with
wear leveling - Achieve a small memory footprint
- Optimize common sensor file operations
- Avoid excessive energy consumption
- Provide optional best-effort data reliability
7ELF File System Architecture
- Resource Abstraction
- Run-time memory
- In-memory representation of open files
- Configuration data like cleaning policy
- General File Operations
- Logical abstraction of file/dir operation
- ELF Maintenance Tasks
- System maintenance tasks like snapshot of dir
structure and file meta data in EEPROM
8Data Structures in RAM, EEPROM and FLASH
9Flash Data Structures
- Physical Nodes
- Meta-Data
- Unique 16-bit node identifier
- 16-bit version number indicating age
- 32-bit field storing length of the node and
included data - Types
- ELF_DIR Represents a dir entry in the file
system - ELF_FILE Includes meta-data to operate on file
- ELF_COMMON Represents changes to the file
struct page_info uint16_t crc uint16_t
nextPage11 uint16_t flags5 uint16_t
writeEncounter uint16_t magicNumber
10In-Memory Data Structures
- File Abstraction
- Node Abstraction
- File Descriptor
11In-EEPROM Data Structures
- Cache dir structure for fast file access
- Store system snapshot to enable file consistency
- Allows fast startup or system reboot
- Allows crash recovery
12File Operations in ELF
Open/Create
Append
Modify
Read/Seek
Rename
Delete
13ELF Flash Memory Operations
- Read
- Flash-gtData
- Flash-gtCache-gtData
- Write
- Data-gtCache-gtFlash
- Page contents erased before writing
- Modify
- Page -gtCache-gtModify-gtFlash
14Resource Management
- Bitmap approach to maintain free/dirty used
blocks - Garbage Collection
- Cleaner called when number of free pages drop
below threshold
15Crash Recovery
- Optional
- Checkpoint
- Roll Forward
- Maintains snapshots of current operation
inodeNum,action,curr_version,highest_version
16Performance Results
- Sequential Read Performance
- Elf reads data directly from flash whereas
matchbox reads from flash to cache and then reads
the data
17Performance Results
- M corresponds to maximum write throughput or
memory consumption of matchbox - Experiments performed with varying RAM buffer
- E1 and E1 correspond to 0 byte buffer, E2 and
E2 correspond to 32 byte buffer and so on - E1 has the whole bitmap stored in RAM whereas E1
has only first 64 bytes stored in RAM
Sequential Write Throughput
Sequential Write Memory Consumption
18Performance Results
19Performance Results
- Wear Leveling Performance
20Conclusion
- Provides complete,efficient and reliable file
system for micro sensor nodes - Uses atomic write operations for operating with
file metadata - Support for simple garbage collection
- Optional best effort crash recovery mechanism
- Achieves wear leveling
- Allows random access of data
21Limitations and Future Work
- Cannot handle frequent occurrences of reboot,
file open and creation - Loss of reliability due to write buffering
- Energy and latency cost of ensuring reliability
not explored - Using compression mechanisms to reduce memory
usage
22THANK YOU