BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Helios Uses Satellite Kernels to Deal with Heterogeneous Environments

Helios Uses Satellite Kernels to Deal with Heterogeneous Environments

This item in japanese

Helios is a Microsoft research OS project intended to ease the process of writing applications for heterogeneous environments by using satellite kernels. The researchers involved are: Edmund B. Nightingale, Orion Hodson, Ross McIlroy, Chris Hawblitzel, and Galen Hunt, and they published the paper Helios: Heterogeneous Multiprocessing with Satellite Kernels (PDF).

This research project starts from the observation that systems, while containing interchangeable CPUs that execute the same set of instructions and provide the same functionality, they contain programmable devices like NICs and GPUs with significant computing power but with a separate instruction set and a control of their own. Besides, the operating systems treat such programmable devices like any other non-programmable IO device, the communication between the CPU and the IO card being limited to passing some data bytes between the two through device drivers instead of providing software interfaces that applications could use to run certain tasks on such cards. Another issue mentioned by the authors is that the device drivers run in privileged mode inside the OS, but they have become increasingly complicated. An example mentioned in the article is NVidia graphics driver which contains a JIT compiler.

The authors’ solution is Helios, an OS which does not contain a single kernel but satellite kernels. Such a kernel runs on any CPU or device with computability power, exporting a common interface, a set of OS abstractions understood by all the kernels and the applications supposed to run on such systems. Satellite kernels are

microkernels. Each satellite kernel is composed of a scheduler, a memory manager, a namespace manager, and code to coordinate communication between other kernels. All other traditional operating system drivers and services (e.g., a file system) execute as individual processes. The first satellite kernel to boot, called the coordinator kernel, discovers programmable devices and launches additional satellite kernels.

The kernels communicate with each other through remote message passing:

Helios provides transparent access to services executing on satellite kernels by extending a traditional message-passing interface to include remote message passing. When applications or services communicate with each other on the same satellite kernel a fast, zero-copy, message-passing interface is used. However, if communication occurs between two different satellite kernels, then remote message passing automatically marshals messages between the kernels to facilitate communication. Since applications are written for a message-passing interface, no changes are required when an application is run on a programmable device.

Helios introduces an affinity metric expressing the suitability to run a process on a kernel. This metric is used to decide on which kernel a process should be scheduled to run on because the respective kernel will perform better at executing that code, the kernel being tied to the hardware beneath it. A positive affinity suggests running the process on the respective kernel, while a negative one suggest finding another kernel.

For example, the Helios networking stack expresses a positive affinity for the channels used to communicate with a network device driver. When a programmable network adapter is present, the positive affinity between the networking stack and the driver executing on the adapter causes Helios to automatically offload the entire networking stack to the adapter. Offloading the networking stack does not require any changes to its source code.

For this approach to work, Helios uses a two-step compilation process. Applications are compiled from source code to an intermediary language, then, upon installation, the application is compiled to machine code based on the system’s architecture, more exactly the instruction set of each processor (CPU, GPU, NIC, etc.) found.

The team has developed kernels for XScale programmable IO cards, using an ARM architecture, and cache-coherent NUMA architectures. They affirmed obtaining performance benefits:

We show up to a 28% performance improvement by offloading tasks to the XScale I/O card. On a mail-server benchmark, we show a 39% improvement in performance by automatically splitting the application among multiple NUMA domains.

Helios is a project based on Singularity, a Microsoft research project intended to explore new options for operating systems. Future plans for Helios include creating a kernel for a GPU like Intel Larabee graphics card, finding a way to allow processes to span multiple NUMA domains by moving CPUs and memory between kernels, and how to make use of Windows’ extensive set of device drivers and its kernel code in order to create satellite kernels.

Rate this Article

Adoption
Style

BT