13
The Contiki Operating System Jack Nosek

The Contiki Operating System Jack Nosek. History Developed by Adam Dunkels of SICS Also developed protothreads and μIP First released on March 10,

Embed Size (px)

Citation preview

Page 1: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

The Contiki Operating System

Jack Nosek

Page 2: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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.”

Page 3: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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/index.html

Page 4: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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

Page 5: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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

Page 6: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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)

Page 7: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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

Page 8: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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

Page 9: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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.

Page 10: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 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

Page 11: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

Contiki: implementing threads on top of an event-based kernel

Kernel

Event

Event

Event

Event ThreadThread

Page 12: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

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.

Page 13: The Contiki Operating System Jack Nosek. History  Developed by Adam Dunkels of SICS Also developed protothreads and μIP  First released on March 10,

End

Works Cited Slides 10 and 11 Taken from

Adam Dunkles Presentation Contiki – a Lightweight and Flexible Operating System for TinyNetworked Sensorsfound at http://www.sics.se/~adam/slides/contiki-emnets.ppt