SlideShare a Scribd company logo
1 of 42
Download to read offline
Unikernels?
Thomas Gazagnaire
@samoht [GitHub]
@eriangazag [Twitter]
http://gazagnaire.org/pub/2015.12.loops.pdf
About me...
• PhD at INRIA in Distributed Systems
• Citrix on Xen/Xenserver
• OCamlPro on Opam and OCaml tooling
• University of Cambridge on MirageOS and Irmin
• recently Unikernel Systems
Unikernels
• based on library OS
• contains only what is needed
• single process
• single address space
• runs everywhere
Hardware
Hypervisor
(optional)
Unikernels HaLVM
Rumprun
...
Traditional OS
• Multiple users
• Multiple process
• Multiple purposes
Hardware
Hypervisor
(optional)
OS Kernel
System libraries
Language runtime
Application code
Configuration
Traditional OS
Traditional OS
True, linux is monolithic, and I agree that microkernels are
nicer... As has been noted (not only by me), the linux kernel is
a minuscule part of a complete system: Full sources for linux
currently runs to about 200kB compressed. And all of that
source is portable, except for this tiny kernel that you can
(provably: I did it) re-write totally from scratch in less than a
year without having /any/ prior knowledge.
– Linus Torvalds, 1992
The Kernel
Traditional OS
The Kernel
Currently Linux has over 25 million lines of code...
... and Windows has 50 million.
Traditional OS
OS distributions contain a lot of code!
• Debian 5.0: 65 million lines of code
• OSX 10.4: 85 million lines of code
The System libraries
Traditional OS
The System Libraries
kernel
libc
libz
iconv
openGL
libstd++ libgcc
libgmp libtls
gtk
Application
Traditional OS
The System Libraries
kernel
libc
libz
iconv
openGL
libstd++ libgcc
libgmp libtls
gtk
Application
Traditional OS
(lack?) of Language Runtime
Debian, in 2013
openSSL:
• 500k loc
• used by 2/3 of web servers
• 29 CVE in 2015
Traditional OS
Your code
???
Traditional OS
• current software stack rely 100M+ lines of code
• most of which is written in C
• and a long time ago
• hard to re-use in different contexts
It's a credit to our civilisation that we managed to build
"working" systems, but can we do better?
Summary
Unikernels
What?
Unikernels
• based on library OS
• contains only what is needed
• single process
• single address space
• runs everywhere
Hardware
Hypervisor
(optional)
Unikernels HaLVM
Rumprun
...
Library OS
• Long line of research on library OS (since the 60s')
• Consider kernel modules as normal libraries. Use same
language and tools than user-space libraries.
• Modern compilers/type-systems can do magic:
• whole system optimisation: reduce size and increase speed
• static analysis: remove bugs
the basis
• Extreme specialisation: embedded systems techniques for
general applications
• few things made that easier in the last few years:
• pervasive use of Hypervisors
• upstream efforts to turn OS into libraries
Library OS
the basis
Hypervisors
• Use hardware isolation extensions (when available)
• Something that creates a virtual machine
• Can run on bare-metal (Xen) or hosted (VMware, VBox, KVM)
• Power the modern "Cloud" (EC2)
• Initial industry pull (mid-00s') was to optimise hardware
utilisation
the enablers
The 1st generation of unikernels (10s') MirageOS and HaLVM are built on:
• A minimal OS for Xen: mini-OS
• A stable device driver interface
They have now reached more platforms since then: bare-metal, browsers, ...
Hypervisors
the enablers
OS distributions
Recent efforts by OS distros:
• The rump kernel project turns FreeBSD kernel modules into
libraries. This is has been integrated upstream and is used by the
Rumprun unikernels.
• LKL is trying to turn the Linux kernel into a set of libraries. Very
recent project, not sure where this is going (possible "issues" with
the GPL)
are turning into unikernels
Unikernels
Benefits?
Unikernels
Improved security
• Small attack surface: static linking and dead-code elimination
removes unnecessary services. No shellshock!
• Less exposure to general attack
• High-level languages, with static and runtime analysis
Benefits
Unikernels
Increased speed
• Fast boots (see Jitsu: "Just-In-Time Summoning of Unikernels): can
boot in less than a TCP packet RTT
• More predictable performance (fewer scheduler layers): lower
latencies
Benefits
Unikernels
Efficient resource usage
• Reduced memory footprint, cheap to host on the "Cloud": typical
stateless MirageOS app: ~10/20MB of RAM
• Small disk-footprint: DNS server is MirageOS is ~100KB.
• Reduced need for disk-space
Benefits
Unikernels
Immutable Infrastructure
• Can statically link data in your application
• Small enough to be stored in Git
• Enable a new model for updates and upgrade
• Can be sealed: once built, can enable hardware memory-
protection so it is really immutable
Benefits
Unikernels
Benefits
Small Secure Fast
Pick all three!
Unikernels
• Maybe you really want to use all the stack
• Maybe you don't want to rewrite all the libraries in your
favorite language
• Maybe you don't know which tool to use to manage the
build, ship and run your 100s of unikernels
At a cost
Unikernels
• Maybe you really want to use all the stack
• fair enough
• you might still want to use similar techniques on
desktop, e.g. QubeS+MirageOS
At a cost
Unikernels
• Maybe you don't want to rewrite all the libraries in your
favorite language
• why not, it's fun!
• upstream OS distribution efforts help, i.e. rump kernels
At a cost
Unikernels
• Maybe you don't know which tool to use to manage the
build, ship and run your 100s of unikernels
• the tooling is indeed lacking
• there is hope...
At a cost
Unikernels
and tooling
Unikernels are at the stage that Linux containers were
three years ago before Docker
• Few users
• Hard to build
• Hard to ship
• Hard to run
Clearly this needs to be fixed for widespread use...
Unikernels
and tooling
Unikernels
Panorama
Panorama
Project Language Hypervisor
ClickOS C/C++ Xen
Clive Go bare-metal
Drawbridge .NET Microsoft picoprocess
HaLVM Haskell Xen
IncludeOS C++ Xen
LING Erlang Xen
MirageOS OCaml Xen/Unix
OSv Java Xen
Rumprun POSIX C bare-metal, Xen, KVM
Runtime.js Javascript KVM
http://unikernel.org/projects/
MirageOS
• Use OCaml
• Project started in 2007 with
Anil Madhavapeddy's PhD
• memory and type-safe
network and storage stack
from device drivers to TLS
• ~100 OCaml libraries
• compile to Unix process, Xen
VM, in-browser JavaScript
https://mirage.io
Rumprun
• use rump kernels, the
FreeBSD library OS
• Project started in 2012 with
Antti Kantee's PhD
• compile POSIX applications:
useful to port legacy code
• limitations:
• no forks
• build system scripts should
support cross-compilation
http://rumpkernel.org
opam-rumprun
https://github.com/mato/opam-rumprun
Experiment to use MirageOS and rumprun
• opam repository with patched packages
• can run the modified packages (41) an any rump
kernel support platform, including:
• bare metal (including ARM boards)
• KVM
• including the pure-OCaml TLS stack
in the process of being upstreamed.
see: https://github.com/mirage/mirage/issues/479
MirageOS + TLS + Bitcoins
https://owme.ipredator.se
MirageOS/rumpkernels + DNS
http://www.skjegstad.com/blog/categories/jitsu/
http://www.skjegstad.com/blog/categories/jitsu/
MirageOS/Git+browser
http://roscidus.com/blog/blog/2015/04/28/cuekeeper-gitting-things-done-in-the-browser/
Merci pour votre attention!
Credits
Dan Nanni, Interesting facts about Debian Linux
http://xmodulo.com/interesting-facts-about-debian-linux.html
Justin Cormack, The Road to Unikernels
http://roadtounikernels.myriabit.com/
Garrett Smith, Rainbows and Unikernels
https://www.youtube.com/watch?v=cUvNths_5RA
Adam Wick, Unikernels: Who, What, Where, When, Why
https://www.youtube.com/watch?v=oHcHTFleNtg
https://mirage.io/ http://unikernel.org

More Related Content

What's hot

OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
Russell Pavlicek
 
CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)
CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)
CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)
The Linux Foundation
 
ICALEPCS 2011: Testing Environments using Virtualization
ICALEPCS 2011: Testing Environments using VirtualizationICALEPCS 2011: Testing Environments using Virtualization
ICALEPCS 2011: Testing Environments using Virtualization
Omer Khalid
 
Xen versus kvm_20080623
Xen versus kvm_20080623Xen versus kvm_20080623
Xen versus kvm_20080623
Todd Deshane
 

What's hot (20)

Unik: Unikernel Backend to Cloud Foundry
Unik: Unikernel Backend to Cloud FoundryUnik: Unikernel Backend to Cloud Foundry
Unik: Unikernel Backend to Cloud Foundry
 
2017 jan-19 meetup-unikernels
2017 jan-19 meetup-unikernels2017 jan-19 meetup-unikernels
2017 jan-19 meetup-unikernels
 
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
 
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
 
UniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with EaseUniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with Ease
 
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
 
Metrics towards enterprise readiness of unikernels
Metrics towards enterprise readiness of unikernelsMetrics towards enterprise readiness of unikernels
Metrics towards enterprise readiness of unikernels
 
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
 
CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)
CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)
CIF16: Solo5: Building a Unikernel Base From Scratch (Dan Williams, IBM)
 
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
 
