Creating real-time ready systems with ACRN and Ubuntu
alfonsosanchezbeato
on 3 March 2020
Sometimes you really need a deterministic response time in your system. For example, a robotic arm that needs to be at the right place at exactly the right time, and you cannot avoid the need for a hard real-time (RT) operating system. But, that is only a small part of your software, and for the rest, you do not have that requirement. The options you have at that point are:
- Do everything from the RTOS
- Have two separate processors, one handling RT tasks and the other handling the non-RT payload
In the first case, development costs increase due to the more complex development environment, and you miss the convenience, updateability and high throughput of a regular Linux installation. In the second case, hardware and development costs increase due to the custom hardware set-up and the interactions between the two hardware pieces.
However, this scenario is starting to change thanks to advances in hypervisor technologies. For instance, ACRN, a Linux Foundation project, is an open-source type one hypervisor that has been developed to address the unique needs of IoT development. It opens the door to safety-critical and real-time payloads while sharing the device with OSs’ like Ubuntu and Android.
ACRN allows you to split resources amongst different operating systems. You can assign CPU cores and chunks of memory to different operating systems to make sure that RT parts are always on time, while maximum throughput is still available for the rest of the system. Reliability of the system is also assured: one OS can crash while the others are unaffected. ACRN is highly customisable and you can use it in different configurations. VMs with a different OS can launch at boot, or later as needed by the main OS (the ‘service’ OS) or the user.
ACRN and Ubuntu Demo
At Embedded World 2020, we showed Ubuntu running in parallel with the real-time OS Zephyr, on top of ACRN. Zephyr is an RTOS developed under the Linux Foundation umbrella and backed by industry leaders like Intel, NXP and Linaro. It supports a wide range of hardware, from MCUs to x86 boards. For the demo, we use an Intel NUC where we reserve a core and a small amount of memory for Zephyr. Ubuntu 18.04 then uses the rest of the systems resources. ACRN takes control of the system on boot and then starts Zephyr and Ubuntu. We show how Zephyr is able to perform calculations at a constant rate, unaffected by the additional Ubuntu payload. Isolation of the two operating systems is guaranteed as fatal events on one OS do not affect the other, which shows the readiness for safety-critical systems.
We expect this type of set-up to be more and more common in the future. Canonical is ready to help you in this journey to cheaper, safer, and more updatable mixed-criticality systems. Contact us to know more!
IoT as a service
Bring an IoT device to market fast. Focus on your apps, we handle the rest. Canonical offers hardware bring up, app integration, knowledge transfer and engineering support to get your first device to market. App store and security updates guaranteed.
IoT app store
Build a platform ecosystem for connected devices to unlock new avenues for revenue generation. Get a secure, hosted and managed multi-tenant app store for your IoT devices.
Newsletter signup
Related posts
Space pioneers: Lonestar gears up to create a data centre on the Moon
Why establish a data centre on the Moon? Find out in our blog.
EdgeIQ and Ubuntu Core; bringing security and scalability to device management
Today, EdgeIQ and Canonical announced the release of the EdgeIQ Coda snap and official support of Ubuntu Core on the EdgeIQ Symphony platform. EdgeIQ Symphony...
Canonical provides the ideal platform for Microsoft Azure IoT Operations
London, 19 November 2024. Canonical has collaborated with Microsoft as an early adopter partner and tested Microsoft Azure IoT Operations on Ubuntu Core and...