Real-Time Virtualization – How Hard Can It Be?

Virtualization can help meet safety goals in embedded systems.

popularity

What’s the first association you make when you hear of virtualization? Server farms? ‘The cloud’?

Most people don’t think of embedded systems – never mind hard real-time – yet these are areas where virtualization is now becoming commonplace. Markets such as industrial, automotive and medical—many of which also have requirements around functional safety for products like car braking systems, medical implants or industrial robotics—are realizing the value of virtualization even for embedded systems.

Growing system complexity makes certifying systems harder
With the growing complexity of applications software and increasing safety and security requirements, it can be challenging to work out how to meet all the requirements in one system. Using virtualization may simplify integration and certification problems, but introduces several decisions – from different approaches to interrupt handling (either timing-driven or event-driven) to trade-offs between time spent context-switching and interrupt latency. Or consider the multiple approaches to handling peripherals, particularly those that are shared between guest partitions. It’s complex, to say the least; there is no one-size-fits-all approach. But there are solutions that can support all of these to give the system designer the flexibility they need.

If the end product requires certifying to standards such as ISO26262 or IEC16508, and is composed of multiple applications, the whole system must be certified to the highest safety level to ensure ‘freedom from interference.’ However, if secure and robust separation is used, a lesser application can be guaranteed not to interfere with any other and can remain certified to a lower quality standard.

Using virtualization to meet system safety goals
Virtualization is one of the ways in which this separation can be accomplished, simplifying the creation of complex systems and integration of software from multiple vendors.

real-time virtualization fig1

While there are many virtualization solutions available on the market, a majority were initially designed a while ago for single core, top-end processors and most of them were built for other markets and industries. Embedded virtualization has a different set of requirements and hypervisors must be designed for modern, multi-core SoCs, and developed in a manner compatible with safety certification.

Introducing Cortex-R52, ARM’s first real-time processor with virtualization support
ARM introduced support for real-time virtualization with the ARMv8-R architecture; and the ARM Cortex-R52 processor, announced in September 2016, is the first processor to implement this architecture. It has the traditional Cortex-R family features for supporting hard real-time applications, while also adding support for virtualization. At first glance, mixing virtualization with hard real-time may seem mutually exclusive, but with the right combination of hardware and software this doesn’t have to be the case.

real-time virtualization fig2

The v8-R architecture introduces a new MPU programming model that makes switching entire operating systems as quick as earlier processors would take to switch between tasks within an RTOS. Cortex-R52 adds a closely coupled interrupt controller giving very fast interrupt entry. It also allows interrupts to be flexibly routed such that critical routines could be handled directly by the hypervisor, avoiding any need for context switching. Tightly-coupled memories complete the picture, guaranteeing fast and deterministic access to critical routines and code.

While defining hard real-time requirements is something of a sliding scale and absolute deadlines are often application-dependent, certain features such as the ability to guarantee worst-case execution time can be vital to successfully implementing a design. Application processors such as the Cortex-A family can also successfully be used in real time applications, but the design engineer must pay more careful attention to various aspects of the system to ensure there aren’t worst case execution time problems. Most of these caveats relate to the memory system, including use of the MMU, and sharing of resources such as system buses.

At Embedded World 2017, March 14-16 in Nuremburg, Germany, Jon Taylor, embedded technology manager for ARM, and Felix Baum from Mentor Graphics will explain how virtualization for embedded applications can manage the growing complexity of these systems. They’ll look at some of the features in the Cortex-R52 that make it well-suited to hard real time applications. Join us to find out more in Hall 3A // Stand 3A-511 Thursday March 16th at 12 p.m.

And if you won’t be at Embedded World, check out Jon and Felix’s on-demand webinar about real-time virtualization.



Leave a Reply


(Note: This name will be displayed publicly)