4 virtual router CloudStack Developer Day
4 virtual router CloudStack Developer Day4 virtual router CloudStack Developer Day
4 virtual router CloudStack Developer Day
 
XPDS16: Xen Project Weather Report 2016
XPDS16: Xen Project Weather Report 2016XPDS16: Xen Project Weather Report 2016
XPDS16: Xen Project Weather Report 2016
 
Herding your cattle from dev to ops
Herding your cattle from dev to opsHerding your cattle from dev to ops
Herding your cattle from dev to ops
 
open source virtualization
open source virtualizationopen source virtualization
open source virtualization
 
ICALEPCS 2011: Testing Environments using Virtualization
ICALEPCS 2011: Testing Environments using VirtualizationICALEPCS 2011: Testing Environments using Virtualization
ICALEPCS 2011: Testing Environments using Virtualization
 
Docker Introduction at GDG DevFest 2015 Lagos
Docker Introduction at GDG DevFest 2015 Lagos Docker Introduction at GDG DevFest 2015 Lagos
Docker Introduction at GDG DevFest 2015 Lagos
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
 
Xen versus kvm_20080623
Xen versus kvm_20080623Xen versus kvm_20080623
Xen versus kvm_20080623
 
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
 

Viewers also liked

Mirage: extreme specialisation of virtual appliances
Mirage: extreme specialisation of virtual appliancesMirage: extreme specialisation of virtual appliances
Mirage: extreme specialisation of virtual appliances
The Linux Foundation
 

