Virtualization Brings Real Benefits
By Control Engineering Contributing Writers -- Control Engineering, 7/1/2007
Intel® Virtualization Technology, or Intel® VT, enables the integration of two or more autonomous applications. Exploiting the company’s multi-core microprocessors, Intel VT offers industrial automation users the performance of multiple separate processors in a single chip. This multitasking brings some significant benefits.
The advantages show up in lower overall power consumption, smaller hardware footprint and lower system costs. Intel VT also offers isolation between applications and enhanced fail over reliability, a result of virtualization and multiple cores. Finally, Intel VT makes it possible to deploy applications on a factory floor without impacting operations, an important plus.
Intel’s worldwide industrial automation segment market manager Ian Gilvarry notes the multiple benefits all derive from the new technology. “With a multi-core enabled design, you can realize a single hardware footprint that consumes less power,” he says. “Virtualization is an enabling technology. There’s a major cost savings here.”
Avoiding a Sticky SituationTo see how these benefits come about, take a common situation faced by industrial automation users. They need a GUI, a graphical user interface, for the operator and HMI. Some general purpose operating systems, such as Microsoft Windows*, come with a wealth of tools and libraries that make it easier for developers to customize the GUI. On the other hand, a general purpose OS (GPOS) may not be suitable to handle the real-time (RT) tasks at the heart of industrial automation. For that, users need a real-time OS (RTOS).
In meeting these somewhat contradictory requirements, users have traditionally opted to integrate two machines, one for real time control based on an RTOS and the other for operator interface based on a GPOS. That approach doubles both upfront and operating costs, as well as increasing the hardware space needed. Alternatively, they could go for a machine running multiple operating systems. This approach is complex to implement and has some limitations.
Platform solutions architect Edwin Verplanke cites a typical example of virtualization done without multi-core support. In that case, the RTOS must take control of interrupts, the asynchronous signals received when an external device, such as a motorized arm, needs attention. With software-only virtualization, the GPOS has to be manipulated at a basic level to ensure that interrupt and scheduling functions are handled by the appropriate OS with the right level of priority.
“If Windows* attempts to service it, the other kernel will take control. It will suspend Windows. But that is very, very complex,” says Verplanke. This approach is problematic, he continues, because most operating systems expect to have full hardware access.
With Intel VT, Intel provides hardware support for virtualization for developers to take advantage of the two or more processor cores present in multi-core chips. One core can host the RTOS while the other hosts a Windows or Linux* GPOS. This divide-and-conquer approach solves the two important problems critical to many automation applications: latency and jitter performance.
An unavoidable side effect of the software only solution is an increase in interrupt jitter or system latency. Tests, for instance, show that a largely idle 2.4 GHz Intel® Celeron® processor-based machine hosting two operating systems takes 6.8 microseconds to start up a real-time interrupt handler when an interrupt is triggered. That’s more than twice the time of a 2 GHz Intel® Core™ Duo processor hosting the same software. The situation is worse when the two systems are loaded, each running multiple Windows applications with disk and network access. Then the single-core system’s response balloons out to 17.7 microseconds. In contrast, the multi-core setup’s response time is 3.3 microseconds, the same for the unloaded case. This bounded real-time performance occurs because one core is handling the GPOS demand while the other is hosting the RTOS.
Such low interrupt latencies enable bounded real-time application control loops to operate as quickly as every 50 microseconds, a much shorter cycle than is possible with software virtualization. The difference translates into a qualitative and quantitative enhancement of industrial control, points out Verplanke. “The faster you can regulate the flow of something or the faster you can react to a specific request, the better it is.”
Getting to the RootIntel’s roadmap on virtualization technology is a phased approach to enable efficient and complete sharing of resources among several operating systems. The first generation of this technology, Intel VT for IA-32 Intel® architecture (Intel® VT-x), circumvents previous virtualization problems by introducing root and non-root modes, with the first a higher privilege level than the second. Prior to this, the standard model had the operating system sitting at Ring 0, where it had full access to the hardware and was responsible for scheduling. Applications, in contrast, sat at Ring 3. For virtualization in such a setting, a software only virtual machine monitor, a VMM or hypervisor, had to be sandwiched between the hardware and the OS, a complicated chore.
With Intel VT-x, guest operating systems can be loaded in non-root mode. In that case, the guest OS sits at Ring 0 of the non-root machine and does so without modification. As far as the OS and any applications running on it are concerned, the arrangement looks no different than is the case with a single core chip. The hypervisor, on the other hand, is in root mode and conceptually sits between the OS and the hardware. It handles communication between the guests by, for instance, creating a virtual device that one OS sets as a flag when it has information in a shared memory region for the other.
While all of the hardware could be virtualized, that is generally not done in an RT control application. Instead, for performance and reliability reasons a partial virtualization is typically done.
The GPOS will then have largely unfettered access to the hardware, with certain exceptions. “The real-time kernel will continue to take control over those devices it requires control over in order to guarantee bounded real-time performance,” says Verplanke.
Example of resources that might be exclusively controlled by an RTOS include a video capture system, a fieldbus interface or an Ethernet NIC for industrial I/O. User interface devices like a keyboard, mouse, or console are usually not time-critical and so could be virtualized by the hypervisor.
Virtualizing InterruptsWhile Intel VT-x and dual cores are a reality in embedded applications today, the next step in the technology roadmap will add cores and virtualization capabilities. This year, Intel will debut a four core system, along with Intel VT for Directed I/O (Intel® VT-d) for embedded systems. The two offer significant advantages, particularly when it comes to industrial control.
With Intel VT-d, the focus shifts from virtualization of the processor to virtualization of I/O. Currently if a guest OS requires access to a particular piece of hardware, the hypervisor has to explicitly support this by offering mapping that connects the guest OS to the hardware in question. With Intel VT-d, that will no longer be needed as it will enable directly assigning I/O devices to a specific guest.
A direct memory access (DMA) remapping scheme, Intel VT-d will allow partitioning of resources without the overhead found in today’s virtualization schemes. In combination with the expansion from two cores to four, it allows for systems in which DSP, Real Time Control and Operator Interface functions can be consolidated into one multi-core setup. In that arrangement, one core can handle primary machine control, another can do high-performance data acquisition and digital filtering, while the rest support enterprise network access and the Human Machine Interface.
In summing up the situation, Gilvarry notes that Intel VT offers industrial automation applications more for less. For less power in a smaller space and at a lower cost, Intel VT enables increased performance, functionality and greater system uptime. He adds that being able to do two things at once helps both with initial development and later when the inevitable upgrade comes along for the application or the GPOS. “We have the ability to perform software migration without having to bring down the platform.”
|



















View All Blogs



