Embedded Systems Design Europe - March 2008 - (Page 30) linux A subsystem running on a microkernel can only affect other parts of the system (outside its own address spaces) by invoking kernel mechanisms, particularly IPC. It can only directly access memory (or another resource) if it’s mapped into its address space via a system call. This model is a good fit for embedded systems, where the distinction between “system services” and “applications” is frequently meaningless due to the cooperative nature of the interaction of subsystems. The central mechanism provided by a microkernel is a message-passing communication mechanism called IPC. In the horizontal system structure, IPC is used for invoking all system services, as well as providing other communication between subsystems. Owing to the need for high-bandwidth, low-latency communication, a microkernel typically also provides mechanisms for setting up shared memory regions between processes. RIGHT MECHANISM In this context, a microkernel provides the right mechanisms for efficiently supporting virtualization. The microkernel serves as the hypervisor, which catches virtualization traps. Contrary to other virtualization approaches, the microkernel forwards the exception to a user-mode virtual machine monitor, which either performs the emulation or signals a fault. The IPC is also the enabler for low-overhead virtualization: a system-call trap executed by a guest application in a virtual machine invokes the microkernel’s exception handler, which converts this event into an IPC message to the guest operating system. The guest handles it as a normal system call. The system-call result is returned to the guest application via another IPC message, which unblocks the waiting guest process. Similarly, IPC is used to deliver interrupts to the guest operating system’s interrupt handler. It’s also used to communicate with device drivers, 30 Native vs virtualized Linux on PXA255 @ 400 MHz. Benchmark lat_ctx -s 0 1 lat_ctx -s 0 2 lat_ctx -s 0 10 lat_ctx -s 4 1 lat_ctx -s 4 10 lat_fifo lat_pipe lat_unix lat_syscall null Table 1 Native 11 262 298 48 419 509 509 1,015 0.8 Virtualized 20 5 45 58 203 49 49 77 4.8 Ratio 0.55 52.40 6.62 0.83 2.06 10.39 10.39 13.18 0.17 Imbench latencies in microseconds, smaller is better. and for communication and synchronization between any components of the system, including between virtualmachine environments. As the same IPC mechanism is used for many different operations, it’s typically highly optimized. This implicitly benefits virtualization as well as other critical system operations. As a well-designed IPC mechanism is also very simple, it’s possible to optimize it in virtually all of its aspects. A PRACTICAL APPLICATION To see how this more fine-grained approach to virtualization has an impact on how an embedded systems designer works, let’s look at a media player design, originally hosted on a more traditional para-virtualization environment with Linux as the guest operating system. The design is then ported to run in its own address space as a native application under the open source, but commercially supported, message-based OKL4 virtualization-ready microkernel. The media player can then run side-by-side with the Linux system (that still supports other applications) but also with a trusted crypto service that runs in a minimal trusted-computing-base environment. Over time, more components can be extracted from their monolithic environments, be it a high-level operating system or an RTOS running a communications stack, into their own protected compartments. This includes device drivers, network stacks, file systems and other functional components. Such an approach can dramatically improve the robustness of the system by introducing internal protection boundaries that contain the damage caused by bugs. For more than 10 years, L4 has been successfully used as a hypervisor for virtualizing Linux. As shown in Table 1, the performance of opensource OKL4-based virtual machines is typically within less than 5% of the native performance. A particularly interesting result is that of Linux on ARM platforms, where OK Linux (Linux virtualized on OKL4) outperforms native Linux in Imbench context-switching and other microbenchmarks by factors of up to 50. Gernot Heiser (gernot@ok-labs.com) is cofounder and chief technology officer of Open Kernel Labs (OK). Prior to founding OK, he created and led the Embedded, Real-Time and Operating Systems (ERTOS) research program at NICTA, the Australian national centre of excellence for information and communications technology. He is also a professor at the University of New South Wales. Gernot Heiser holds a PhD in computer science from ETH Zurich, Switzerland. MARCH 2008 | embedded systems design europe | www.embedded.com/europe 026-027-028-029-030_ESDE.indd 30 5/03/08 15:25:04 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.