Viewers also liked (7)

UniK - a unikernel compiler and runtime
UniK - a unikernel compiler and runtimeUniK - a unikernel compiler and runtime
UniK - a unikernel compiler and runtime
 
Containers technologies
Containers technologiesContainers technologies
Containers technologies
 
Mirage: extreme specialisation of virtual appliances
Mirage: extreme specialisation of virtual appliancesMirage: extreme specialisation of virtual appliances
Mirage: extreme specialisation of virtual appliances
 
Containers Through the Ages - SysEleven
Containers Through the Ages - SysElevenContainers Through the Ages - SysEleven
Containers Through the Ages - SysEleven
 
2017 feb-10 snowcamp.io-unikernels
2017 feb-10 snowcamp.io-unikernels2017 feb-10 snowcamp.io-unikernels
2017 feb-10 snowcamp.io-unikernels
 
OSCON: Unikernels and Docker: From revolution to evolution
OSCON: Unikernels and Docker: From revolution to evolutionOSCON: Unikernels and Docker: From revolution to evolution
OSCON: Unikernels and Docker: From revolution to evolution
 
Unik Slides
Unik SlidesUnik Slides
Unik Slides
 

Similar to Présentation d'Unikernel

Linux [2005]
Linux [2005]Linux [2005]
Linux [2005]
Raul Soto
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
IxtiyorTeshaboyev
 

Similar to Présentation d'Unikernel (20)

CPOSC2014: Next Generation Cloud -- Rise of the Unikernel
CPOSC2014: Next Generation Cloud -- Rise of the UnikernelCPOSC2014: Next Generation Cloud -- Rise of the Unikernel
CPOSC2014: Next Generation Cloud -- Rise of the Unikernel
 
