Contiki Presentation
-
Upload
rahul-dhodapkar -
Category
Documents
-
view
98 -
download
0
Transcript of Contiki Presentation
I got 99 problems
● Resource Constraints○ Small memory (~100kb code, <20kb RAM)○ CPU (8-bit microcontroller)○ Low-power/battery life
● Large number of small parts○ Hard to physically reclaim and reprogram on update○ Network may have a variety of software versions
and hardware permutations.
But an OS ain’t one
● Dynamic loading and replacement of code● Event Driven Kernel
○ allows for low power○ preemptive multithreading implemented as external
optionally linkable library● Support for power-save modes*
* user-implemented (mileage may vary)
System Architecture
● Core [Static Binary]○ Contiki kernel○ Program loader○ Language runtime core○ Communication stack for device drivers
● Loaded Components [Dynamic]○ Services (loadable libraries)○ Application Processes
Processes in Contiki
● Can be either Services or Applications● Consist of:
○ Event handler function○ Optional poll handler function
● Can be replaced at runtime● All communication goes through the kernel
○ Posting Events● Can communicate directly with hardware
Kernel Architecture
● Event Driven○ Kernel will never preempt running handler○ Support for synchronous and asynchronous events○ Only one event handler may run at any given time.
● Single Shared Stack○ Prevents overallocation (fragmentation) problems
Preemptive Multi-Threading
● Generic component○ interface to the event kernel
● Platform-specific component○ handles stack switching○ preemption primitives*
● Each thread has different stack○ stacks are user-managed by library service
* could allow for application-specific preemption protocols
Over-the-air Programming
● Propagate dynamic updates through a network of devices running Contiki
● Reduce Cost:○ labor/time savings
● Network can adapt to environmental changes in-place without physical intervention
Conclusions
Pros:● Over-the-air programming● Dynamically linked services
○ no need to recompile on update
Cons:● Event-based architecture
○ can be hard to program for● Access control + security vulnerabilities
○ need to verify access to reprogramming facilities.
ReferencesDunkels, Adam, Bjorn Gronvall, and Thiemo Voigt. "Contiki-a lightweight and flexible operating system for tiny networked sensors." Local Computer Networks, 2004. 29th Annual IEEE International Conference on. IEEE, 2004. [LINK]