1 / 16

TOSThread : Thread-safe and non-invasive preemption in tinyos

Justin. TOSThread : Thread-safe and non-invasive preemption in tinyos. Outline. Introduction The Challenge of Preemption TOSThreads Architecture Implementation Evaluation. Introduction. Operating System for WSNs Support multiple concurrent execution

daxia
Download Presentation

TOSThread : Thread-safe and non-invasive preemption in tinyos

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Justin TOSThread: Thread-safe and non-invasive preemption in tinyos

  2. Outline • Introduction • The Challenge of Preemption • TOSThreads Architecture • Implementation • Evaluation

  3. Introduction • Operating System for WSNs • Support multiple concurrent execution • Network protocol, storage and data filter…etc • Event-driven execution • TinyOS • Disadvantage • Develop higher-level services and application • Compression

  4. The Challenge of Preemption • Challenge: • Ability to call kernel code (code interact with hardware) • Common techniques • Cooperative threading – using yield • Kernel locking – using mutex • Message passing

  5. TOSThreads Architecture • TinyOS – two classes of execution • Synchronous (tasks) • Asynchronous (interrupts) • TOSThreads – third class • User-level application threads • Goals • MinimunTinyOS kernel modification

  6. TOSThreads Architecture Original TinyOS

  7. Implementation • Platform independent • Thread scheduler • Thread and system call structure • Dynamic linking and loading • Platform dependent • Context switch (assembly language) • Post-amble for interrupt handler

  8. Flexible User/Kernel Boundary • Blocking system call API • Dynamic Linker and Loader System Call Task Kernel-level thread Application-level thread 1,2,3… TinyOS Original code Send Recv Sense File

  9. TinyOS Modification • Boot sequence Hardware Initialize Task Scheduler Thread Scheduler Kernel-level thread App-level thread 1 TinyOS Original code App-level thread 2 App-level thread 3

  10. Evaluation - Microbenchmark Overhead can be tolerated

  11. Evaluation - Energy analysis • SSF application (Sense, Store and Forward) • Sense and write to flash per 5 mins • Send via radio per 12hours

  12. Evaluation - Tenet • A linear dataflow programs consisting of a sequence of tasklets. Repeat(1000ms) > Sample(ADC1,T) > LEQ(A,T,50) > DeleteDataIf(A) > Send()

  13. Evaluation - Tenet • Tenet – C • Implement in TOSThread and TinyLD

  14. Evaluation - Tenet • Tenet – C • Implement in TOSThread and TinyLD TaskLong Repeat(100ms) > ReadBlock(A,1024) > Avg(B,A) > MeanDev(C,A) > Send() TaskSample Repeat(50ms) > TimeStamp(A) > Sample(ADC5,V) > Send()

  15. Evaluation - Tenet

  16. Conclusion • TOSThread • Thread-safe • Non-invasive • Overhead is less • Dynamic linking and loading is less – 0.92%

More Related