A zephyr is a gentle breeze. The Zephry Project is something else. It’s an operating system, specifically a real-time operating system. And it’s taking the Internet of Things (IoT) by storm.

I’ve posted before about our work developing devices using the Zephyr Project. Our introductory immersion into the Zephyr Project was developing a neonatal baby monitor. More recently, we’ve developed a variety of foundational sensor “recipe” projects using the Zephyr Project and Arduino 101 boards. In this post, I dig a bit deeper into operating systems and the Zephyr Project itself, specifically the Zephyr operating system (OS), in addition to what the project might mean for the future of IoT devices.

Operating Systems and Multitasking on a Thread

The open-source Zephyr Project OS isn’t just any operating system. It’s a real-time operating system, also known as an RTOS. To understand what that means, let’s examine what an operating system is in general.

An operating system is a software program that allows a computing device to deliver services to the software and hardware running on the device, such as displays, the mouse, web browsers, applications, email clients, and so on. Operating systems that most people are familiar with or regularly use include Windows, Mac, Linux, and Unix, all of which are for personal computers and are also known as multiuser or multitasking operating systems. Android and iOS are operating systems for mobile devices. Mobile operating systems don’t have as many features as multiuser versions. Both mobile and multiuser operating systems have at least one thing in common with all operating systems in that they  use a feature called a scheduler that determines which task to run when.

An operating system’s scheduler uses the available threads on a device’s processor. Each thread is a set of instructions on what to execute for a user or program. In a traditional CPU, the computer’s processor only executes one set of instructions (one thread) at a time. To achieve multitasking and execute multiple sets of instructions at the same time, modern processors are engineered with multiple CPUs, cores, and threads (known as multithreading). With these processors, the OS can run multiple instructions at once by using multiple cores or executing multiple threads simultaneously. No one thread is given priority. Instead, instructions are executed in order. And, in reality, things do not happen simultaneously; the OS simply keeps track of requests and executes them at speeds imperceptible to the user, and in the order received.

Operating in Real-Time

An RTOS also employs a scheduler. An RTOS’ scheduler specializes in delivering a consistent execution pattern to ensure that data is processed as it comes in. It can allow for prioritizing how threads are used and for giving priority to tasks that should be executed immediately (in real time). Unlike a multiuser OS, sheer throughput isn’t the main goal of an RTOS. Instead, the primary goal is performing given tasks in a specific timeframe. This matters because certain functions can’t afford to wait, even for an imperceptible amount of time, for the device to respond.

The Zephyr Project is a project aimed at collaboratively developing the actual RTOS itself. The project is hosted by the Linux Foundation. The Zephyr Project is not the only RTOS; as of March 11, this Wikipedia article listed 181 different versions, the majority of them open source.

The Zephyr Project RTOS’ target use is for simple IoT sensors: LEDs, smart wearables, and IoT wireless gateways with small footprints. The RTOS is scalable and works with multiple architectures and communications technologies, such as Bluetooth low energy and wireless. It’s meant for developers to use as-is or to modify for use in their own projects. Although it was announced as “new” by the Linux Foundation in February 2016, the project has actually been around for a bit.

The Zephyr Project RTOS is customizable and helps enable security. It has a modular kernel that can be stripped down to individual components, even down to just the nanokernel, if needed. Its scheduler runs a single task at a time based on priority level. If two tasks with the same priority are waiting, the scheduler runs the one that has been waiting the longest. One feature of the Zephyr Project RTOS is that it provides the ability for a developer to allocate priority to a given thread and set thread priorities that give a thread higher priority in certain circumstances.

The Future of the Zephyr Project

Its Linux Foundation backing, scalability, and open-source nature are the biggest drivers behind why the Zephyr Project is poised to take IoT by storm. Currently, IoT devices often lack interoperability, which can make managing them a headache for IT teams. If the Zephyr Project becomes the de-facto standard OS for IoT devices, it could propel IoT into a new era of interoperability and spawn widespread mainstream use of IoT devices.

You can learn more about Prowess Consulting’s use of the Zephyr Project RTOS in our past posts, “Developing a Neonatal Baby Monitor” and “Open-Source Hardware (with Some Software Too).” You can learn more about the Zephyr Project at www.zephyrproject.org.

Share this: