ArticleslgStudy

computer science

Tock (operating system)

Tock (operating system) 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 Tock (operating system) rather than just read about it. In short: 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, and x86 processors in a protected environment.

Tock (operating system) — main illustration
Tock (operating system) — illustration

Key takeaways

  • Tock (operating system) 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 Tock (operating system) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tock (operating system) from memory before moving on to harder problems.

Reference excerpt

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, and x86 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.

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. 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. 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. The operating system is also customizable to run on different platforms and scheduling modules.

Development and release On May 9, 2016, Tock was released at the OSDI conference. This was the first version of Tock. On February 13, 2018, Tock 1.0 was released. This was the first rolling release, which added support for nRF and TM4C series chips. Also included were some driver libraries that supported the 1.0 version system call interface. On April 25, 2018, version 1.1 was released. It included a new register interface and automatic deep sleep for most SAM4L peripherals. On November 30, 2018, Tock 1.3 was released. This version added support for Tock to run on non-Cortex-M platforms and an interface for the operating system to send and receive UDP packets. Tock version 1.4 was released on October 18, 2019, and included support for RISC-V architectures. On April 30, 2020, Tock version 1.5 was released. It included new features to remove unsafe from TBF parsing in the kernel and added generic components. Version 1.6 was released on October 23, 2020. This version added a scheduler trait, added support for four new boards, and included support for UART over USB. On August 27, 2021, rolling version 2.0 was released. It added two new system calls: AllowReadOnly and Exit. Tock 2.0 also required that apps be compiled for the new syscall interface. Tock 2.1 was released on September 7, 2022. Version 2.1 included support for new HILs and boards, bugfixes, and a new system call interface. On January 6, 2023, version 2.1.1 was released. It fixed an issue related to system call errors.

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

See also Embedded system Microcontroller Internet of Things

References

External links Official website tock on GitHub

Worked examples

Example 1 — a first encounter with Tock (operating system)

Start with the simplest possible case. Write down what Tock (operating system) 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 Tock (operating system) 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 Tock (operating system) 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 Tock (operating system)

In research
Tock (operating system) 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 Tock (operating system) 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
Tock (operating system) is common in secondary-school and first-year university syllabi. It links to neighbouring topics ARM operating systems, Embedded operating systems, Free software operating systems, so understanding it makes those chapters shorter.
In everyday life
Look for Tock (operating system) 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.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Tock (operating system) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tock (operating system) 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 Tock (operating system) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tock (operating system) in simple terms?

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, and x86 processors in a protected environment.

Why does Tock (operating system) 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 Tock (operating system)?

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 Tock (operating system).

Tags

  • ARM operating systems
  • Embedded operating systems
  • Free software operating systems

Keep exploring