ArticleslgStudy

computer science

Contiki

Contiki is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Contiki rather than just read about it. In short: Contiki is an operating system for networked, memory-constrained systems with a focus on low-power wireless Internet of Things (IoT) devices. Contiki is used for systems for street lighting, sound monitoring for smart cities, radiation monitoring and alarms.

Contiki — main illustration
Contiki — illustration

Key takeaways

  • Contiki belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Contiki to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Contiki from memory before moving on to harder problems.

Reference excerpt

Contiki is an operating system for networked, memory-constrained systems with a focus on low-power wireless Internet of Things (IoT) devices. Contiki is used for systems for street lighting, sound monitoring for smart cities, radiation monitoring and alarms. It is open-source software released under the BSD 3-clause license. Contiki was created by Adam Dunkels in 2002 and has been further developed by a worldwide team of developers from Texas Instruments, Atmel, Cisco, ENEA, ETH Zurich, Redwire, RWTH Aachen University, Oxford University, SAP, Sensinode, Swedish Institute of Computer Science, ST Microelectronics, Zolertia, and many others. Contiki gained popularity because of its built-in TCP/IP stack and lightweight preemptive scheduling over event-driven kernel. The name Contiki comes from Thor Heyerdahl's famous Kon-Tiki raft. Contiki provides multitasking and a built-in Internet Protocol Suite (TCP/IP stack); it needs about 10 kilobytes of random-access memory (RAM) and 30 kilobytes of read-only memory (ROM). A full system, including a graphical user interface, needs about 30 kilobytes of RAM. A new branch has recently been created, known as Contiki-NG: The OS for Next Generation IoT Devices.

Hardware Contiki is designed to run on types of hardware devices that are severely constrained in memory, power, processing power, and communication bandwidth. A typical Contiki system has memory on the order of kilobytes, a power budget on the order of milliwatts, processing speed measured in megaHertz, and communication bandwidth on the order of hundreds of kilobits/second. Such systems include many types of embedded systems, and old 8-bit computers.

Networking Contiki provides three network mechanisms: the uIP TCP/IP stack, which provides IPv4 networking, the uIPv6 stack, which provides IPv6 networking, and the Rime stack, which is a set of custom lightweight networking protocols designed for low-power wireless networks. The IPv6 stack was contributed by Cisco and was, when released, the smallest IPv6 stack to receive the IPv6 Ready certification. The IPv6 stack also contains the Routing Protocol for Low power and Lossy Networks (RPL) routing protocol for low-power lossy IPv6 networks and the 6LoWPAN header compression and adaptation layer for IEEE 802.15.4 links. Rime is an alternative network stack, for use when the overhead of the IPv4 or IPv6 stacks is prohibitive. The Rime stack provides a set of communication primitives for low-power wireless systems. The default primitives are single-hop unicast, single-hop broadcast, multi-hop unicast, network flooding, and address-free data collection. The primitives can be used on their own or combined to form more complex protocols and mechanisms.

Low-power operation Many Contiki systems are severely power-constrained. Battery-operated wireless sensors may need to provide years of unattended operation and with little means to recharge or replace batteries. Contiki provides a set of mechanisms to reduce the power consumption of systems on which it runs. The default mechanism for attaining low-power operation of the radio is called ContikiMAC. With ContikiMAC, nodes can be running in low-power mode and still be able to receive and relay radio messages.

Simulation The Contiki system includes a sensor simulator called Cooja, which simulates Contiki nodes. The nodes belong to one of the three following classes: a) emulated Cooja nodes, b) Contiki code compiled and executed on the simulation host, or c) Java nodes, where the behavior of the node must be reimplemented as a Java class. One Cooja simulation may contain a mix of sensor nodes from any of the three classes. Emulated nodes can also be used to include non-Contiki nodes in a simulated network. In Contiki 2.6, platforms with the TI MSP430 and Atmel AVR microcontrollers can be emulated.

Programming model To run efficiently on small-memory systems, the Contiki programming model is based on protothreads. A protothread is a memory-efficient programming abstraction that shares features of both multithreading and event-driven programming to attain a low memory overhead of each protothread. The kernel invokes the protothread of a process in response to an internal or external event. Examples of internal events are timers that fire or messages being posted from other processes. Examples of external events are sensors that trigger or incoming packets from a radio neighbor. Protothreads are cooperatively scheduled. Thus, a Contiki process must always explicitly yield control back to the kernel at regular intervals. Contiki processes may use a special protothread construct to block waiting for events while yielding control to the kernel between each event invocation.

Features

Contiki supports per-process optional preemptive multithreading, inter-process communication using message passing through events, as well as an optional graphical user interface (GUI) subsystem with either direct graphic support for locally connected terminals or networked virtual display with Virtual Network Computing (VNC) or over Telnet. A full installation of Contiki includes the following features:

Multitasking kernel Optional per-application preemptive multithreading Protothreads Internet Protocol Suite (TCP/IP) networking, including IPv6 Windowing system and GUI Networked remote display using Virtual Network Computing A web browser (claimed to be the world's smallest) Personal web server Simple telnet client Screensaver Contiki is supported by popular SSL/TLS libraries such as wolfSSL, which includes a port in its 3.15.5 release.

Ports

Microcontrollers Atmel – ARM, AVR NXP Semiconductors – LPC1768, LPC2103, MC13224 Microchip – dsPIC, PIC32 (PIC32MX795F512L) Texas Instruments – MSP430, CC2430, CC2538, CC2630, CC2650, CC2538: cctv, Firefly, Zoul (comprises the CC2538 and CC1200 in a single module format) STMicroelectronics – STM32 W

Computers Apple II Atari 8-bit computers Atari ST Atari Portfolio Pocket Viewer Commodore PET VIC-20, Commodore 64, Commodore 128 Oric NEC PC-6001 Sharp Wizard x86-based Unix-like systems, atop GTK+, or more directly using an X Window System

Game consoles GP32 Game Boy Game Boy Advance Jaguar Nintendo Entertainment System TurboGrafx-16

See also

BeRTOS ERIKA Enterprise Nano-RK RIOT SymbOS TinyOS Comparison of real-time operating systems

Notes

References

External links

Official website

Illustrations

Contiki illustration
Contiki: Screenshot of the VNC server running on the Atmel AVR port of Contiki
Screenshot of the VNC server running on the Atmel AVR port of Contiki
Contiki: Contiki on the Commodore 64
Contiki on the Commodore 64

Worked examples

Example 1 — a first encounter with Contiki

Start with the simplest possible case. Write down what Contiki claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Contiki before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Contiki ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Contiki

In research
Contiki appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Contiki in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Contiki is common in secondary-school and first-year university syllabi. It links to neighbouring topics ARM operating systems, Apple II software, Atari 8-bit computer software, so understanding it makes those chapters shorter.
In everyday life
Look for Contiki outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Contiki” →

How to study Contiki in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Contiki means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Contiki out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Contiki in simple terms?

Contiki is an operating system for networked, memory-constrained systems with a focus on low-power wireless Internet of Things (IoT) devices. Contiki is used for systems for street lighting, sound monitoring for smart cities, radiation monitoring and alarms.

Why does Contiki matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Contiki?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Contiki.

Tags

  • ARM operating systems
  • Apple II software
  • Atari 8-bit computer software
  • Atari ST software
  • Commodore 128 software
  • Commodore 64 software
  • Embedded operating systems
  • Free software operating systems
  • Free web browsers
  • MIPS operating systems
  • Software using the BSD license
  • TCP implementations

Keep exploring