The HaLVM: A Simple Platform for Simple Platforms

The Linux Foundation
The Linux FoundationDirector, Open Source Solutions at Citrix
The HaLVM
A Simple Platform for Simple Platforms
       Adam Wick | XenSummit | August 27th, 2012
The What?

A port of the                            that runs
   Haskell                             directly atop
programming                               the Xen
  language                              hypervisor
                HaLVM
           Haskell  Virtual Machine
              Lightweight
                 designed to run in
                minimal environments
                                          © 2012 Galois, Inc. All rights reserved.
Wait, what?

 top         httpd


             haskell
             program

nethack
                                 haskell
                                 program
          Linux
                                   HaLVM

                       Xen

                                © 2012 Galois, Inc. All rights reserved.
Why would you do such a thing?
Strangely enough, we did this because we were doing design
work in microkernel-based operating systems.

                        Typical component communication
                        graphs for microkernel-based OSes
                        look something like this.

                      It is very easy to create designs
                      that look good on a white
                      board, but include issues that
                      make the system impossible to
                      boot.
 We designed the HaLVM as a quick way to show feasibility.
                                               © 2012 Galois, Inc. All rights reserved.
Simple Testing Apparatus




                             Xen




main = do
   block <- openBlockDeviceChannel
   dev <- openOutputChannel
   crypto <- openCryptoDeviceChannel
   print “Encrypted Disk Booted!”

                                       © 2012 Galois, Inc. All rights reserved.
Interlude


You may be wondering why I’m talking about a tool for doing
  explorations of component breakdowns for microkernel-
    based operating systems during a workshop about
     developing cloud-based services based on Xen.




        OS Dev.            Net Serv.            Cloud
         Tool                Tool               Tool?


                                                © 2012 Galois, Inc. All rights reserved.
How does this happen?
 main = do                                  Nifty, but only
    block <- openBlockDeviceChannel
    dev <- openOutputChannel                checks that boot
    crypto <- openCryptoDeviceChannel       works in our
    print “Encrypted Disk Booted!”          imagined world.
Fails if we forgot any prerequisites in our design, and low-
level details of drivers and OS components are really
easy to forget.
                     main = do
So we let each          block <- openBlockDeviceChannel
component get           dev <- openOutputChannel
more and more           crypto <- openCryptoDevice
                        startServiceLoop reqchan crypto block
detailed …
                                                   © 2012 Galois, Inc. All rights reserved.
Focus on Small (and Fast)
                  We are not kidding on the size of the
                  graphs we wanted to test with. One of
                  our early projects involved 15+ domains.
                  Space usage and load speed quickly
                  became critical constraints.
   15 domains * 10 second boot time = 2½ minutes to start
   15 domains * 64MB footprint          = 960MB basic req.
Focus on quick and fast:
   → The HaLVM boots in milliseconds
   → The HaLVM uses as little as 4MB
We are typically limited by Xen, not by design.
                                               © 2012 Galois, Inc. All rights reserved.
Abstraction Makes The Heart Grow Fonder
We designed the HaLVM to easily support this expansion by
starting with the smallest core implementation possible and
then providing the facilities for more complex behavior to be
implemented as (layered) libraries.
                              Program Code

    Rendezvous Library     Disk Driver     NIC Driver      TCP/IP

       XenBus Library        Communications Library     PCI Library

                           HaLVM Core Library

                         GC, Threading Layer, Etc.

                            Low-level Xen Integration
                                                           © 2012 Galois, Inc. All rights reserved.
Abstraction Makes The Heart Grow Fonder
The nice thing about this methodology is that programs use
only the libraries they need, and thus only pay the space and
initialization cost of the libraries they need.

                              Program Code

    Rendezvous Library     Disk Driver     NIC Driver      TCP/IP

       XenBus Library        Communications Library     PCI Library

                           HaLVM Core Library

                         GC, Threading Layer, Etc.

                            Low-level Xen Integration
                                                           © 2012 Galois, Inc. All rights reserved.
