SlideShare a Scribd company logo
1 of 30
Download to read offline
http://d3s.mff.cuni.cz
http://d3s.mff.cuni.cz/aosy
Martin Děcký
decky@d3s.mff.cuni.cz
Unikernels, Multikernels,
Virtual Machine-based
Kernels
Unikernels, Multikernels,
Virtual Machine-based
Kernels
2Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Recall: Common OS TaxonomyRecall: Common OS Taxonomy
Special-purpose operating systems
Real-time operating systems
Hypervisors (type 1)
...
General-purpose operating systems
Monolithic kernel
Single-server microkernel
Multiserver microkernel
Hybrid kernel (?)
3Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Monolithic KernelMonolithic Kernel
hardware
monolithic kernel
application application application
privileged mode
unprivileged mode
memory
mgmt
scheduler IPC
device
drivers
file system
drivers
user
mgmt
network
stack
...
4Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Single-server MicrokernelSingle-server Microkernel
hardware
microkernel
application application application
privileged mode
unprivileged mode
memory
mgmt
scheduler IPC
system server
device
drivers
file system
drivers
user
mgmt
network
stack
...
5Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
file system
driver server
Multiserver MicrokernelMultiserver Microkernel
hardware
microkernel
application application application
privileged mode
unprivileged mode
memory
mgmt
scheduler IPC
naming
server
location
server
device driver
server
device driver
server
device driver
server
file system
driver server
file system
driver server
device
multiplexer
file system
multiplexer
network
stack
security
server
...
6Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
ExamplesExamples
Monolithic kernel
Linux, Solaris (UTS), Windows, FreeBSD, NetBSD,
OpenBSD, OpenVMS, MS-DOS, RISC OS
Single-server microkernel
CMU Mach, AmigaOS, NeXTSTEP
Multiserver microkernel
HelenOS, MINIX 3, Genode, GNU/Hurd, Redox,
RefOS (seL4)
7Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Hybrid KernelHybrid Kernel
No universally accepted definition
“Architecture that somewhat resembles a microkernel, but is not a
pure microkernel.”
Windows NT
Internal architecture and communication abstractions inspired by
CMU Mach (message passing, ports)
Originally user space device drivers
Later moved into the kernel, more recently some driver classes in user space again
macOS (iOS, etc.)
The core xnu component actually contains the CMU Mach 3.0 microkernel
Native and ported (BSD) system functionality in user space
Gradual erosion towards kernel drivers
BeOS (Haiku), Syllable, DragonFly BSD, Plan 9, NetWare, eComStation
8Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Windows NTWindows NT
[1]
9Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
macOSmacOS
[2]
10Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
file system
driver server
Multiserver Microkernel (reprise)Multiserver Microkernel (reprise)
hardware
microkernel
application application application
privileged mode
unprivileged mode
memory
mgmt
scheduler IPC
naming
server
location
server
device driver
server
device driver
server
device driver
server
file system
driver server
file system
driver server
device
multiplexer
file system
multiplexer
network
stack
security
server
...
11Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Hypervisor (Type 1)Hypervisor (Type 1)
hardware
hypervisor
hyper-privileged
modememory
mgmt
scheduler comm
privileged mode
operating system
kernel
privileged mode
unprivileged mode
app app
app app
operating system
kernel
privileged mode
unprivileged mode
app app
app app
operating system
kernel
privileged mode
unprivileged mode
app app
app app
12Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Common Cloud DeploymentCommon Cloud Deployment
hardware
hypervisor
hyper-privileged
modememory
mgmt
scheduler comm
privileged mode
operating system
kernel
privileged mode
unprivileged mode
app
operating system
kernel
privileged mode
unprivileged mode
app
operating system
kernel
privileged mode
unprivileged mode
app
13Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
UnikernelUnikernel
hardware
hypervisor
hyper-privileged
modememory
mgmt
scheduler comm
privileged mode
unikernel
kernel
component
app
component
unikernel
kernel
component
app
component
unikernel
kernel
component
app
component
14Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Unikernel (2)Unikernel (2)
Library operating system
Payload (application) merged with the kernel
Kernel component acts as a library providing access to
the hardware, threading, file systems, etc.
Only necessary functionality
Mostly static (single image), but there are dynamic
variants
Code runs in privileged mode and single address space
No mode switches, address space switches
Syscalls can be replaced by function calls
Isolation/security provided by the underlying hypervisor
15Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Unikernel (3)Unikernel (3)
Exokernel
MIT since 1994
Goal: End-to-end principle
Limiting the number of abstractions (compared to monolithic
kernels)
Limiting the communication complexity (compared to microkernels)
Co-existence with a regular kernel
ExOS (MIT)
Nemesis (University of Cambridge, University of Glasgow,
Swedish Institute of Computer Science, Citrix)
Multimedia applications
16Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Unikernel (4)Unikernel (4)
Rumprun
POSIX compliant, BSD-compatible run-time environment
Original concept: NetBSD anykernel
Possibility to compile NetBSD drivers and subsystems either as traditional kernel
components or as standalone user space libraries (rump kernels)
Rump kernels communicate with the host kernel using syscall interface
Replacing the syscall interface of rump kernels with a hypercall
interface to the hypervisor
“Bare metal” execution also possible
Drawbridge
Win32-compatible run-time environment
Originally a Win32 environment running in a Windows picoprocess
17Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Unikernel (5)Unikernel (5)
git clone https://github.com/rumpkernel/rumprun.git
cd rumprun
git submodule init
git submodule update
(depending on the local C compiler, apply a small patch from
https://github.com/rumpkernel/rumprun/issues/86)
./build-rr.sh hw ./build-rr.sh xen
export PATH=”$PATH:`pwd`/rumprun/bin”
x86_64-rumprun-netbsd-gcc -o module module.c
rumprun-bake hw_virtio unikernel.bin module
rumprun kvm -i unikernel.bin
18Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Unikernel (6)Unikernel (6)
OSv
Linux-compatible application environment
Not just a run-time, but a complete OS compatibility
Goal: Running hosted applications in unmodified run-
time environments for Linux
E.g. Java EE application running in Tomcat for Linux
No notion of users, single address space, processes
emulated using threads
Similar deployment as in Linux (shell scripting, etc.)
19Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Unikernel (7)Unikernel (7)
Managed language run-time in kernel
Clive (Go)
ClickOS, IncludeOS, HermitCore (C++)
HaLVM (Haskell)
LING (Erlang)
MirageOS (Ocaml)
Runtime.js (JavaScript)
20Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Monolithic Kernel (reprise)Monolithic Kernel (reprise)
hardware
monolithic kernel
application application application
privileged mode
unprivileged mode
memory
mgmt
scheduler IPC
device
drivers
file system
drivers
user
mgmt
network
stack
...
21Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Virtual Machine-based KernelVirtual Machine-based Kernel
hardware
virtual machine + run-time environment
application application application
privileged mode
memory
mgmt
scheduler IPC
device
drivers
file system
drivers
user
mgmt
network
stack
...
22Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Virtual Machine-based Kernel (2)Virtual Machine-based Kernel (2)
Inferno
Derived from Plan 9 from Bell Labs
“Everything is a file” paradigm
All global objects represented as file system paths (global namespace)
All operations with objects mapped to common file system operations (walk,
stat, create, open, read, write, close, etc.)
Local object identification using file descriptors
Dis virtual machine and Limbo type-safe language
Ada-like syntax, Modula inspired modules, concurrency model based on
Communicating Sequential Processes, garbage collector
File system operations mapped to Styx communication protocol
(compatible with 9P2000)
Distributed computing
23Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Virtual Machine-based Kernel (3)Virtual Machine-based Kernel (3)
Singularity
Microsoft (2003 – 2010)
Sing# virtual machine
Based on Spec#
– Superset of C# with Eiffel-like specification of code contracts (object invariants, preconditions,
postconditions, non-nullable types)
– Static checker (based on theorem prover)
– Run-time checker
Extends Spec# with support for communication channels and low-level constructs (structures,
inline assembler)
Bartok just-in-time compiler (CIL to x86)
Research prototype
Midori expected to be a commercial variant and future replacement of Windows NT
(discontinued in 2015)
Several similar approaches
(MOSA, Cosmos for C#; JNode, Phantom OS for Java)
24Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
MultikernelMultikernel
CPU
kernel
application
privileged mode
unprivileged mode
serverserver
application
CPU
kernel
application
serverserver
application
CPU
kernel
application
serverserver
application
25Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Multikernel (2)Multikernel (2)
Barrelfish
ETH Zürich, Microsoft Research
Side note: Mackerel hardware description language
Driver synthesis
Support for heterogeneous CPU cores
Common asynchronous messaging abstraction
between cores/nodes
Explicit inter-core communication (as opposed to cache coherency)
Practically no shared memory and state between cores
Managing state replicas using distributed algorithms between cores
26Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Barrelfish: Mackerel LanguageBarrelfish: Mackerel Language
Describe devices and control registers
Used to generate C accessor functions
Also for other low level data structures
device HPET lsbfirst ( addr base ) "High-Precision Event Timer" {
register gcap_id ro addr(base, 0x0) "General Capabilities and Identification" {
rev_id 8 "Revision Identification";
num_tim_cap 5 "Number of Timers";
count_size_cap 1 "Counter Size";
_ 1 mbz;
leg_rt_cap 1 "Legacy Replacement Rout Capable";
vendor_id_cap 16 "Vendor ID";
counter_clk_per_cap 32 "Main Counter Tick Period";
};
27Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Multikernel (3)Multikernel (3)
Barrelfish
Kernel acts as a “CPU driver”
Event-driven, single-threaded, non-preemptable
Processing syscalls from user space, interrupts from devices and other cores
User space processes communicate with the CPU driver using a dispatcher object
(local user space thread scheduler)
~10.000 lines of C, ~500 lines of assembler
Common messaging abstraction does not mean common (sub-
optimal) messaging transport
Fast path messaging between cache-coherent cores: Sending messages in
cache lines
Sender writes words sequentially into the cache line (interconnect cache line
invalidate)
Receiver polls on the last word of the cache line (interconnect cache line fetch)
28Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Barrelfish: Interface SpecificationBarrelfish: Interface Specification
Describe types and messages
Used to generate IPC stubs
interface timer "Timer service" {
// set the one (and only) timeout value (in us) for this client
message set_timeout(uint64 timeout);
// add the given increment (in us) to the running timer for this client
message add_to_timeout(uint64 increment);
// cancel the outstanding timeout
message cancel_timeout();
// wakeup response when the timer is triggered
message wakeup();
// request for the remaining time of the currently-running timer
message get_remaining();
// response containing remaining time of running timer
message remaining(uint64 time);
};
29Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
Q&A
30Martin Děcký, Advanced Operating Systems, March 3rd
2017 Novel Architectures
ReferencesReferences
[1] Grm wnr, Xyzzy n, https://commons.wikimedia.org/wiki/File:Windows_2000_architecture.svg
[2] Utente:Sassospicco, https://commons.wikimedia.org/wiki/File:Diagram_of_Mac_OS_X_architecture.svg

More Related Content

What's hot

Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Toursamrat das
 
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...Vietnam Open Infrastructure User Group
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Kubernetes #2 monitoring
Kubernetes #2   monitoring Kubernetes #2   monitoring
Kubernetes #2 monitoring Terry Cho
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMSherif Mousa
 
How Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichHow Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichDevOpsDays Tel Aviv
 
MySQL Operator for Kubernetes
MySQL Operator for KubernetesMySQL Operator for Kubernetes
MySQL Operator for KubernetesKenny Gryp
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage buildAlexei Ledenev
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introductionYi-Hsiu Hsu
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networkingLorenzo Fontana
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMXPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMThe Linux Foundation
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel SourceMotaz Saad
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Evolution of containers to kubernetes
Evolution of containers to kubernetesEvolution of containers to kubernetes
Evolution of containers to kubernetesKrishna-Kumar
 

What's hot (20)

Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
Linux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platformLinux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platform
 
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes #2 monitoring
Kubernetes #2   monitoring Kubernetes #2   monitoring
Kubernetes #2 monitoring
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
 
How Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichHow Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar Leibovich
 
MySQL Operator for Kubernetes
MySQL Operator for KubernetesMySQL Operator for Kubernetes
MySQL Operator for Kubernetes
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage build
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introduction
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networking
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMXPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Evolution of containers to kubernetes
Evolution of containers to kubernetesEvolution of containers to kubernetes
Evolution of containers to kubernetes
 

Viewers also liked

IPC in Microkernel Systems, Capabilities
IPC in Microkernel Systems, CapabilitiesIPC in Microkernel Systems, Capabilities
IPC in Microkernel Systems, CapabilitiesMartin Děcký
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016Brendan Gregg
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Brendan Gregg
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf toolsBrendan Gregg
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 

Viewers also liked (7)

IPC in Microkernel Systems, Capabilities
IPC in Microkernel Systems, CapabilitiesIPC in Microkernel Systems, Capabilities
IPC in Microkernel Systems, Capabilities
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 

Similar to Unikernels, Multikernels, Virtual Machine-based Kernels

Hybrid kernel
Hybrid kernelHybrid kernel
Hybrid kernelAbu Azzam
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probertyang
 
Hardware/Software Co-Design for Efficient Microkernel Execution
Hardware/Software Co-Design for Efficient Microkernel ExecutionHardware/Software Co-Design for Efficient Microkernel Execution
Hardware/Software Co-Design for Efficient Microkernel ExecutionMartin Děcký
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and BeyondDavid Evans
 
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors DiscoDisco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors DiscoMagnus Backman
 
Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Boden Russell
 
Windows Embedded in the Real World
Windows Embedded in the Real WorldWindows Embedded in the Real World
Windows Embedded in the Real Worldukdpe
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko3D
 
PThreads Vs Win32 Threads
PThreads  Vs  Win32 ThreadsPThreads  Vs  Win32 Threads
PThreads Vs Win32 ThreadsRobert Sayegh
 
Pawan industrial training presentation on Hadoop, Clustering and Network virt...
Pawan industrial training presentation on Hadoop, Clustering and Network virt...Pawan industrial training presentation on Hadoop, Clustering and Network virt...
Pawan industrial training presentation on Hadoop, Clustering and Network virt...PAWANNAYAK15
 
Windows Operating system notes taken from somewhere
Windows Operating system notes taken from somewhereWindows Operating system notes taken from somewhere
Windows Operating system notes taken from somewheretoursofecstacy
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 

Similar to Unikernels, Multikernels, Virtual Machine-based Kernels (20)

淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
Hybrid kernel
Hybrid kernelHybrid kernel
Hybrid kernel
 
Oct2009
Oct2009Oct2009
Oct2009
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 
Hardware/Software Co-Design for Efficient Microkernel Execution
Hardware/Software Co-Design for Efficient Microkernel ExecutionHardware/Software Co-Design for Efficient Microkernel Execution
Hardware/Software Co-Design for Efficient Microkernel Execution
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and Beyond
 
Studies
StudiesStudies
Studies
 
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors DiscoDisco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
 
2337610
23376102337610
2337610
 
.ppt
.ppt.ppt
.ppt
 
Memory management in linux
Memory management in linuxMemory management in linux
Memory management in linux
 
Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302
 
Windows Embedded in the Real World
Windows Embedded in the Real WorldWindows Embedded in the Real World
Windows Embedded in the Real World
 
Walking around linux kernel
Walking around linux kernelWalking around linux kernel
Walking around linux kernel
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
 
PThreads Vs Win32 Threads
PThreads  Vs  Win32 ThreadsPThreads  Vs  Win32 Threads
PThreads Vs Win32 Threads
 
Pawan industrial training presentation on Hadoop, Clustering and Network virt...
Pawan industrial training presentation on Hadoop, Clustering and Network virt...Pawan industrial training presentation on Hadoop, Clustering and Network virt...
Pawan industrial training presentation on Hadoop, Clustering and Network virt...
 
Windows Operating system notes taken from somewhere
Windows Operating system notes taken from somewhereWindows Operating system notes taken from somewhere
Windows Operating system notes taken from somewhere
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 

More from Martin Děcký

Lessons Learned from Porting HelenOS to RISC-V
Lessons Learned from Porting HelenOS to RISC-VLessons Learned from Porting HelenOS to RISC-V
Lessons Learned from Porting HelenOS to RISC-VMartin Děcký
 
Microkernels in the Era of Data-Centric Computing
Microkernels in the Era of Data-Centric ComputingMicrokernels in the Era of Data-Centric Computing
Microkernels in the Era of Data-Centric ComputingMartin Děcký
 
Formal Verification of Functional Code
Formal Verification of Functional CodeFormal Verification of Functional Code
Formal Verification of Functional CodeMartin Děcký
 
Code Instrumentation, Dynamic Tracing
Code Instrumentation, Dynamic TracingCode Instrumentation, Dynamic Tracing
Code Instrumentation, Dynamic TracingMartin Děcký
 
Nízkoúrovňové programování
Nízkoúrovňové programováníNízkoúrovňové programování
Nízkoúrovňové programováníMartin Děcký
 
Porting HelenOS to RISC-V
Porting HelenOS to RISC-VPorting HelenOS to RISC-V
Porting HelenOS to RISC-VMartin Děcký
 
What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)
What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)
What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)Martin Děcký
 
