Virtualization for Hard Real-Time Applications Partition where you can Virtualize where you have to Hanspeter Vogel Triadem Solutions AG Real-Time Systems GmbH Gartenstrasse 33 D-88212 Ravensburg Germany Experts for Real-Time and Embedded Systems
Trends Hypervisor and Market Trend Processor Development Multi-core CPU enables exponential performance improvement Anticipating multi-core adoption to double within the next two years according to recent VDC report
Traditional Solution User Interface HMI / SCADA Windows XP e.g.plc or Controller. Real-Time OS x86 CPU IPC ARM / PPC Embedded Ctrl. Fieldbus or RT Ethernet Machine TCP / IP (LAN) Modern Cost Saving Solution User Interface HMI / SCADA Windows XP PLC or Controller Etc. TCP/IP Real-Time OS (Logical) CPU 1 ATOM or DualCore HW (Logical) CPU 2 Fieldbus / RT Ethernet Machine
Benefits of Virtualization Consolidate multiple systems onto a single system Reduce hardware costs (Eliminate separate Controllers) Increase MTBF (Reliability) by reducing Hardware Components Reduce Space, Weight and Power Requirements Reduce Cables and Connectors Reuse existing software With VM, existing applications run under each OS machine without re-porting Virtualization Why can t you just use regular virtualization like VMWare, Hyper-V, XEN, KVM, etc.?
Traditional Virtualization Emulated or Virtualized Hardware Type 2 Hypervisor (Host based) Host OS always has to boot first Guest OS depends on Host OS Host OS/VMschedules processing No Hardware access for Guest OS Only Virtual Devices Accessible Host OS provides Drivers Loss of Real-Time! Real-Time Virtualization Type 1 Hypervisor ( Bare Metal Hypervisor ) Virtualization adds latencies Virtualizing MMU, Interrupt Controller etc. affect determinism Debugging more difficult due to additional component (Virtual Machine)
RTS Real-Time Hypervisor Partition where you can, virtualize where you have to RTS Hypervisor Partitioning instead of Virtualization Example of a Core 2 Duo Processor Direct hardware access Exclusive resource allocation Up to 255 cores Use of standard drivers No latencies (0 µs) added Complete isolation of Operating Systems in memory No dependencies between Operating Systems Easy communication Definable boot sequence Reboot any system anytime
Example Configuration Possible Architecture e.g. Clusters of 16 CPUs Six cores executing Windows Four Cores executing Linux Five Cores executing an RTOS Spare cores might be used to replace DSPs..or for Health-Monitoring Interrupt Handling RTS Hypervisor: No Software Layers added (example for Dual Core) The RTS Hypervisor configures the system so all Interrupts are handled directly in hardware. Unlike traditional Hypervisors this adds no latencies.
Privileged vs. Virtualized Providing Direct Hardware Access A GPOS like Windows opens up the system to the end user. Applications and even drivers can be added to the system. I.e. these systems are much more prone to failure in the field. RTOS Code is tested thoroughly Modifications are not possible for the end user. RTOS can therefore be regarded Trusted and deployed in PRIVILEGED Mode. Granting direct hardware access comes with great responsibility Privileged access should only be given to RTOS, not e.g. Windows. Direct Hardware Access Partition where you can. Virtualize where you have to Optionally, an RTOS could also be deployed using Full Virtualization. For real-time applications it is recommended to grant direct hardware access to minimize latencies => Privileged The RTS Real-Time Hypervisor virtualizes only hardware used by a General Purpose Operating System (e.g. Windows), elements that play no role in realtime system performance.
Communication 100% Separation How do Systems Communicate? Shared Memory The RTS Hypervisor allows for one or multiple shared memory areas to be configured. The size of the shared memory is only limited by the amount of memory available in the system. A simple API provides access to the shared memory from within each Operating System providing for Lock mechanisms and simple communication. Virtual Network (using Inter Processor Interrupts IPI) The hypervisor provides network drivers for each operating system that reside directly on shared memory. Each Processor core can have its own IP address and MAC address. Regular protocols, like TCP-IP, OPC, CORBA etc. can be used for communication between cores Portfolio RTS Real-Time Hypervisor The NEURTAL Hypervisor Simultaneously Run Multiple OS es independently Currently supporting Wind River VxWorks QNX Neutrino Microsoft Windows RTEMS Linux Proprietary RTOS MeeGo Microware OS-9 On Time RTOS-32 Windows Embedded CE T-Kernel / Itron PreEmptive Linux (OSADL) Android free standing C-Code others upon request All systems independent and safely separated Hard Real-Time execution is assured
Example: HOMAG Germany Homag AG: No. 1 Worldwide for Woodworking Machines Shipping Thousands of Machines in over 100 countries CNC Machining Center For Furniture Manufacturing Example: HOMAG Germany PC Based Control realizing very challenging requirements: Typically a 20 Year Machine Live Span! High-end over 40 CNC Axis, distributed over up to 20 CNC channels (Dual Core Windows / Linux 22 CNC Axis) Motion Control CNC and PLC functionality Real-Time Ethernet (ProfiNet IRT) PLUS Windows CAD Programming Tools Windows 3-D Simulation Online collision detection (detect all possible collisions based on mathematical machine model to stop machine if needed)
Contact Triadem Solutions AG Güterstrasse 13 CH-2502 Biel Sales and Marketing hanspeter.vogel@triadem.ch Phone: +41 (0)32 327 36 32 Fax: +41 (0)32 327 36 37