Abstraction Makes The Heart Grow Fonder
The nice thing about this methodology is that programs use
only the libraries they need, and thus only pay the space and
initialization cost of the libraries they need.

                              Program Code

    Rendezvous Library     Disk Driver     NIC Driver      TCP/IP

       XenBus Library        Communications Library     PCI Library

                           HaLVM Core Library

                         GC, Threading Layer, Etc.

                            Low-level Xen Integration
                                                           © 2012 Galois, Inc. All rights reserved.
Abstraction Makes The Heart Grow Fonder
The nice thing about this methodology is that programs use
only the libraries they need, and thus only pay the space and
initialization cost of the libraries they need.

                              Program Code

    Rendezvous Library     Disk Driver     NIC Driver      TCP/IP

       XenBus Library        Communications Library     PCI Library

                           HaLVM Core Library

                         GC, Threading Layer, Etc.

                            Low-level Xen Integration
                                                           © 2012 Galois, Inc. All rights reserved.
Wait, What Did We Just Do?
At some point it occurred to us that we had developed
something that was actually useful on its own, rather than a
tool for OS design work.

           If you can speak Ethernet to a network
            and write blocks to a disk, then some
          interesting possibilities emerge for small
                  software network devices:

     HaLVM random number generators, HaLVM traffic
monitors, HaLVM alert systems, HaLVM chat servers, HaLVM
 time servers, HaLVM encryption servers, HaLVM storage
                        servers …
                                                   © 2012 Galois, Inc. All rights reserved.
If only we had …
 If you can speak Ethernet to a network
  and write blocks to a disk, then some
interesting possibilities emerge for small
       software network devices …

              but blocks on a disk quickly becomes a
              burdensome interface; you really want a file
              system

              and Ethernet is a bit low level for most network
              programs; you really want a whole TCP/IP
              stack
                                                  © 2012 Galois, Inc. All rights reserved.
We Really Like Haskell
but blocks on a disk quickly becomes a
burdensome interface; you really want a file
system

                                Halfs: The Haskell File System

and Ethernet is a bit low level for most network
programs; you really want a whole TCP/IP
stack

                           HaNS: The Haskell Network Stack


                                                   © 2012 Galois, Inc. All rights reserved.
Wait, what have we built?!
Now armed with a file system and a network stack, we had
an interesting little platform for writing lightweight, single-
purpose cloud services.

     … which works on Xen

     … which explains why I’m talking to you right now



         OS Dev.              Net Serv.              Cloud
          Tool                  Tool                 Tool!


                                                     © 2012 Galois, Inc. All rights reserved.
… mostly

 Cloud       This picture made a great little slide addition.
 Tool!

                                                           Cloud
But this picture is probably a bit more honest.            Tool?


The HaLVM is a work in progress. There are some rough
edges – particularly around network stack and file system
integration – but the basis is there. It will get better with
time, particularly if interested parties contribute.
                                                   © 2012 Galois, Inc. All rights reserved.
So, A Cloud Service Framework

                       Remember this picture?
 top         httpd
                       This picture also highlights
                       when and why you would
             haskell   choose to use a HaLVM, rather
             program   than a more traditional, Linux-
nethack                based approach.
                                                  haskell
                            big     small         program
          Linux
                                                    HaLVM

                            Xen

                                                 © 2012 Galois, Inc. All rights reserved.
Why and Why Not
The HaLVM offers a very lightweight platform for writing simple
cloud services, at the cost of more limited functionality and
less access to the very highest-speed utilities.

 top         httpd     Does your service need a high-speed
                       database server hooked up to fast
                       business logic with a low-latency web
             haskell
             program   server?

nethack
                                                        haskell
                       Does it need it right now?       program

          Linux                                            HaLVM
                                                    © 2012 Galois, Inc. All rights reserved.
Why and Why Not
                    Good for small, single-purpose
          haskell
                    cloud services with limited
          program   dependencies.
           HaLVM                 Saves money on cloud
                               service costs via lowered
                             memory and disk footprint.
 top      httpd
                    Good for more complicated
                    systems with many system
          haskell
          program   dependencies.
nethack                    Larger selection of tools and
                             frameworks for developing
       Linux                           your application.
                                             © 2012 Galois, Inc. All rights reserved.
That’s it …
So that is the HaLVM.
        A nifty platform for developing simple cloud services.
        A nifty platform for creating critical, isolated services.

Oh, and it’s free, and available on GitHub:

 Base HaLVM        https://github.com/GaloisInc/HaLVM

Network Stack      https://github.com/GaloisInc/HaNS

   File System     https://github.com/GaloisInc/Halfs

                                                      © 2012 Galois, Inc. All rights reserved.
… I’m done.

 Questions, comments, or suggestions:
         now or at awick@galois.com

 Also see the HaLVM mailing list at
   http://community.galois.com/mailman/listinfo/halvm-devel

 Base HaLVM      https://github.com/GaloisInc/HaLVM

Network Stack    https://github.com/GaloisInc/HaNS

  File System    https://github.com/GaloisInc/Halfs

                                                © 2012 Galois, Inc. All rights reserved.
1 of 22

Recommended

Erlang On Xen: Redefining the Cloud Software Stack by
Erlang On Xen: Redefining the Cloud Software StackErlang On Xen: Redefining the Cloud Software Stack
Erlang On Xen: Redefining the Cloud Software StackViktor Sovietov
2.1K views17 slides
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S... by
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...rhatr
2.4K views40 slides
OSCON14: Mirage 2.0 by
OSCON14: Mirage 2.0 OSCON14: Mirage 2.0
OSCON14: Mirage 2.0 The Linux Foundation
44.5K views29 slides
Advanced Docker Developer Workflows on MacOS X and Windows by
Advanced Docker Developer Workflows on MacOS X and WindowsAdvanced Docker Developer Workflows on MacOS X and Windows
Advanced Docker Developer Workflows on MacOS X and WindowsAnil Madhavapeddy
70.3K views23 slides
Unikernels: Rise of the Library Hypervisor by
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorAnil Madhavapeddy
10.5K views42 slides
Aplura virtualization slides by
Aplura virtualization slidesAplura virtualization slides
Aplura virtualization slidesThe Linux Foundation
9.6K views44 slides

More Related Content

What's hot

Xen time machine by
Xen time machineXen time machine
Xen time machineThe Linux Foundation
11.1K views15 slides
Mirage - Extreme specialization of cloud appliances (OSCON 2013) by
Mirage - Extreme specialization of cloud appliances (OSCON 2013)Mirage - Extreme specialization of cloud appliances (OSCON 2013)
Mirage - Extreme specialization of cloud appliances (OSCON 2013)Amir Chaudhry
1.6K views36 slides
Docker Orchestration at Production Scale by
Docker Orchestration at Production Scale Docker Orchestration at Production Scale
Docker Orchestration at Production Scale Docker, Inc.
5.2K views21 slides
Scaling Xen within Rackspace Cloud Servers by
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersThe Linux Foundation
13.3K views29 slides
NkSIP: The Erlang SIP application server by
NkSIP: The Erlang SIP application serverNkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application serverCarlos González Florido
6K views34 slides
Windsor: Domain 0 Disaggregation for XenServer and XCP by
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCPThe Linux Foundation
6.4K views23 slides

What's hot(20)

Mirage - Extreme specialization of cloud appliances (OSCON 2013) by Amir Chaudhry
Mirage - Extreme specialization of cloud appliances (OSCON 2013)Mirage - Extreme specialization of cloud appliances (OSCON 2013)
Mirage - Extreme specialization of cloud appliances (OSCON 2013)
Amir Chaudhry1.6K views
Docker Orchestration at Production Scale by Docker, Inc.
Docker Orchestration at Production Scale Docker Orchestration at Production Scale
Docker Orchestration at Production Scale
Docker, Inc.5.2K views
Windsor: Domain 0 Disaggregation for XenServer and XCP by The Linux Foundation
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe) by The Linux Foundation
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)
From Monolith to Docker Distributed Applications by Carlos Sanchez
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed Applications
Carlos Sanchez1K views
OWF: Xen - Open Source Hypervisor Designed for Clouds by The Linux Foundation
OWF: Xen - Open Source Hypervisor Designed for CloudsOWF: Xen - Open Source Hypervisor Designed for Clouds
OWF: Xen - Open Source Hypervisor Designed for Clouds
The Linux Foundation67.8K views
Using functional programming within an industrial product group: perspectives... by Anil Madhavapeddy
Using functional programming within an industrial product group: perspectives...Using functional programming within an industrial product group: perspectives...
Using functional programming within an industrial product group: perspectives...
Anil Madhavapeddy1.3K views
KVM and docker LXC Benchmarking with OpenStack by Boden Russell
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
Boden Russell131.9K views
Unikernels: the rise of the library hypervisor in MirageOS by Docker, Inc.
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
Docker, Inc.2.3K views
Erlang on Xen: Redefining the cloud software stack by Viktor Sovietov
Erlang on Xen:  Redefining the cloud software stackErlang on Xen:  Redefining the cloud software stack
Erlang on Xen: Redefining the cloud software stack
Viktor Sovietov1.9K views
Introduction to Docker storage, volume and image by ejlp12
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and image
ejlp121.5K views
HVX: Virtualizing the Cloud by Alex Fishman
HVX: Virtualizing the CloudHVX: Virtualizing the Cloud
HVX: Virtualizing the Cloud
Alex Fishman2.2K views
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University) by The Linux Foundation
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
LCEU13: Securing your cloud with Xen's advanced security features - George Du... by The Linux Foundation
LCEU13: Securing your cloud with Xen's advanced security features - George Du...LCEU13: Securing your cloud with Xen's advanced security features - George Du...
LCEU13: Securing your cloud with Xen's advanced security features - George Du...
The Linux Foundation195.3K views
Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc... by Docker, Inc.
Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc...Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc...
Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc...
Docker, Inc.252 views

Similar to The HaLVM: A Simple Platform for Simple Platforms

Turbocharging php applications with zend server (workshop) by
Turbocharging php applications with zend server (workshop)Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)Eric Ritchie
1K views66 slides
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an... by
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...Andrey Korolyov
617 views21 slides
Enhancing scalability with intelligent caching by
Enhancing scalability with intelligent cachingEnhancing scalability with intelligent caching
Enhancing scalability with intelligent cachingEric Ritchie
463 views20 slides
Turbocharging php applications with zend server by
Turbocharging php applications with zend serverTurbocharging php applications with zend server
Turbocharging php applications with zend serverEric Ritchie
1.2K views43 slides
I Just Want to Run My Code: Waypoint, Nomad, and Other Things by
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsMichael Lange
35 views57 slides
Build Your Private Cloud with Ezilla and Haduzilla by
Build Your Private Cloud with Ezilla and HaduzillaBuild Your Private Cloud with Ezilla and Haduzilla
Build Your Private Cloud with Ezilla and HaduzillaJazz Yao-Tsung Wang
1.7K views32 slides

Similar to The HaLVM: A Simple Platform for Simple Platforms(20)

Turbocharging php applications with zend server (workshop) by Eric Ritchie
Turbocharging php applications with zend server (workshop)Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)
Eric Ritchie1K views
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an... by Andrey Korolyov
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
Andrey Korolyov617 views
Enhancing scalability with intelligent caching by Eric Ritchie
Enhancing scalability with intelligent cachingEnhancing scalability with intelligent caching
Enhancing scalability with intelligent caching
Eric Ritchie463 views
Turbocharging php applications with zend server by Eric Ritchie
Turbocharging php applications with zend serverTurbocharging php applications with zend server
Turbocharging php applications with zend server
Eric Ritchie1.2K views
I Just Want to Run My Code: Waypoint, Nomad, and Other Things by Michael Lange
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Michael Lange35 views
Build Your Private Cloud with Ezilla and Haduzilla by Jazz Yao-Tsung Wang
Build Your Private Cloud with Ezilla and HaduzillaBuild Your Private Cloud with Ezilla and Haduzilla
Build Your Private Cloud with Ezilla and Haduzilla
Jazz Yao-Tsung Wang1.7K views
PHP Apps on the Move - Migrating from In-House to Cloud by RightScale
PHP Apps on the Move - Migrating from In-House to Cloud  PHP Apps on the Move - Migrating from In-House to Cloud
PHP Apps on the Move - Migrating from In-House to Cloud
RightScale639 views
Dutch php conference_2010_opm by isnull
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
isnull1.8K views
Virtualization Techniques & Cloud Compting by Ahmed Mekkawy
Virtualization Techniques & Cloud ComptingVirtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud Compting
Ahmed Mekkawy13.3K views
Zend Products and PHP for IBMi by Shlomo Vanunu
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
Shlomo Vanunu2.2K views
Red Hat for IBM System z IBM Enterprise2014 Las Vegas by Filipe Miranda
Red Hat for IBM System z IBM Enterprise2014 Las Vegas Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Filipe Miranda1.6K views
Docker vs. Kubernetes vs. Serverless by LogicworksNY
Docker vs. Kubernetes vs. ServerlessDocker vs. Kubernetes vs. Serverless
Docker vs. Kubernetes vs. Serverless
LogicworksNY336 views
Class 7: Introduction to web technology entrepreneurship by allanchao
Class 7: Introduction to web technology entrepreneurshipClass 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurship
allanchao481 views
In-Ceph-tion: Deploying a Ceph cluster on DreamCompute by Patrick McGarry
In-Ceph-tion: Deploying a Ceph cluster on DreamComputeIn-Ceph-tion: Deploying a Ceph cluster on DreamCompute
In-Ceph-tion: Deploying a Ceph cluster on DreamCompute
Patrick McGarry1.6K views
App cap2956v2-121001194956-phpapp01 (1) by outstanding59
App cap2956v2-121001194956-phpapp01 (1)App cap2956v2-121001194956-phpapp01 (1)
App cap2956v2-121001194956-phpapp01 (1)
outstanding59268 views
App Cap2956v2 121001194956 Phpapp01 (1) by outstanding59
App Cap2956v2 121001194956 Phpapp01 (1)App Cap2956v2 121001194956 Phpapp01 (1)
App Cap2956v2 121001194956 Phpapp01 (1)
outstanding59318 views
Hadoop 101 by EMC
Hadoop 101Hadoop 101
Hadoop 101
EMC8.6K views
Deep-Dive on Container Networking Architectures - Frans van Rooyen - Dell EMC... by {code} by Dell EMC
Deep-Dive on Container Networking Architectures - Frans van Rooyen - Dell EMC...Deep-Dive on Container Networking Architectures - Frans van Rooyen - Dell EMC...
Deep-Dive on Container Networking Architectures - Frans van Rooyen - Dell EMC...
{code} by Dell EMC1.3K views
High performance PHP: Scaling and getting the most out of your infrastructure by mkherlakian
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
mkherlakian3.7K views

More from The Linux Foundation

ELC2019: Static Partitioning Made Simple by
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleThe Linux Foundation
4.1K views33 slides
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ... by
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...The Linux Foundation
1K views17 slides
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu... by
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...The Linux Foundation
1K views19 slides
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op... by
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...The Linux Foundation
819 views24 slides
XPDDS19 Keynote: Unikraft Weather Report by
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather ReportThe Linux Foundation
923 views58 slides
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E... by
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...The Linux Foundation
941 views17 slides

More from The Linux Foundation(20)

XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ... by The Linux Foundation
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu... by The Linux Foundation
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op... by The Linux Foundation
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E... by The Linux Foundation
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx by The Linux Foundation
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys... by The Linux Foundation
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender by The Linux Foundation
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng... by The Linux Foundation
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... by The Linux Foundation
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix by The Linux Foundation
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd by The Linux Foundation
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant... by The Linux Foundation
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D by The Linux Foundation
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems by The Linux Foundation
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven... by The Linux Foundation
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib... by The Linux Foundation
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr... by The Linux Foundation
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE by The Linux Foundation
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE

Recently uploaded

Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesShapeBlue
252 views15 slides
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...ShapeBlue
106 views12 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
138 views15 slides
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
203 views54 slides
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TShapeBlue
152 views34 slides
CryptoBotsAI by
CryptoBotsAICryptoBotsAI
CryptoBotsAIchandureddyvadala199
40 views5 slides