FOSDEM 2014: Read-Copy-Update for HelenOS
FOSDEM 2014: Read-Copy-Update for HelenOSFOSDEM 2014: Read-Copy-Update for HelenOS
FOSDEM 2014: Read-Copy-Update for HelenOSMartin Děcký
 
FOSDEM 2013: Operating Systems Hot Topics
FOSDEM 2013: Operating Systems Hot TopicsFOSDEM 2013: Operating Systems Hot Topics
FOSDEM 2013: Operating Systems Hot TopicsMartin Děcký
 
HelenOS: State of the Union 2012
HelenOS: State of the Union 2012HelenOS: State of the Union 2012
HelenOS: State of the Union 2012Martin Děcký
 

More from Martin Děcký (10)

Lessons Learned from Porting HelenOS to RISC-V
Lessons Learned from Porting HelenOS to RISC-VLessons Learned from Porting HelenOS to RISC-V
Lessons Learned from Porting HelenOS to RISC-V
 
Microkernels in the Era of Data-Centric Computing
Microkernels in the Era of Data-Centric ComputingMicrokernels in the Era of Data-Centric Computing
Microkernels in the Era of Data-Centric Computing
 
Formal Verification of Functional Code
Formal Verification of Functional CodeFormal Verification of Functional Code
Formal Verification of Functional Code
 
