ratfat real time fat for cooperative multitasking
play

RATFAT: ReAl-Time FAT for Cooperative Multitasking Environments in - PowerPoint PPT Presentation

Platzhalter fr Bild, Bild auf Titelfolie hinter das Logo einsetzen RATFAT: ReAl-Time FAT for Cooperative Multitasking Environments in WSNs Sebastian Schildt, Wolf-Bastian Pttner, Felix Bsching, Lars Wolf PWSN, Boston - May 23, 2013 RAT +


  1. Platzhalter für Bild, Bild auf Titelfolie hinter das Logo einsetzen RATFAT: ReAl-Time FAT for Cooperative Multitasking Environments in WSNs Sebastian Schildt, Wolf-Bastian Pöttner, Felix Büsching, Lars Wolf PWSN, Boston - May 23, 2013

  2. RAT + FAT? + ? http://crunchall.com/wp-content/ http://5plus2.info/images/article/ uploads/2013/03/podgana.jpg article_small_33.jpg Wolf-Bastian Pöttner | RATFAT | Page 2 / 19

  3. Motivation • Many WSN apps need persistent data storage • Some WSN apps want large-scale data storage SD Cards • Often data is stored on nodes and processed on PC • Some WSN apps require real-time guarantees We need a file system for WSN nodes that is “PC-compatible” and real-time capable! Wolf-Bastian Pöttner | RATFAT | Page 3 / 19

  4. State of the Art in WSN file systems COFFEE in Contiki • Unpredictable timing behavior (non real-time) • Bad performance on large (> a few MB) volumes • Not readable on standard PC Operating Systems • But: high memory e ffi ciency FatFs + tinyFAT • Unpredictable timing behavior (non real-time) Wolf-Bastian Pöttner | RATFAT | Page 4 / 19

  5. State of the Art in WSN Operating Systems TinyOS 2 • Cooperative multitasking; no preemptions • Round-robin scheduler Contiki • Cooperative multitasking; no preemptions • Round-robin scheduler • RTimers allow (certain) real-time tasks • Interrupting ongoing SPI operations may lead to undefined states • Concurrent access to (di ff erent) SPI devices is problematic Wolf-Bastian Pöttner | RATFAT | Page 5 / 19

  6. Organization of a FAT Volume File Allocation Tables Cluster #1 #2 Master Clusters Root Boot Directory Record SD Card Wolf-Bastian Pöttner | RATFAT | Page 6 / 19

  7. RATFAT Features Highlights • Fully compliant to FAT specification • Support for FAT16 and FAT32 volumes and 8.3 naming scheme • Runs on any* underlying flash memory (SD, SPI flash, etc.) • Single-Bu ff er design (512 Byte) • Compatible to Contiki File System API • Extended API for additional functionality Limitations • No support for „long filenames“ • Keeping FATs in sync is “expensive” Wolf-Bastian Pöttner | RATFAT | Page 7 / 19

  8. RATFAT Architecture Application RT Management Contiki CFS API FAT Extended API FAT16/32 Implementation MBR Block IO Layer Mgmt SD Card driver SPI Flash Driver Wolf-Bastian Pöttner | RATFAT | Page 8 / 19

  9. RATFAT RT Overview API • Non-blocking API • Enqueue file system requests in constant time File System Process (FSP) • Background process handling all file system requests • Separate Stack, allows to hand control back to scheduler • Splits up FS requests into multiple atomic operations • On INGA, atomic operations take up to 12 ms • Maximum execution time per invocation • Respects system timers, yields before Wolf-Bastian Pöttner | RATFAT | Page 9 / 19

  10. RATFAT RT Concept Sampling interval T RT Process Write request Write request Write request RATFAT non-RT Deadline Miss Deadline Miss RATFAT RT reschedule FSP reschedule FSP Wolf-Bastian Pöttner | RATFAT | Page 10 / 19

  11. Behavior of the file system process (FSP)                          Wolf-Bastian Pöttner | RATFAT | Page 11 / 19

  12. Evaluation Setup Micro SD Card Slot INGA Sensor Node • Atmel ATmega 1284P: 128kb ROM, 16kb RAM 2GB Transcend Micro SD Card Wolf-Bastian Pöttner | RATFAT | Page 12 / 19

  13. Baseline: Writing n times 8 byte with COFFEE 14000 140000 Writing time for 8 byte Cumulative writing time 12000 120000 Average write time : 21.5 ms Median write time : 19.1 ms 10000 100000 Maximum write time : 5573.3 ms time cumulative [ms] time per write [ms] 8000 80000 6000 60000 4000 40000 2000 20000 0 0 0 1000 2000 3000 4000 5000 6000 n'th write Wolf-Bastian Pöttner | RATFAT | Page 13 / 19

  14. Writing n times 8 byte with RATFAT (non-RT) 90 4500 Writing time for 8 byte Cumulative writing time 80 4000 70 Average write time : 0.72 ms 3500 Median write time : 0.38 ms time cumulative [ms] Maximum write time : 71.3ms 60 3000 time per write [ms] 50 2500 40 2000 30 1500 20 1000 10 500 0 0 0 1000 2000 3000 4000 5000 6000 n'th write Wolf-Bastian Pöttner | RATFAT | Page 14 / 19

  15. RATFAT RT Measurement Setup Sampling interval T RT Process Write request Write request Write request RATFAT non-RT Deadline Miss Deadline Miss RATFAT RT reschedule FSP reschedule FSP Wolf-Bastian Pöttner | RATFAT | Page 15 / 19

  16. Maximum Sampling rate with RATFAT RT and non-RT 5 RATFAT-no-rt RATFAT-rt 4 missed deadlines 3 2 1 0 10 20 30 40 50 60 70 80 sampling rate [Hz] Wolf-Bastian Pöttner | RATFAT | Page 16 / 19

  17. Comparison of COFFEE, RATFAT non-RT and RATFAT RT 10000 COFFEE RATFAT-no-rt RATFAT-rt total 8000 RATFAT-rt queueing time cummulative [ms] 6000 4000 2000 0 0 1000 2000 3000 4000 5000 6000 n'th write Wolf-Bastian Pöttner | RATFAT | Page 17 / 19

  18. Memory Footprint Comparision 20000 18000 16000 14000 12000 Bytes 10000 8000 6000 4000 2000 0 COFFEE RATFAT non-RT RATFAT RT ROM (.text) RAM (.data & .bss) INGA: 128kb ROM, 16kb RAM Wolf-Bastian Pöttner | RATFAT | Page 18 / 19

  19. Sebastian Schildt Wolf-Bastian Pöttner schildt@ibr.cs.tu-bs.de poettner@ibr.cs.tu-bs.de Conclusion Motivation • FAT on SD cards allows exchanging data between node and PC • Some applications require real-time operations on WSN nodes RATFAT • FAT implementation for Contiki-based sensor nodes • (Optional) real-time support for cooperative multitasking env. Results • RATFAT shows more predictable timing behavior than COFFEE • Supports real-time tasks up to 64 Hz invocation frequency Code: http://goo.gl/Ky1Ns Wolf-Bastian Pöttner | RATFAT | Page 19 / 19

  20. Maximum Sampling rate with RATFAT RT and non-RT 180 RATFAT-no-rt RATFAT-rt 160 140 120 missed deadlines 100 80 60 40 20 0 0 20 40 60 80 100 120 140 sampling rate [Hz] Wolf-Bastian Pöttner | RATFAT | Page 20 / 19

  21. RATFAT Memory Footprint ROM (.text) RAM (.data & .bss) COFFEE 10,748 Bytes 233 Bytes RATFAT non-RT 14,772 Bytes 907 Bytes RATFAT RT 19,786 Bytes 1,556 Bytes INGA (Atmega 1284p) 128,000 Bytes 16,000 Bytes • Measured on INGA (8 bit MCU) Wolf-Bastian Pöttner | RATFAT | Page 21 / 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend