Generally, Intel® Hyper-Threading technology (Intel® HT technology) seeks to boost performance in systems by making the most efficient use of multiple execution units in a superscalar processor core. It turns out, however, that Intel HT technology can also be leveraged in a virtualization application -- running both a general purpose OS (operating system) like Windows and a RTOS (real time operating system) simultaneously on a single core. Such an implementation on an Intel® AtomTM processor allows the ultra-low-power and low-cost processor to respond to external events with latency under 10 microseconds - achieving what is commonly called hard real-time performance. In such an application, Atom can usurp the need for a processor such as a PowerPC that's often dedicated to the real-time task.
Hyper threading allows multiple software threads to execute in parallel on a single processor core. Generically in the industry you will hear this technology referred to as simultaneous multithreading. Parallel threads execute simultaneously and maximize efficiency by minimizing the time that an execution unit idles, waiting for work due to situations such as a thread waiting for external data.
RadiSys, a Premier member of the Intel® Embedded and Communications Alliance (Intel® ECA), has leveraged Intel Hyper-Threading technology in multiple ways. In a future blog post I'll describe how RadiSys leveraged hyper threading to boost performance in an imaging application on a Nehalem-based system. But in this post, we will focus on how to implement a real-time embedded system such as an industrial controller on a single low-power processor while maintaining the convenience of a general purpose OS.
Real-time industrial controllers often rely on two separate, but closely-linked computers -- a ruggedized PC running Windows, or perhaps Linux, alongside an embedded system running an RTOS. The Windows system provides the convenience of the GUI for a robust user interface and of course support for networks like Wi-Fi and connectivity such as USB. The real-time systems often use processors such as the PowerPC that lack the high-end performance of the x86 family but that can provide the needed low-latency response. RadiSys Director of Software Marketing Linda Xiao states, "We regularly see demand for sub-10-microsecond level latency and sometimes for response in as little as 2 microseconds."
Clearly, a single-processor approach would provide cost savings in the hypothetical industrial controller that I've described. Moving to a single processor, however, would require loosing the convenience of Windows, or conceiving a way to run both OSs on the same processor while preserving the fast interrupt response time.
RadiSys found the answer in the Hypervisor technology that the company jointly developed with Real Time Systems. RadiSys supplies the Hypervisor as middleware with its OS-9 RTOS that's designed for hard real-time applications. Real Time Systems GmBH is an Affiliate member of the Intel ECA.
Hypervisor is virtualization technology that from a macro view may seem similar to Intel® Virtualization Technology (Intel® VT). Both allow multiple operating systems to run simultaneously with each fully isolated from the other. According to Xiao, however, Intel VT targets high performance applications ranging from servers in the IT space to compute-intensive embedded applications, whereas Hypervisor targets low latency. She states, "It's not about fast but about determinism." In the case of a real-time system, Hypervisor runs Windows on one thread and the RTOS on another.
According to Xiao, the Virtualization Manager (VM) software layer in typical virtualized implementations adds jitter to the RTOS response. The Hypervisor approach seeks to minimize the amount of OS code that runs through a VM layer by partitioning software access to processor hardware features whenever possible. You can access more details on the technology in the Hypervisor data sheet. The block diagram below shows how the RTOS is afforded direct access to hardware.
Of course, the designers working on industrial control applications also care about preserving their prior investment in software. And many were not using x86 processors in real-time systems. Xiao claims that porting OS-9 to the x86 from the PowerPC took only three days. And the Hypervisor approach preserves compatibility with existing drivers and applications - all executing on the single Atom core.
Hyper-Threading Technology and the Hypervisor provide a good match for many applications. The user interface development gets the benefit of Windows and even the graphics accelerators that are widely available. And according to Xiao, Atom provides a good balance of cost, performance, and power consumption. She states, "You don't use Atom for performance, but for system consolidation, cost reduction, and software reuse."
I'd also point out an earlier blog post that covers the use of Hypervisor on a specific RadiSys multi-core board based on an Intel® CoreTM 2 Duo processor.
How have you combined general-purpose and real-time OSs in an application? The many followers of the Intel® Embedded Community would greatly benefit from comments sharing your techniques.