Gyh's Braindump

MirageOS

tags :: Operating-System, Kernel, libOS

source
DEVONthink
source
online pdf

Motivation

The shift to single-purpose appliances

  • A cloud VM today running a full kernel but usually with one primary application
  • Application initialized everytime VM booted

Limitations of current OS

  • The modern Hypervisor provides resource abstraction flexibly changing memory, cores, VMs
    • most OS can not utilize it fully
  • Extra Load-Balancers are used by systems to achieve flexile VM spawning
    • traditional OS are not optimized for quick booting and small size Load-Balancers may keep some idle VMs

MirageOS

libOS: a whole program is a whole operating system

  • An application consisted of serveral independent unikernels, like a Distributed-System
  • Protection Boundaries pushed to lowest hardware layers
    • a set of libraries: interact with drivers, network protocols
    • a set of policies: enforce Access Control and isolation
  • Advantage
    • allow applications directly interact with hardware without moving data between kernel/user spaces
  • Drawbacks / Chanllenge
    • strong isolation between unikernels is tricky
    • device driver needed to be rewritten
    • require much more VMs running
    • properly create a modular abstraction of system and user stack in a single manageable structure

Stronger programming abstraction with high-level languages

  • static type checking eliminate more memory error such as overflows
  • automatic memory management
  • modules
  • metaprogramming unify config file and code at compilation time

Prototype

  • Written in high-level languages
  • Single virtual address space running only the runtime
  • Compiling links all together into a single object file
    • minimum runtime provide booting support and garbage collector
    • configure files
    • source code
    • all dependent libraries tracked explicitly
  • Develop in *nix environments and run in MirageOS