The Contiki Operating System was developed by Adam Dunkels of SICS in 2003. It is named after Thor Heyerdahl's Kon-Tiki raft. Contiki is commonly used as an OS for networks of embedded systems and by hobbyists for older systems. It has minimal requirements for memory and supports features like an event-driven kernel, TCP/IP networking, dynamic program loading, and protothreads for multitasking. These features allow it to run on small microcontrollers and be used for networked embedded applications.
2. History
Developed by Adam Dunkels of SICS
Also developed protothreads and μIP
First released on March 10, 2003
Named after Thor Heyerdahl's famous
Kon-Tiki raft
“Contiki runs on tiny and prehistoric
computers, yet is able to do much of what
we expect from large and modern
computers.”
3. Who uses it?
Most common application is as an OS
for Networks of Embedded Systems
Hobbyists use it as an OS for older
and smaller systems
Ports for Apple II, Atari, Gameboy, NES,
Commodore 64 and 128
Screen captures at
http://www.sics.se/~adam/contiki/ports/i
ndex.html
4. Features
Minimalist Event Driven Kernel, even
runs on 8-bit Microcontrollers
TCP/IP Stack Support
Dynamic Loading and Unloading of
Programs
Small Memory Requirements
Optional Preemptive Multithreading
through Protothreads
5. Event Driven Kernel
Kernel is event based making it a
real time OS
An event triggers the kernel to call the
corresponding event handler
Functions very similar to TinyOS
Has its drawbacks, i.e. long running
computations
6. TCP/IP Stack Support
Implements Dunkels’s own TCP/IP
stack called μIP
Memory Requirements
Kilobytes of Program Code
Hundreds of bytes of RAM
Allows to connect to networks using
SLIP (Serial Line IP)
7. Dynamic Program Loading
The Core Code and Program Code
are kept separate in ROM.
Program Code loaded at runtime.
Program code can be loaded from
ROM or RAM
Allows for “Over the Air
Programming” for networks of
sensors
8. Small Memory Requirements
The base system, providing
multitasking and TCP/IP networking,
can be compiled in about 32 KB
Smallest system to date uses about
2000 bytes of RAM
Jack Ganssle praised Contiki for its low
memory usage in his Embedded Muse
newsletter, #113
9. Protothreads
Implemented as an additional library
on top of the event based kernel
Stackless, lightweight thread
comprised of a single C function using
2 bytes of RAM to record its state
Adds a layer of abstraction to the
state-machine event based code
usually written, to create a sequential
flow of program code.
10. Event-driven
Event-driven
(TinyOS)
Processes do not run
without events
Event occurs: kernel
invokes event
handler
Event handler runs
to completion
(explicit return;)
Kernel
Handler
Handler
Handler
Handler
11. Contiki Programs
Contiki Tool-kit (CTK) GUI
Virtual Network Computing (VNC) Server
A Web Server
A Web Browser
A command line shell.
A telnet server.
An IRC client.
An FTP client.
A disk directory file reader.
A file and disk image downloader utility.
A simple desktop calculator.
12. End
Works Cited
Slides 10 and 11 Taken from
Adam Dunkles Presentation
Contiki – a Lightweight and Flexible
Operating System for Tiny
Networked Sensors
found at
http://www.sics.se/~adam/slides/contiki-
emnets.ppt