SCALE13x: Next Generation of the Cloud - Rise of the Unikernel
SCALE13x: Next Generation of the Cloud - Rise of the UnikernelSCALE13x: Next Generation of the Cloud - Rise of the Unikernel
SCALE13x: Next Generation of the Cloud - Rise of the Unikernel
 
Unikernel User Summit 2015: The Next Generation Cloud: Unleashing the Power o...
Unikernel User Summit 2015: The Next Generation Cloud: Unleashing the Power o...Unikernel User Summit 2015: The Next Generation Cloud: Unleashing the Power o...
Unikernel User Summit 2015: The Next Generation Cloud: Unleashing the Power o...
 
The Next Generation Cloud: Unleashing the Power of the Unikernal
The Next Generation Cloud: Unleashing the Power of the UnikernalThe Next Generation Cloud: Unleashing the Power of the Unikernal
The Next Generation Cloud: Unleashing the Power of the Unikernal
 
Windows V/S Linux OS - Comparison
Windows V/S Linux OS - ComparisonWindows V/S Linux OS - Comparison
Windows V/S Linux OS - Comparison
 
Unikernelized Linux
Unikernelized LinuxUnikernelized Linux
Unikernelized Linux
 
Unikernels and docker from revolution to evolution — unikernels and docker ...
Unikernels and docker  from revolution to evolution — unikernels and docker  ...Unikernels and docker  from revolution to evolution — unikernels and docker  ...
Unikernels and docker from revolution to evolution — unikernels and docker ...
 
Docker Online Meetup #31: Unikernels
Docker Online Meetup #31: UnikernelsDocker Online Meetup #31: Unikernels
Docker Online Meetup #31: Unikernels
 
Linux [2005]
Linux [2005]Linux [2005]
Linux [2005]
 
Cigna Innovation Summit
Cigna Innovation SummitCigna Innovation Summit
Cigna Innovation Summit
 
Linux, Unikernel, LinuxKit: towards redefining the cloud stack.
Linux, Unikernel, LinuxKit: towards redefining the cloud stack.Linux, Unikernel, LinuxKit: towards redefining the cloud stack.
Linux, Unikernel, LinuxKit: towards redefining the cloud stack.
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
Unix operating system
Unix operating systemUnix operating system
Unix operating system
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
 
Linux
LinuxLinux
Linux
 
Linux basics
Linux basicsLinux basics
Linux basics
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land
 
Containers - Cloud Phoenix March Meetup
Containers - Cloud Phoenix March MeetupContainers - Cloud Phoenix March Meetup
Containers - Cloud Phoenix March Meetup
 

More from Proto204

More from Proto204 (19)

Howtovive 171117152022
Howtovive 171117152022Howtovive 171117152022
Howtovive 171117152022
 
Learning Center Paris-Saclay
Learning Center Paris-SaclayLearning Center Paris-Saclay
Learning Center Paris-Saclay
 
L'Ecole - Marie Gervais
L'Ecole - Marie GervaisL'Ecole - Marie Gervais
L'Ecole - Marie Gervais
 
RAMP Data Challenge
RAMP Data Challenge RAMP Data Challenge
RAMP Data Challenge
 
2017 software carpentry open campus
2017 software carpentry open campus2017 software carpentry open campus
2017 software carpentry open campus
 
Protobus Restitution Workshops Préfiguration
Protobus Restitution Workshops PréfigurationProtobus Restitution Workshops Préfiguration
Protobus Restitution Workshops Préfiguration
 
Hackathon nokia 2016 Urban Moves présentation
Hackathon nokia 2016 Urban Moves présentationHackathon nokia 2016 Urban Moves présentation
Hackathon nokia 2016 Urban Moves présentation
 
Benchmark Protobus #1
Benchmark Protobus #1Benchmark Protobus #1
Benchmark Protobus #1
 
Présentation Abélia : Formation en Apiculture
Présentation Abélia : Formation en ApiculturePrésentation Abélia : Formation en Apiculture
Présentation Abélia : Formation en Apiculture
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de Docker
 
