2. 2
What is Unikernel?
From Wikipedia (https://en.wikipedia.org/wiki/Unikernel)
Unikernels are specialised, single address space machine images constructed by using library operating systems.
A developer selects, from a modular stack, the minimal set of libraries which correspond to the OS constructs required for their
application to run. These libraries are then compiled with the application and configuration code to build sealed, fixed-purpose
images (unikernels) which run directly on a hypervisor or hardware without an intervening OS such as Linux or Windows.
3. 3
Current Application Stack
Hardware
Kernel
(scheduler, memory management,
process management, device
drivers, network stack, filesystems)
For the application to run on the hardware there are many layers
User space
Kernel space
Different Address Spaces
runtime
application
libraries
4. 4
Unikernel based Application Stack
Hardware
Unikernel tries to remove the layers between the application and hardware
Ref: http://www.fixup.fi/misc/usenix-login-2015/login_oct15_02_kantee.pdf
No privilege transitions between
user space and kernel space.
runtime
application
libraries
kernel
Single Address Space
5. 5
Unikernels Cont...
● Library OS - provides the tools to create unikernels. Example – MirageOS, Rump
kernel
● Advantages
– Since no privilege transitions required, a library OS provides improved performance by
allowing direct access to hardware.
● Disadvantages
– Runing multiple applications in a library OS, with resource isolation is complex.
– Update and maintenance of the hardware specific device drivers required by the Library OS
● Solution
– Leverage OS virtualization (Xen, Qemu/KVM)
– Library OS just implements the drivers for stable virtual hardware whereas physical
hardware compatibility provided by regular OS hypervisors
6. 6
Host OS (hypervisor)
App 1 App 2
Host OS (hypervisor)
App 1
Library
OS
App 2
Library
OS
Container
Container
Guest OS
Unikernel model
Traditional Containers Unikernel Containers
Unikernel Container = application + library OS running as a VM
Unikernels Cont..