Recently uploaded(20)

Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue252 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue106 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue138 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue203 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue152 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue159 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue238 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue180 views
Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10123 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10139 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li85 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue119 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue297 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty64 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue135 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue126 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue221 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue180 views

The HaLVM: A Simple Platform for Simple Platforms

  • 1. The HaLVM A Simple Platform for Simple Platforms Adam Wick | XenSummit | August 27th, 2012
  • 2. The What? A port of the that runs Haskell directly atop programming the Xen language hypervisor HaLVM Haskell Virtual Machine Lightweight designed to run in minimal environments © 2012 Galois, Inc. All rights reserved.
  • 3. Wait, what? top httpd haskell program nethack haskell program Linux HaLVM Xen © 2012 Galois, Inc. All rights reserved.
  • 4. Why would you do such a thing? Strangely enough, we did this because we were doing design work in microkernel-based operating systems. Typical component communication graphs for microkernel-based OSes look something like this. It is very easy to create designs that look good on a white board, but include issues that make the system impossible to boot. We designed the HaLVM as a quick way to show feasibility. © 2012 Galois, Inc. All rights reserved.
  • 5. Simple Testing Apparatus Xen main = do block <- openBlockDeviceChannel dev <- openOutputChannel crypto <- openCryptoDeviceChannel print “Encrypted Disk Booted!” © 2012 Galois, Inc. All rights reserved.
  • 6. Interlude You may be wondering why I’m talking about a tool for doing explorations of component breakdowns for microkernel- based operating systems during a workshop about developing cloud-based services based on Xen. OS Dev. Net Serv. Cloud Tool Tool Tool? © 2012 Galois, Inc. All rights reserved.
  • 7. How does this happen? main = do Nifty, but only block <- openBlockDeviceChannel dev <- openOutputChannel checks that boot crypto <- openCryptoDeviceChannel works in our print “Encrypted Disk Booted!” imagined world. Fails if we forgot any prerequisites in our design, and low- level details of drivers and OS components are really easy to forget. main = do So we let each block <- openBlockDeviceChannel component get dev <- openOutputChannel more and more crypto <- openCryptoDevice startServiceLoop reqchan crypto block detailed … © 2012 Galois, Inc. All rights reserved.
  • 8. Focus on Small (and Fast) We are not kidding on the size of the graphs we wanted to test with. One of our early projects involved 15+ domains. Space usage and load speed quickly became critical constraints. 15 domains * 10 second boot time = 2½ minutes to start 15 domains * 64MB footprint = 960MB basic req. Focus on quick and fast: → The HaLVM boots in milliseconds → The HaLVM uses as little as 4MB We are typically limited by Xen, not by design. © 2012 Galois, Inc. All rights reserved.
  • 9. Abstraction Makes The Heart Grow Fonder We designed the HaLVM to easily support this expansion by starting with the smallest core implementation possible and then providing the facilities for more complex behavior to be implemented as (layered) libraries. Program Code Rendezvous Library Disk Driver NIC Driver TCP/IP XenBus Library Communications Library PCI Library HaLVM Core Library GC, Threading Layer, Etc. Low-level Xen Integration © 2012 Galois, Inc. All rights reserved.
  • 10. Abstraction Makes The Heart Grow Fonder The nice thing about this methodology is that programs use only the libraries they need, and thus only pay the space and initialization cost of the libraries they need. Program Code Rendezvous Library Disk Driver NIC Driver TCP/IP XenBus Library Communications Library PCI Library HaLVM Core Library GC, Threading Layer, Etc. Low-level Xen Integration © 2012 Galois, Inc. All rights reserved.
  • 11. Abstraction Makes The Heart Grow Fonder The nice thing about this methodology is that programs use only the libraries they need, and thus only pay the space and initialization cost of the libraries they need. Program Code Rendezvous Library Disk Driver NIC Driver TCP/IP XenBus Library Communications Library PCI Library HaLVM Core Library GC, Threading Layer, Etc. Low-level Xen Integration © 2012 Galois, Inc. All rights reserved.
  • 12. Abstraction Makes The Heart Grow Fonder The nice thing about this methodology is that programs use only the libraries they need, and thus only pay the space and initialization cost of the libraries they need. Program Code Rendezvous Library Disk Driver NIC Driver TCP/IP XenBus Library Communications Library PCI Library HaLVM Core Library GC, Threading Layer, Etc. Low-level Xen Integration © 2012 Galois, Inc. All rights reserved.
  • 13. Wait, What Did We Just Do? At some point it occurred to us that we had developed something that was actually useful on its own, rather than a tool for OS design work. If you can speak Ethernet to a network and write blocks to a disk, then some interesting possibilities emerge for small software network devices: HaLVM random number generators, HaLVM traffic monitors, HaLVM alert systems, HaLVM chat servers, HaLVM time servers, HaLVM encryption servers, HaLVM storage servers … © 2012 Galois, Inc. All rights reserved.
  • 14. If only we had … If you can speak Ethernet to a network and write blocks to a disk, then some interesting possibilities emerge for small software network devices … but blocks on a disk quickly becomes a burdensome interface; you really want a file system and Ethernet is a bit low level for most network programs; you really want a whole TCP/IP stack © 2012 Galois, Inc. All rights reserved.
  • 15. We Really Like Haskell but blocks on a disk quickly becomes a burdensome interface; you really want a file system Halfs: The Haskell File System and Ethernet is a bit low level for most network programs; you really want a whole TCP/IP stack HaNS: The Haskell Network Stack © 2012 Galois, Inc. All rights reserved.
  • 16. Wait, what have we built?! Now armed with a file system and a network stack, we had an interesting little platform for writing lightweight, single- purpose cloud services. … which works on Xen … which explains why I’m talking to you right now OS Dev. Net Serv. Cloud Tool Tool Tool! © 2012 Galois, Inc. All rights reserved.
  • 17. … mostly Cloud This picture made a great little slide addition. Tool! Cloud But this picture is probably a bit more honest. Tool? The HaLVM is a work in progress. There are some rough edges – particularly around network stack and file system integration – but the basis is there. It will get better with time, particularly if interested parties contribute. © 2012 Galois, Inc. All rights reserved.
  • 18. So, A Cloud Service Framework Remember this picture? top httpd This picture also highlights when and why you would haskell choose to use a HaLVM, rather program than a more traditional, Linux- nethack based approach. haskell big small program Linux HaLVM Xen © 2012 Galois, Inc. All rights reserved.
  • 19. Why and Why Not The HaLVM offers a very lightweight platform for writing simple cloud services, at the cost of more limited functionality and less access to the very highest-speed utilities. top httpd Does your service need a high-speed database server hooked up to fast business logic with a low-latency web haskell program server? nethack haskell Does it need it right now? program Linux HaLVM © 2012 Galois, Inc. All rights reserved.
  • 20. Why and Why Not Good for small, single-purpose haskell cloud services with limited program dependencies. HaLVM Saves money on cloud service costs via lowered memory and disk footprint. top httpd Good for more complicated systems with many system haskell program dependencies. nethack Larger selection of tools and frameworks for developing Linux your application. © 2012 Galois, Inc. All rights reserved.
  • 21. That’s it … So that is the HaLVM. A nifty platform for developing simple cloud services. A nifty platform for creating critical, isolated services. Oh, and it’s free, and available on GitHub: Base HaLVM https://github.com/GaloisInc/HaLVM Network Stack https://github.com/GaloisInc/HaNS File System https://github.com/GaloisInc/Halfs © 2012 Galois, Inc. All rights reserved.
  • 22. … I’m done. Questions, comments, or suggestions: now or at awick@galois.com Also see the HaLVM mailing list at http://community.galois.com/mailman/listinfo/halvm-devel Base HaLVM https://github.com/GaloisInc/HaLVM Network Stack https://github.com/GaloisInc/HaNS File System https://github.com/GaloisInc/Halfs © 2012 Galois, Inc. All rights reserved.