SlideShare uma empresa Scribd logo
1 de 22
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.

Mais conteúdo relacionado

Mais procurados

Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
The Linux Foundation
 
Getting Started with XenServer and OpenStack.pptx
Getting Started with XenServer and OpenStack.pptxGetting Started with XenServer and OpenStack.pptx
Getting Started with XenServer and OpenStack.pptx
OpenStack Foundation
 

Mais procurados (20)

Xen time machine
Xen time machineXen time machine
Xen time machine
 
Mirage - Extreme specialization of cloud appliances (OSCON 2013)
Mirage - Extreme specialization of cloud appliances (OSCON 2013)Mirage - Extreme specialization of cloud appliances (OSCON 2013)
Mirage - Extreme specialization of cloud appliances (OSCON 2013)
 
Docker Orchestration at Production Scale
Docker Orchestration at Production Scale Docker Orchestration at Production Scale
Docker Orchestration at Production Scale
 
Scaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud Servers
 
NkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application serverNkSIP: The Erlang SIP application server
NkSIP: The Erlang SIP application server
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	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)
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
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed Applications
 
OWF: Xen - Open Source Hypervisor Designed for Clouds
OWF: Xen - Open Source Hypervisor Designed for CloudsOWF: Xen - Open Source Hypervisor Designed for Clouds
OWF: Xen - Open Source Hypervisor Designed for Clouds
 
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...
Using functional programming within an industrial product group: perspectives...
 
Getting Started with XenServer and OpenStack.pptx
Getting Started with XenServer and OpenStack.pptxGetting Started with XenServer and OpenStack.pptx
Getting Started with XenServer and OpenStack.pptx
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
 
Unikernels: the rise of the library hypervisor in MirageOS
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
 
Xen ATG case study
Xen ATG case studyXen ATG case study
Xen ATG case study
 
Erlang on Xen: Redefining the cloud software stack
Erlang on Xen:  Redefining the cloud software stackErlang on Xen:  Redefining the cloud software stack
Erlang on Xen: Redefining the cloud software stack
 
Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and image
 
HVX: Virtualizing the Cloud
HVX: Virtualizing the CloudHVX: Virtualizing the Cloud
HVX: Virtualizing the Cloud
 
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)
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
 
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...
LCEU13: Securing your cloud with Xen's advanced security features - George Du...
 
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...
Automation and Collaboration Across Multiple Swarms Using Docker Cloud - Marc...
 

Semelhante a The HaLVM: A Simple Platform for Simple Platforms

Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
isnull
 
Virtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud ComptingVirtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud Compting
Ahmed Mekkawy
 
Class 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurshipClass 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurship
allanchao
 
App cap2956v2-121001194956-phpapp01 (1)
App cap2956v2-121001194956-phpapp01 (1)App cap2956v2-121001194956-phpapp01 (1)
App cap2956v2-121001194956-phpapp01 (1)
outstanding59
 
Inside the Hadoop Machine @ VMworld
Inside the Hadoop Machine @ VMworldInside the Hadoop Machine @ VMworld
Inside the Hadoop Machine @ VMworld
Richard McDougall
 

Semelhante a The HaLVM: A Simple Platform for Simple Platforms (20)

Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)
 
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...
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
 
Enhancing scalability with intelligent caching
Enhancing scalability with intelligent cachingEnhancing scalability with intelligent caching
Enhancing scalability with intelligent caching
 
Turbocharging php applications with zend server
Turbocharging php applications with zend serverTurbocharging php applications with zend server
Turbocharging php applications with zend server
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
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
 
Build Your Private Cloud with Ezilla and Haduzilla
Build Your Private Cloud with Ezilla and HaduzillaBuild Your Private Cloud with Ezilla and Haduzilla
Build Your Private Cloud with Ezilla and Haduzilla
 
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
PHP Apps on the Move - Migrating from In-House to Cloud
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
 
Virtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud ComptingVirtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud Compting
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
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
Red Hat for IBM System z IBM Enterprise2014 Las Vegas
 
Docker vs. Kubernetes vs. Serverless
Docker vs. Kubernetes vs. ServerlessDocker vs. Kubernetes vs. Serverless
Docker vs. Kubernetes vs. Serverless
 
Class 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurshipClass 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurship
 
In-Ceph-tion: Deploying a Ceph cluster on DreamCompute
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
 
App cap2956v2-121001194956-phpapp01 (1)
App cap2956v2-121001194956-phpapp01 (1)App cap2956v2-121001194956-phpapp01 (1)
App cap2956v2-121001194956-phpapp01 (1)
 
Inside the Hadoop Machine @ VMworld
Inside the Hadoop Machine @ VMworldInside the Hadoop Machine @ VMworld
Inside the Hadoop Machine @ VMworld
 
App Cap2956v2 121001194956 Phpapp01 (1)
App Cap2956v2 121001194956 Phpapp01 (1)App Cap2956v2 121001194956 Phpapp01 (1)
App Cap2956v2 121001194956 Phpapp01 (1)
 
Hadoop 101
Hadoop 101Hadoop 101
Hadoop 101
 
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...
Deep-Dive on Container Networking Architectures - Frans van Rooyen - Dell EMC...
 
High performance PHP: Scaling and getting the most out of your infrastructure
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
 

Mais de The Linux Foundation

Mais de The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
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: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
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 in Automotive - Artem Mygaiev, Director, Technology Solu...
 
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: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
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: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
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...
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
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...
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...
 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
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
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...
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
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
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...
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...
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...
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
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
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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.