Tock (operating system) explained

Tock OS
Logo Size:64px
Developer:Amit Levy and the Tock community
Family:Embedded operating system
Working State:Current
Source Model:Open source
Latest Release Version:2.1.1
Marketing Target:Embedded systems
Programmed In:Rust
Language:English
Supported Platforms:ARM, RISC-V
Kernel Type:Microkernel
License:MIT License, Apache Software License 2.0

Tock is a free and open source embedded operating system for microcontrollers written in Rust. The operating system's goal is to isolate components so untrusted third-party applications can run on Cortex-M, RISC-V,[1] and x86[2] processors in a protected environment.

History

Amit Levy, a PhD student at Stanford University, began the Tock project to have a security-focused replacement for the TinyOS operating system. Amit became interested in researching IoT low-power computers when he decided to build a smart door lock after bicycles were stolen from him and his roommates due to not locking their front door.[3]

Features

The Tock kernel is written in the Rust language. The kernel relies on Rust's memory safety and type safety to isolate parts of the kernel from one another. This isolation makes it easier to write secure extensions to the operating system, as one component cannot modify the memory of another.

The system uses a process abstraction that provides complete isolation of memory and CPU resources between applications and the kernel. This allows Tock applications to be written in any language.[4]

The Tock kernel does not have a shared heap and so does not support dynamic memory allocation within the kernel. All kernel memory is statically allocated. Application processes can dynamically allocate from their own memory.

When device memory is statically allocated, kernel software for managing shared abstraction like radio interfaces must make a static decision about the number of requests it will support. Tock allows kernel components to maintain state for dynamic process requests to kernel services using a mechanism called a grant. Each process has a region of its memory called the grant region, which only the Tock kernel can access. Using the grant region, the kernel can dynamically allocate memory from process memory.[5]

Tock supports the following features, which can sometimes be found in embedded operating systems: concurrency, dependability from resource exhaustion, fault isolation, memory efficiency, and application updates at runtime.[6] [7] The operating system is also customizable to run on different platforms and scheduling modules.[8]

Development and release

Reception

Tock has been received well by the microcontroller community and has over 190 open source contributors as of October 2024.[10] [11] In 2022, the Ti50 firmware on the Google Security Chip (GSC) in Chromebooks started using Tock.[12] Microsoft's Pluton root-of-trust chip also uses Tock.[13] Google uses Tock for their OpenSK security key implementation.[14]

See also

Notes and References

  1. Web site: Tock Port to RISC-V . MIT Lincoln Laboratory . 2024-10-12.
  2. Web site: Agenda Tock World 7 . . Tock Foundation . One of our SoC partners has chosen to implement Pluton using an embedded-class x86 core. To support this platform, our team created a port of Tock OS for the x86 architecture. .
  3. Web site: Interview with Amit Levy . 2024-10-12.
  4. Levy . Amit . Campbell . Bradford . Ghena . Branden . Giffin . Daniel B. . Leonard . Shane . Pannuto . Pat . Dutta . Prabal . Levis . Philip . The Tock Embedded Operating System . ACM . New York, NY, USA . 2017-11-06 . 10.1145/3131672.3136988 .
  5. Web site: Tock Operating System Design .
  6. Web site: Multiprogramming a 64 kB Computer Safely and Efficiently . 2024-10-12.
  7. Web site: Abstraction Layers and Energy Efficiency in Tock, a Rust-based Runtime for the Internet of Things . 2024-10-12.
  8. Web site: Tock . OSRTOS . 2024-10-12.
  9. Web site: Case . Use . Releases · tock/tock . GitHub . 2023-01-06 . 2024-10-12.
  10. Web site: Tock: a secure embedded operating system for microcontrollers – OSnews . OSnews . 2024-06-03 . 2024-10-12.
  11. Web site: (CNXSoft) . Jean-Luc Aufranc . Tock Open Source OS for Secure IoT Systems Runs on Arm Cortex-M Microcontrollers . CNX Software - Embedded Systems News . 2018-02-13 . 2024-10-12.
  12. Web site: Ti50 Firmware Releases . 2024-10-19.
  13. Web site: Agenda Tock World 7 . . Tock Foundation . The SoC partners have some flexibility in dictating how the Pluton core is implemented, however Microsoft owns the firmware and has chosen to use Tock OS as a common platform for (nearly) all Pluton firmware deliverables..
  14. Web site: Say hello to OpenSK: a fully open-source security key implementation . Google Online Security Blog . 2020-01-30 . 2024-11-06.