Conférence sur l'Innovation Frugale février 2016
Conférence sur l'Innovation Frugale février 2016Conférence sur l'Innovation Frugale février 2016
Conférence sur l'Innovation Frugale février 2016
 
Présentation Oui Hop
Présentation Oui HopPrésentation Oui Hop
Présentation Oui Hop
 
Pitch Tandami
Pitch TandamiPitch Tandami
Pitch Tandami
 
Pitch piasso
Pitch piassoPitch piasso
Pitch piasso
 
Pitch match'em
Pitch match'emPitch match'em
Pitch match'em
 
Pitch glaneur
Pitch glaneurPitch glaneur
Pitch glaneur
 
Pitch fab bike
Pitch fab bikePitch fab bike
Pitch fab bike
 
Pitch cycl'up
Pitch cycl'upPitch cycl'up
Pitch cycl'up
 
Pitch amara
Pitch amaraPitch amara
Pitch amara
 

Recently uploaded

Recently uploaded (20)

Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...
Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...
Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 

Présentation d'Unikernel

  • 1. Unikernels? Thomas Gazagnaire @samoht [GitHub] @eriangazag [Twitter] http://gazagnaire.org/pub/2015.12.loops.pdf
  • 2. About me... • PhD at INRIA in Distributed Systems • Citrix on Xen/Xenserver • OCamlPro on Opam and OCaml tooling • University of Cambridge on MirageOS and Irmin • recently Unikernel Systems
  • 3. Unikernels • based on library OS • contains only what is needed • single process • single address space • runs everywhere Hardware Hypervisor (optional) Unikernels HaLVM Rumprun ...
  • 4. Traditional OS • Multiple users • Multiple process • Multiple purposes Hardware Hypervisor (optional) OS Kernel System libraries Language runtime Application code Configuration
  • 6. Traditional OS True, linux is monolithic, and I agree that microkernels are nicer... As has been noted (not only by me), the linux kernel is a minuscule part of a complete system: Full sources for linux currently runs to about 200kB compressed. And all of that source is portable, except for this tiny kernel that you can (provably: I did it) re-write totally from scratch in less than a year without having /any/ prior knowledge. – Linus Torvalds, 1992 The Kernel
  • 7. Traditional OS The Kernel Currently Linux has over 25 million lines of code... ... and Windows has 50 million.
  • 8. Traditional OS OS distributions contain a lot of code! • Debian 5.0: 65 million lines of code • OSX 10.4: 85 million lines of code The System libraries
  • 9. Traditional OS The System Libraries kernel libc libz iconv openGL libstd++ libgcc libgmp libtls gtk Application
  • 10. Traditional OS The System Libraries kernel libc libz iconv openGL libstd++ libgcc libgmp libtls gtk Application
  • 11. Traditional OS (lack?) of Language Runtime Debian, in 2013 openSSL: • 500k loc • used by 2/3 of web servers • 29 CVE in 2015
  • 13. Traditional OS • current software stack rely 100M+ lines of code • most of which is written in C • and a long time ago • hard to re-use in different contexts It's a credit to our civilisation that we managed to build "working" systems, but can we do better? Summary
  • 15. Unikernels • based on library OS • contains only what is needed • single process • single address space • runs everywhere Hardware Hypervisor (optional) Unikernels HaLVM Rumprun ...
  • 16. Library OS • Long line of research on library OS (since the 60s') • Consider kernel modules as normal libraries. Use same language and tools than user-space libraries. • Modern compilers/type-systems can do magic: • whole system optimisation: reduce size and increase speed • static analysis: remove bugs the basis
  • 17. • Extreme specialisation: embedded systems techniques for general applications • few things made that easier in the last few years: • pervasive use of Hypervisors • upstream efforts to turn OS into libraries Library OS the basis
  • 18. Hypervisors • Use hardware isolation extensions (when available) • Something that creates a virtual machine • Can run on bare-metal (Xen) or hosted (VMware, VBox, KVM) • Power the modern "Cloud" (EC2) • Initial industry pull (mid-00s') was to optimise hardware utilisation the enablers
  • 19. The 1st generation of unikernels (10s') MirageOS and HaLVM are built on: • A minimal OS for Xen: mini-OS • A stable device driver interface They have now reached more platforms since then: bare-metal, browsers, ... Hypervisors the enablers
  • 20. OS distributions Recent efforts by OS distros: • The rump kernel project turns FreeBSD kernel modules into libraries. This is has been integrated upstream and is used by the Rumprun unikernels. • LKL is trying to turn the Linux kernel into a set of libraries. Very recent project, not sure where this is going (possible "issues" with the GPL) are turning into unikernels
  • 22. Unikernels Improved security • Small attack surface: static linking and dead-code elimination removes unnecessary services. No shellshock! • Less exposure to general attack • High-level languages, with static and runtime analysis Benefits
  • 23. Unikernels Increased speed • Fast boots (see Jitsu: "Just-In-Time Summoning of Unikernels): can boot in less than a TCP packet RTT • More predictable performance (fewer scheduler layers): lower latencies Benefits
  • 24. Unikernels Efficient resource usage • Reduced memory footprint, cheap to host on the "Cloud": typical stateless MirageOS app: ~10/20MB of RAM • Small disk-footprint: DNS server is MirageOS is ~100KB. • Reduced need for disk-space Benefits
  • 25. Unikernels Immutable Infrastructure • Can statically link data in your application • Small enough to be stored in Git • Enable a new model for updates and upgrade • Can be sealed: once built, can enable hardware memory- protection so it is really immutable Benefits
  • 27. Unikernels • Maybe you really want to use all the stack • Maybe you don't want to rewrite all the libraries in your favorite language • Maybe you don't know which tool to use to manage the build, ship and run your 100s of unikernels At a cost
  • 28. Unikernels • Maybe you really want to use all the stack • fair enough • you might still want to use similar techniques on desktop, e.g. QubeS+MirageOS At a cost
  • 29. Unikernels • Maybe you don't want to rewrite all the libraries in your favorite language • why not, it's fun! • upstream OS distribution efforts help, i.e. rump kernels At a cost
  • 30. Unikernels • Maybe you don't know which tool to use to manage the build, ship and run your 100s of unikernels • the tooling is indeed lacking • there is hope... At a cost
  • 31. Unikernels and tooling Unikernels are at the stage that Linux containers were three years ago before Docker • Few users • Hard to build • Hard to ship • Hard to run Clearly this needs to be fixed for widespread use...
  • 34. Panorama Project Language Hypervisor ClickOS C/C++ Xen Clive Go bare-metal Drawbridge .NET Microsoft picoprocess HaLVM Haskell Xen IncludeOS C++ Xen LING Erlang Xen MirageOS OCaml Xen/Unix OSv Java Xen Rumprun POSIX C bare-metal, Xen, KVM Runtime.js Javascript KVM http://unikernel.org/projects/
  • 35. MirageOS • Use OCaml • Project started in 2007 with Anil Madhavapeddy's PhD • memory and type-safe network and storage stack from device drivers to TLS • ~100 OCaml libraries • compile to Unix process, Xen VM, in-browser JavaScript https://mirage.io
  • 36. Rumprun • use rump kernels, the FreeBSD library OS • Project started in 2012 with Antti Kantee's PhD • compile POSIX applications: useful to port legacy code • limitations: • no forks • build system scripts should support cross-compilation http://rumpkernel.org
  • 37. opam-rumprun https://github.com/mato/opam-rumprun Experiment to use MirageOS and rumprun • opam repository with patched packages • can run the modified packages (41) an any rump kernel support platform, including: • bare metal (including ARM boards) • KVM • including the pure-OCaml TLS stack in the process of being upstreamed. see: https://github.com/mirage/mirage/issues/479
  • 38. MirageOS + TLS + Bitcoins https://owme.ipredator.se
  • 41. Merci pour votre attention!
  • 42. Credits Dan Nanni, Interesting facts about Debian Linux http://xmodulo.com/interesting-facts-about-debian-linux.html Justin Cormack, The Road to Unikernels http://roadtounikernels.myriabit.com/ Garrett Smith, Rainbows and Unikernels https://www.youtube.com/watch?v=cUvNths_5RA Adam Wick, Unikernels: Who, What, Where, When, Why https://www.youtube.com/watch?v=oHcHTFleNtg https://mirage.io/ http://unikernel.org