The advances made in multi-core technology and associated middleware
allow developers to combine the best principles of multi-processing,
virtualisation, real-time and hard partitioning to create a highly
optimised execution environment for embedded applications. Here we look
at the technology impact of multi-core processors on operating system
and application software design.
Of late, innovation in processor architecture has been focused on
creating multi-core processors. These multi-core processors introduce
two or more processing cores in a single chip, thereby giving operating
systems and applications access to increased computing power.
One of the significant advantages of these multi-core processors is
the additional computing resources without any significant increase in
size and weight; previous generations of multiTextprocessing
configurations involved two or more physical chips that required
additional real estate on processor boards.
The immediate benefits are obvious; applications that were designed
around uni-processor configurations can replace uni-processor cores
with dual or quad core processors. The computing power of these
configurations increases dramatically with no appreciable change in its
physical configuration.
The software impact of multi-core processors is fairly immediate on
operating systems design. The OS has to adapt to support symmetric
multi-processing (SMP) or asymmetric multi-processing (AMP), two major
approaches for support of multi-core processors.
The operating system design has to adapt in the areas of scheduling,
interrupt handling, synchronisation and load balancing. Application
programs can also be affected by multi-core processors based on the
ability of the OS to provide fine-grained control of process scheduling
to applications.
For example, an application can make a request to execute on a
specific processor core only. However, the increase in compute power
through multi-core processors can be better harnessed through another
recent trend in OS design, namely virtualisation.
Virtualize with binary compatibility layers
Virtualisation is a technique used to create an execution environment
for software that is similar to the one it was originally designed for,
but on a different hardware or operating system. It can be achieved
usually at two levels; OS virtualisation and hardware virtualisation.
Operating System virtualisation is done using binary compatibility
layers that run on heterogeneous operating system environments, while
presenting an interface similar to the original OS environment. This is
most often done to achieve migration and execution of applications
across multiple heterogeneous operating system environments. For
example, the ability to run Windows applications on Linux uses a
virtualisation technique that simulates the behaviour of the Windows
operating system on Linux.
Hardware virtualisation involves the emulation of the underlying
hardware capabilities to allow operating systems themselves to run in a
hardware environment different from its original environment. Software
programs that emulate the underlying hardware capabilities are called
virtual machines (VM) or virtual machine monitors (VMM).
A VM abstracts the capabilities of hardware and makes it available
in environ-ments different from the original hardware. Some of the well
known virtual machines are VMware, which emulates a standard Intel x86
PC architecture on a Macintosh environment, and the Java Virtual
Machine (JVM), that emulates a specialised byte-code for a
pseudo-processor.
Hardware virtualisation can also be extended to allow multiple
heterogeneous operating systems to execute on single physical machine.
The ample computing resources of modern multi-core processors make this
extension possible. However, these multiple instances of heterogeneous
operating systems need to execute in a resource isolated environment,
with no functional impact to other instances of operating systems. This
is essential since they will be sharing computing resources.
Hardware virtualisation for an OS
Enabling multiple instances of heterogeneous operating systems on a
single machine involves solving technical challenges in virtualisation
and resource isolation, while retaining complete binary compatibility
and acceptable level of performance.
Virtualising multiple instances of an operating system can be done
using either full virtualisation or partial virtualisation. The virtual
machine in either case virtualises the hardware to provide the illusion
of real hardware for the operating systems executing on this virtual
machine. However, both full and partial virtualisations have some key
differences in their overall architecture, leading to a different set
of trade-offs.
Full virtualisation of the underlying hardware requires virtualising
all the capabilities of the processor and board. This involves complex
manipulations of memory management and privilege levels that are
computationally intensive on commodity processors.
This leads to performance overheads that are much higher than the
non-virtualised versions of the OS. However, the biggest benefit of
full virtualisation is to allow operating systems to run unmodified,
although at the cost of a significant performance overhead.
 |
| Figure
1: Virtualized OS architecture on a multi-core processor |
Partial or para-virtualisation is usually a technique where the
underlying hardware is not completely simulated in software. This
architecture allows commodity operating systems to be easily
virtualised on commodity processors, although with the requirement that
the virtualised operating system requires code modifications to adhere
to the partially virtualised architecture. However, the performance of
partially virtualised architectures is much better than the fully
virtualised machines, usually within a few percent of the
non-virtualised versions.
The other key requirement for running multiple operating systems in
the context of a virtual machine is the ability to isolate the physical
resources of a computer. This is achieved by time-space partitioning, a
concept used extensively in safety-critical and secure systems. In a
time-space partitioned system, the virtual machine sub-divides two key
computing resources: CPU time and physical memory.
The physical memory is divided into unique, non-overlapping ranges,
and assigned to individual heterogeneous virtualised operating systems.
The time scheduler allocates periods of CPU time to each virtualised OS
that is usually fixed and cyclic. This gives the illusion of exclusive
access to computing resources for the virtualised operating systems.
The ability of the virtual machine to support time-space partitioning
is a basic prerequisite for the execution of multiple virtualised
operating systems on a single machine.
Both full and partial virtualisations support 100% binary
compatibility with the stand-alone version of the operating system. It
also allows the ability to retain the benefits of multiple address
spaces within a single operating system instance.
One significant difference between a stand-alone operating system
and a virtualised version is that the virtualised OS runs in a less
privileged mode (user mode). This is necessary since the virtual
machine that provides the virtualised architecture is the sole entity
that is running at highest privileged level (supervisor mode). Figure 1 above shows the generic
architecture supporting multiple heterogeneous operating systems
running on a virtual machine.
1
|
2
|
Rate this article:
|
Low
High
|
|