Code Instrumentation, Dynamic Tracing
Code Instrumentation, Dynamic TracingCode Instrumentation, Dynamic Tracing
Code Instrumentation, Dynamic Tracing
 
Nízkoúrovňové programování
Nízkoúrovňové programováníNízkoúrovňové programování
Nízkoúrovňové programování
 
Porting HelenOS to RISC-V
Porting HelenOS to RISC-VPorting HelenOS to RISC-V
Porting HelenOS to RISC-V
 
What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)
What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)
What Could Microkernels Learn from Monolithic Kernels (and Vice Versa)
 
FOSDEM 2014: Read-Copy-Update for HelenOS
FOSDEM 2014: Read-Copy-Update for HelenOSFOSDEM 2014: Read-Copy-Update for HelenOS
FOSDEM 2014: Read-Copy-Update for HelenOS
 
FOSDEM 2013: Operating Systems Hot Topics
FOSDEM 2013: Operating Systems Hot TopicsFOSDEM 2013: Operating Systems Hot Topics
FOSDEM 2013: Operating Systems Hot Topics
 
HelenOS: State of the Union 2012
HelenOS: State of the Union 2012HelenOS: State of the Union 2012
HelenOS: State of the Union 2012
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Unikernels, Multikernels, Virtual Machine-based Kernels

  • 2. 2Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Recall: Common OS TaxonomyRecall: Common OS Taxonomy Special-purpose operating systems Real-time operating systems Hypervisors (type 1) ... General-purpose operating systems Monolithic kernel Single-server microkernel Multiserver microkernel Hybrid kernel (?)
  • 3. 3Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Monolithic KernelMonolithic Kernel hardware monolithic kernel application application application privileged mode unprivileged mode memory mgmt scheduler IPC device drivers file system drivers user mgmt network stack ...
  • 4. 4Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Single-server MicrokernelSingle-server Microkernel hardware microkernel application application application privileged mode unprivileged mode memory mgmt scheduler IPC system server device drivers file system drivers user mgmt network stack ...
  • 5. 5Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures file system driver server Multiserver MicrokernelMultiserver Microkernel hardware microkernel application application application privileged mode unprivileged mode memory mgmt scheduler IPC naming server location server device driver server device driver server device driver server file system driver server file system driver server device multiplexer file system multiplexer network stack security server ...
  • 6. 6Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures ExamplesExamples Monolithic kernel Linux, Solaris (UTS), Windows, FreeBSD, NetBSD, OpenBSD, OpenVMS, MS-DOS, RISC OS Single-server microkernel CMU Mach, AmigaOS, NeXTSTEP Multiserver microkernel HelenOS, MINIX 3, Genode, GNU/Hurd, Redox, RefOS (seL4)
  • 7. 7Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Hybrid KernelHybrid Kernel No universally accepted definition “Architecture that somewhat resembles a microkernel, but is not a pure microkernel.” Windows NT Internal architecture and communication abstractions inspired by CMU Mach (message passing, ports) Originally user space device drivers Later moved into the kernel, more recently some driver classes in user space again macOS (iOS, etc.) The core xnu component actually contains the CMU Mach 3.0 microkernel Native and ported (BSD) system functionality in user space Gradual erosion towards kernel drivers BeOS (Haiku), Syllable, DragonFly BSD, Plan 9, NetWare, eComStation
  • 8. 8Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Windows NTWindows NT [1]
  • 9. 9Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures macOSmacOS [2]
  • 10. 10Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures file system driver server Multiserver Microkernel (reprise)Multiserver Microkernel (reprise) hardware microkernel application application application privileged mode unprivileged mode memory mgmt scheduler IPC naming server location server device driver server device driver server device driver server file system driver server file system driver server device multiplexer file system multiplexer network stack security server ...
  • 11. 11Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Hypervisor (Type 1)Hypervisor (Type 1) hardware hypervisor hyper-privileged modememory mgmt scheduler comm privileged mode operating system kernel privileged mode unprivileged mode app app app app operating system kernel privileged mode unprivileged mode app app app app operating system kernel privileged mode unprivileged mode app app app app
  • 12. 12Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Common Cloud DeploymentCommon Cloud Deployment hardware hypervisor hyper-privileged modememory mgmt scheduler comm privileged mode operating system kernel privileged mode unprivileged mode app operating system kernel privileged mode unprivileged mode app operating system kernel privileged mode unprivileged mode app
  • 13. 13Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures UnikernelUnikernel hardware hypervisor hyper-privileged modememory mgmt scheduler comm privileged mode unikernel kernel component app component unikernel kernel component app component unikernel kernel component app component
  • 14. 14Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Unikernel (2)Unikernel (2) Library operating system Payload (application) merged with the kernel Kernel component acts as a library providing access to the hardware, threading, file systems, etc. Only necessary functionality Mostly static (single image), but there are dynamic variants Code runs in privileged mode and single address space No mode switches, address space switches Syscalls can be replaced by function calls Isolation/security provided by the underlying hypervisor
  • 15. 15Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Unikernel (3)Unikernel (3) Exokernel MIT since 1994 Goal: End-to-end principle Limiting the number of abstractions (compared to monolithic kernels) Limiting the communication complexity (compared to microkernels) Co-existence with a regular kernel ExOS (MIT) Nemesis (University of Cambridge, University of Glasgow, Swedish Institute of Computer Science, Citrix) Multimedia applications
  • 16. 16Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Unikernel (4)Unikernel (4) Rumprun POSIX compliant, BSD-compatible run-time environment Original concept: NetBSD anykernel Possibility to compile NetBSD drivers and subsystems either as traditional kernel components or as standalone user space libraries (rump kernels) Rump kernels communicate with the host kernel using syscall interface Replacing the syscall interface of rump kernels with a hypercall interface to the hypervisor “Bare metal” execution also possible Drawbridge Win32-compatible run-time environment Originally a Win32 environment running in a Windows picoprocess
  • 17. 17Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Unikernel (5)Unikernel (5) git clone https://github.com/rumpkernel/rumprun.git cd rumprun git submodule init git submodule update (depending on the local C compiler, apply a small patch from https://github.com/rumpkernel/rumprun/issues/86) ./build-rr.sh hw ./build-rr.sh xen export PATH=”$PATH:`pwd`/rumprun/bin” x86_64-rumprun-netbsd-gcc -o module module.c rumprun-bake hw_virtio unikernel.bin module rumprun kvm -i unikernel.bin
  • 18. 18Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Unikernel (6)Unikernel (6) OSv Linux-compatible application environment Not just a run-time, but a complete OS compatibility Goal: Running hosted applications in unmodified run- time environments for Linux E.g. Java EE application running in Tomcat for Linux No notion of users, single address space, processes emulated using threads Similar deployment as in Linux (shell scripting, etc.)
  • 19. 19Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Unikernel (7)Unikernel (7) Managed language run-time in kernel Clive (Go) ClickOS, IncludeOS, HermitCore (C++) HaLVM (Haskell) LING (Erlang) MirageOS (Ocaml) Runtime.js (JavaScript)
  • 20. 20Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Monolithic Kernel (reprise)Monolithic Kernel (reprise) hardware monolithic kernel application application application privileged mode unprivileged mode memory mgmt scheduler IPC device drivers file system drivers user mgmt network stack ...
  • 21. 21Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Virtual Machine-based KernelVirtual Machine-based Kernel hardware virtual machine + run-time environment application application application privileged mode memory mgmt scheduler IPC device drivers file system drivers user mgmt network stack ...
  • 22. 22Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Virtual Machine-based Kernel (2)Virtual Machine-based Kernel (2) Inferno Derived from Plan 9 from Bell Labs “Everything is a file” paradigm All global objects represented as file system paths (global namespace) All operations with objects mapped to common file system operations (walk, stat, create, open, read, write, close, etc.) Local object identification using file descriptors Dis virtual machine and Limbo type-safe language Ada-like syntax, Modula inspired modules, concurrency model based on Communicating Sequential Processes, garbage collector File system operations mapped to Styx communication protocol (compatible with 9P2000) Distributed computing
  • 23. 23Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Virtual Machine-based Kernel (3)Virtual Machine-based Kernel (3) Singularity Microsoft (2003 – 2010) Sing# virtual machine Based on Spec# – Superset of C# with Eiffel-like specification of code contracts (object invariants, preconditions, postconditions, non-nullable types) – Static checker (based on theorem prover) – Run-time checker Extends Spec# with support for communication channels and low-level constructs (structures, inline assembler) Bartok just-in-time compiler (CIL to x86) Research prototype Midori expected to be a commercial variant and future replacement of Windows NT (discontinued in 2015) Several similar approaches (MOSA, Cosmos for C#; JNode, Phantom OS for Java)
  • 24. 24Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures MultikernelMultikernel CPU kernel application privileged mode unprivileged mode serverserver application CPU kernel application serverserver application CPU kernel application serverserver application
  • 25. 25Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Multikernel (2)Multikernel (2) Barrelfish ETH Zürich, Microsoft Research Side note: Mackerel hardware description language Driver synthesis Support for heterogeneous CPU cores Common asynchronous messaging abstraction between cores/nodes Explicit inter-core communication (as opposed to cache coherency) Practically no shared memory and state between cores Managing state replicas using distributed algorithms between cores
  • 26. 26Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Barrelfish: Mackerel LanguageBarrelfish: Mackerel Language Describe devices and control registers Used to generate C accessor functions Also for other low level data structures device HPET lsbfirst ( addr base ) "High-Precision Event Timer" { register gcap_id ro addr(base, 0x0) "General Capabilities and Identification" { rev_id 8 "Revision Identification"; num_tim_cap 5 "Number of Timers"; count_size_cap 1 "Counter Size"; _ 1 mbz; leg_rt_cap 1 "Legacy Replacement Rout Capable"; vendor_id_cap 16 "Vendor ID"; counter_clk_per_cap 32 "Main Counter Tick Period"; };
  • 27. 27Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Multikernel (3)Multikernel (3) Barrelfish Kernel acts as a “CPU driver” Event-driven, single-threaded, non-preemptable Processing syscalls from user space, interrupts from devices and other cores User space processes communicate with the CPU driver using a dispatcher object (local user space thread scheduler) ~10.000 lines of C, ~500 lines of assembler Common messaging abstraction does not mean common (sub- optimal) messaging transport Fast path messaging between cache-coherent cores: Sending messages in cache lines Sender writes words sequentially into the cache line (interconnect cache line invalidate) Receiver polls on the last word of the cache line (interconnect cache line fetch)
  • 28. 28Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Barrelfish: Interface SpecificationBarrelfish: Interface Specification Describe types and messages Used to generate IPC stubs interface timer "Timer service" { // set the one (and only) timeout value (in us) for this client message set_timeout(uint64 timeout); // add the given increment (in us) to the running timer for this client message add_to_timeout(uint64 increment); // cancel the outstanding timeout message cancel_timeout(); // wakeup response when the timer is triggered message wakeup(); // request for the remaining time of the currently-running timer message get_remaining(); // response containing remaining time of running timer message remaining(uint64 time); };
  • 29. 29Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures Q&A
  • 30. 30Martin Děcký, Advanced Operating Systems, March 3rd 2017 Novel Architectures ReferencesReferences [1] Grm wnr, Xyzzy n, https://commons.wikimedia.org/wiki/File:Windows_2000_architecture.svg [2] Utente:Sassospicco, https://commons.wikimedia.org/wiki/File:Diagram_of_Mac_OS_X_architecture.svg