A Case for Transforming Parallel Runtimes Into
Operating System Kernels
Gabriele Di Bernardo Vrije Universiteit Amsterdam
May 9, 2016
Why we need a kernel?• HW abstraction
• Process scheduling
• Memory management
• Process isolation and protection
• OS provides services to apps running on top of it through syscall API
2
Language Runtime• A RT allows a program written in the language to
interact with its environment (at runtime).
• RT carries out tasks that are hidden from the programmer but necessary to program operation.
• JIT compilation or interpretation.
• Exceptions handling.
• Tasks scheduling and memory management.
3
Language Runtime• Modern (parallel) Run-times run in user-space on top
of the general purpose OS.
• The complexity of modern hardware is rapidly growing.
• Run-time cannot access some advanced HW feature available only in kernel-mode.
• Run-time must use the abstractions provided by the kernel (mostly syscall interface), even if the abstractions are a bad fit.
4
Language Runtime• Pros
• Portability
• Cons
• Performance
• Efficiency
• Scalability
5
Beyond the kernel/user abstraction constrain
• We can notice that the lines between the runtime and the OS often become blurred.
• A (parallel) run time system that is also a kernel will have no extra overhead due syscall API invocation and can exploit all the HW features available.
• Such a runtime is called Hybrid Run-time (HRT).
6
Hybrid Runtime• Parallel runtime integrated with
kernel framework called Nautilus
• Resulting HRT run entirely in kernel mode.
• Optimised access to physical resources.
7
The Hybrid Virtual Machine
8
Nautilus• Small prototype kernel framework built to support
the HRT model.
• Designed to meet the needs of parallel run-times.
• Highly influenced by research and development in micro-kernel and exo-kernel as well.
• It targets x86_64 architecture.
9
Nautilus - Architecture
10
Legion• Run-time system designed for heterogeneous
hardware.
• It has many similarities with an OS:
• Task scheduling.
• Multiplexing of HW resources.
• Synchronization.
11
Legion - Architecture
• High-level runtime.
• Low-level runtime.
• Shared low-level runtime.
12
Legion - Porting to Nautilus
• Legion interacts with Pthreads.
• Legion uses Pthreads as representations of logical processors in high-level runtime.
• Pthread interfaces integrated in Nautilus.
13
Performance evaluation
14
Perfomance evaluation - Interrupts disabled
15
Conclusions
• It is possible to transform parallel runtimes into operating system kernel (Hybrid Runtime).
• Nautilus kernel framework with not too much effort can accomodate any (parallel) runtime systems.
• With HRT runtimes can easily access kernel-only features.
16
Sometimes we do not need a full-stack kernel.
Questions?