26 February 2009

multicore and unicore virtualization

One of the factors driving interest in virtualization for embedded systems is the increasing penetration of multicore processors in the embedded world. Although multicore systems have been around in the server world for decades, most traditional embedded systems have been strictly uniprocessor.

However, multicore processors are a big deal in some segments of the embedded world these days. I think most of the traditional RTOSs have been multicore-enabled by now, but what about all the other layers in the software stack?

One answer for dealing with single-threaded software in a multicore world is virtualization, or more specifically partitioning: carve up your multicore system into multiple single-core systems, and then you can run that legacy software without modification. In fact, you can still win on hardware costs, because you probably save money on space, power, cooling, etc.

But virtualization makes sense on unicore systems too! Consolidating multiple legacy systems onto a single new processor can save you space, cooling, and maybe even still improve performance if the legacy hardware is a lot slower than the new stuff.

So consolidation can make sense, but there's another really interesting benefit too. For some embedded system developers, software development resources are actually a major limiting factor. These folks want to roll out a product line spanning 1-, 2-, and 4-core systems, but they don't have enough software developers to re-engineer their stack for each system.

Enter virtualization: time-share the single-core system to make it appear to have four cores. Is it fast? Hell no, but that was never the point: this is the low-end model. The most important thing is that you've managed to stretch your software investment to cover the whole line.

This may sound like something you can do with threads in a normal time-sharing kernel, but that doesn't work if the software is actually kernel-level code. For example, in an asymmetric multiprocessing (AMP) networking system, you may have an RTOS (or less) handling the data plane (pushing packets), and Linux as the control plane. Instead of implementing a data plane surrogate, virtualization allows you to preserve the same software layers and go on to solve more interesting problems.

No comments:

Post a Comment