Embedded Systems Design Europe - March 2008 - (Page 28) linux resources and therefore break the illusion provided by virtualization. BENEFITS OF VIRTUALIZATION The key attraction of virtualization for embedded systems developers is that it supports the concurrent existence and operation of multiple operating systems on the same hardware platform. Virtualization helps overcome the challenges caused by the bifurcated programming environments by running appropriate operating systems concurrently on the same processor core, as shown in Figure 2. The same effect could be achieved by using separate cores for the real-time and application software stacks, combined with hardware mechanisms for partitioning memory. The ability to run several concurrent operating systems on a single processor core may reduce the bill of materials, especially for lower-end devices. It also provides a uniform operating system environment in the case of a product line (composed of high-end devices using multiple cores as well as lower-end single-core devices). Virtualization can also be used to enhance security. A system virtual machine encapsulates a subsystem, so that its failure can’t interfere with other subsystems (note that this encapsulation is courtesy of the aforementioned resource-control requirement). TYPES OF VIRTUALIZATION There are two basic ways to ensure that code running in the virtual machine doesn’t execute any sensitive instructions: 1) pure virtualization, which depends on sensitive instructions not being executable by the virtual machine and 2) para-virtualization, where sensitive instructions are removed from the virtual machine. Pure virtualization The classical approach is pure virtualization, which requires that all sensitive instructions be privileged. Privileged instructions can be executed in a privileged state of the proces28 MARCH 2008 | embedded systems design europe | www.embedded.com/europe sor (typically called privileged mode, kernel mode, or supervisor mode) but generate an exception when executed in unprivileged mode (also called user mode). This is shown in Figure 3. An exception enters privileged mode at a specific address (the exception handler), which is part of the hypervisor. The hypervisor can then interpret (“virtualize”) the instruction as required to maintain virtual machine state. Until recently, pure virtualization was impossible on almost all contemporary architectures, as they all featured sensitive instructions that were not privileged. Recently many of the major processor manufacturers – including Intel and AMD in the desktop space and ARM in the embedded market – have added virtualization extensions that allow the processor to be configured in a way that forces all sensitive instructions to cause exceptions. Despite this, there are a number of reasons this approach to virtualization is not generally used, especially in embedded applications. One is that exceptions are expensive. On pipelined processors, an exception drains the pipeline, resulting in delay in processing, typically one cycle per pipeline stage. A similar delay typically happens when returning to user mode. Furthermore, exceptions (and exception returns) are branches that usually are not predictable by a processor’s branch-prediction unit, resulting in additional latency. These effects typically add up to 10 to 20 cycles, more in deeply pipelined high-performance processors. Add to this the work required for the actual instruction emulation, we can see that virtualizing a single instruction costs dozens of cycles. Some processors (notably the x86 family) have exception costs that are much higher than this (hundreds of cycles). This creates substantial overhead for operating system’s code, which frequently executes many privileged instructions in a short time. Para-virtualization In this approach, the source code can be manually modified to remove direct access to privileged state and instead replace such accesses by explicit invocations of the hypervisor (“hypercalls”). Para-virtualization allows replacement of many sensitive instructions by a single hypercall, thus reducing the number of (expensive) switches between unprivileged and privileged mode. If properly implemented, para-virtualization has the potential to reduce the virtualization overhead. Variants of para-virtualization have been de- 026-027-028-029-030_ESDE.indd 28 5/03/08 15:24:33 http://www.embedded.com/europe
Table of Contents Feed for the Digital Edition of Embedded Systems Design Europe - March 2008 Embedded Systems Design Europe - March 2008 Distributors to Increase Embedded Focus Kontron and Quanta to Join Forces Coverity Raises $22m as European Business Booms Help is at Hand for Europe's Industrial Control Developers Milestones in Embedded Systems Microsoft is Recruiting for Embedded Center in Aachen European Designers to Win Cash for Green Designs Duo Work on Smaller Form Factor Europe Invests in Real-Time Java for Multicore Systems Curtiss-Wright Buys Pentland Systems Designing DSP-Based Motor Control Using Fuzzy Logic Lower the Cost of Intelligent Power Control with FPGAs Virtualizing Embedded Linux Back to the Future: Manchester Encoding Is Multicore Hype or Reality New Products Advertising Contacts Embedded Systems Design Europe - March 2008 Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 1) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 2) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 3) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 4) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 5) Embedded Systems Design Europe - March 2008 - Kontron and Quanta to Join Forces (Page 6) Embedded Systems Design Europe - March 2008 - Kontron and Quanta to Join Forces (Page 7) Embedded Systems Design Europe - March 2008 - Milestones in Embedded Systems (Page 8) Embedded Systems Design Europe - March 2008 - Milestones in Embedded Systems (Page 9) Embedded Systems Design Europe - March 2008 - Duo Work on Smaller Form Factor (Page 10) Embedded Systems Design Europe - March 2008 - Duo Work on Smaller Form Factor (Page 11) Embedded Systems Design Europe - March 2008 - Curtiss-Wright Buys Pentland Systems (Page 12) Embedded Systems Design Europe - March 2008 - Curtiss-Wright Buys Pentland Systems (Page 13) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 14) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 15) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 16) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 17) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 18) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 19) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 20) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 21) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 22) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 23) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 24) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 25) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 26) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 27) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 28) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 29) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 30) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 31) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 32) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 33) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 34) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 35) Embedded Systems Design Europe - March 2008 - Is Multicore Hype or Reality (Page 36) Embedded Systems Design Europe - March 2008 - Is Multicore Hype or Reality (Page 37) Embedded Systems Design Europe - March 2008 - Is Multicore Hype or Reality (Page 38) Embedded Systems Design Europe - March 2008 - New Products (Page 39) Embedded Systems Design Europe - March 2008 - New Products (Page 40) Embedded Systems Design Europe - March 2008 - New Products (Page 41) Embedded Systems Design Europe - March 2008 - New Products (Page 42) Embedded Systems Design Europe - March 2008 - Advertising Contacts (Page 43) Embedded Systems Design Europe - March 2008 - Advertising Contacts (Page 44)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.