Code Monkey home page Code Monkey logo

ebbrt's Introduction

The Elastic Building Block Runtime (EbbRT)

This is a research project out of the Boston University Computer Science Department

Computers used to be large, expensive and centrally owned. Operating systems were designed to multiplex hardware across multiple applications and users. Presently, Cloud Computing allows users to rent entire virtual machines to run their own OS and applications. In this context, the hypervisor multiplexes hardware across multiple applications and users. We can build more efficient software by constructing custom, application-specific operating systems rather than deploying general purpose operating systems within virtual machines.

image

Design

EbbRT is designed first and foremost for performance and maintainability. A high performance system that cannot be maintained will soon fall behind. This is one of the primary pitfalls of customized systems. EbbRT adopts several techniques in order to achieve this:

  • EbbRT is comprised of a set of components that developers can extend, replace or discard in order to construct and deploy a particular application. This enables a much greater degree of customization than existing general purpose systems while promoting the reuse of non-performance-critical components

  • EbbRT components run in a light-weight event-driven environment. This reduces the runtime complexity yet provides enough flexibility for a wide range of applications.

  • EbbRT library operating systems can run within virtual machines on unmodified hypervisors. This allows us to deploy EbbRT applications on commodity clouds.

  • EbbRT library operating systems run alongside general purpose operating systems. This allows functionality to be offloaded for compatibility, reducing the maintenance burden by avoiding the construction of new software.

  • EbbRT uses many modern and high-level programming techniques not typically found in operating systems software. This was chosen deliberately to reduce the complexity of the software.

Detail

EbbRT is comprised of a set of an x86_64 library OS and toolchain as well as a Linux userspace library. Both runtimes are written predominately in C++11. The native library OS is deployed along with a modified GNU toolchain (gcc, binutils, libstdc++) and newlib (libc) that provide an x86_64-ebbrt target. Application code targeting the native library OS is compiled with this toolchain and the resulting binary is a bootable ELF linked with the library OS. We provide C and C++ standard library implementations which make it straightforward to use many third party software libraries.

Further Reading

EbbRT: A Framework for Building Per-Application Library Operating Systems. 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16). (PDF)

Contact

Please email us at [email protected]

ebbrt's People

Contributors

awadyn avatar dschatzberg avatar handong32 avatar jappavoo avatar jimcadden avatar kylehogan avatar salibrandi avatar wjdanalharthi avatar yeungsl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ebbrt's Issues

Need travis

Would be nice to have suite of test cases for ebbrt to pass before merging pull requests.

Make callbacks asynchronous (or use Futures)

In several places we synchronously invoke callbacks which is not right. These should all be turned to either be asynchronous (through the new EventManager interface), or should use futures (which use the new EventManager interface under the cover)

Futures do not flatten

Currently async() does not flatten a Future<Future > to a Future. I believe it should flatten and we should provide a function for users to do so.

alloc + bind ebbid object

Two calls required to define a new ebb: alloc ID, bind to factory. Add a placeholder C++ object to encapsulate this process

Permit user to select backend image at runtime

The location of the backend .elf images relative to the frontend binary have been hard coded in the app's source and we've relied on the app's build system to put the binaries in the correct locations. Preferably, we provide a method for selecting the binary at runtime. For example, a call to node-allocator->LoadBinary(std::string path); accepts a pathname, but can also prompt the user to enter the path at the time of invocation if the argument is empty.

Backend 'quiet' print output

We need a simple way to quiet all debug print output when building back-end Release. I'm thinking a pre-processor define target within the app. We'll also need a way for the programmer to specify debug-only and required prints. For example: #define __EBBRT_DEBUG_PRINT_ON__ 1

System design review

Let's reserve a room for a couple of hours to review and discuss portions of the core EbbRT code up on the projector. This can be useful in getting (re)acquainted with the underlying components of EbbRT and the design decisions / implications which accompany them.

Instead of having a single-presenter or a targeted region of code, I suggest this be held as a free-form discussion. For example, we begin with a high-level interface (e.g., gp_allocator->Alloc(size)) and follow whichever code+question path we decide is most interesting.

How do we run a simple node application with EbbRT

Hi All,

I read the paper on EbbRT and wanted to give it a try. Specifically, I would like to run a node application on it. How do I go about doing it? I looked in code/docs but did not any clue.
Any pointers would be appreciated.

NodeAllocator bug in new defaults logic

I am working on a fix... using this to learn about how to push a fix

BUG: Release hosted build can expose a initialization bug in the NodeAllocator that will result in defaults not being properly initialized when the first node allocation is done such that a node allocate with no parameters will lead to qemu being invoked with bad arguments:

+ exec qemu-system-x86_64 -m 0G -smp cpus=0 -cpu host -serial stdio -display none -enable-kvm -netdev tap,script=no,downscript=no,ifname=tap0,id=net0,vhost=on,queues=0 -device virtio-net-pci,netdev=net0,mac=02:42:ac:14:00:02,mq=on,vectors=2 --gdb tcp:0.0.0.0:1234 -kernel /root/img.elf -append 'host_addr=2886991873;host_port=37807;allocid=0'

Fix is to remove the class wide initialization from the rep creation path and move it to a ClassInit

Modify newlib so that we provide our own assert

Currently we call LRT_ASSERT on baremetal, but we can change the assert provided by newlib to call our own noreturn function to handle a failed assert. This way our asserts are the same on linux and baremetal

EbbRef naming

Ebb is not actually an Ebb.. its an Ebb reference.

Rename to EbbRef

why c++

I haven't finish reading all the code yet, and C++ is a great language, but still wonder if it can be done only with C or other programming language?

Sorry if it's a dumb question.

Add libstdc++ threading "support"

Current libstdc++ does not build with threading support. If we add a few more functions to the gthread library then we can enable it by defining __GTHREADS_CXX0X to 1

Apic IDs are not zero to n-1

Currently we assume that event::Locations which run from zero to n-1 are the same as Apic IDs which is an incorrect assumption on real hardware (this works on VMs). The ACPI tables should be parsed to create this mapping so that SMP startup works.

Building helloworld.elf

Hey! I was trying to build an EbbRT dependent application, so I followed the instructions given in https://github.com/SESA/EbbRT/wiki/Build-Tutorial-Notes. While building the helloworld application, I got this error:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
System is unknown to cmake, create:
Platform/EbbRT to use this system, please send your config file to [email protected] so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please send that file to [email protected].
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_C_COMPILER:

/home/user/ebbrt-sysroot/ebbrt/usr/bin/x86_64-pc-ebbrt-gcc

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:2 (project):
The CMAKE_CXX_COMPILER:

/home/user/ebbrt-sysroot/ebbrt/usr/bin/x86_64-pc-ebbrt-g++

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!

If I understood it correctly this means that cmake is trying to find a cross compiler binary "x86_64-pc-ebbrt-gxx" as specified by ebbrt.cmake. However, during the build, no such file was created.
Any pointers on how to solve this would be highly appreciated.

EbbRT front-end as shared object libraries

EbbRT's "front-end" runtime, or perhaps EbbRT-on-Linux, should be exist as a set of shared object libraries and headers installed onto the host operating system. This way an application can link in the EbbRT libraries and interact through interfaces defined in the EbbRT headers. In general, we should strive to follow the "Linux way" of shared library organization, naming, placement, versioning and compatibility.

I image EbbRT built as a collection of object libraries, wherein each library encapsulates one-or-more Ebbs which in turn depend a lower-level runtime library. Application-specific objects can be built as static libraries and decoupled from the host installation.

When we implement this approach it will bring to the forefront interesting issues about how EbbRT libraries should be written and how code can be shared between hosted and native implementations.

Thoughts?

This enhancement would address issue #94

No assert for insufficient system memory

When running multi-core w/ qemu, we must extend the default system memory (using qemu's -m flag) or face unexpected crush. Alternatively, the system should assert when the loaded memory is insufficient.

(NodeAllocator): named docker networks and containers

Name the docker networks/containers created by the NodeAllocator (e.g., ebbrt_net_XXXX).
Doing so will more easily allows scripting of the EbbRT-created docker state. For example, a script which can force remove all EbbRT networks & nodes.

Improve DistributedRoot and EbbManager data structures

We use std::map liberally in both the DistributedRoot and EbbManager. These data structures are used on multiple cores and so must be thread safe. The std::map structure is not inherently thread safe and so we currently lock around accesses. Right now we use a spinlock. A relatively easy improvement would be a reader/writer lock instead of spinlock.

Longer term we should think about building good data structures for this:

http://www.youtube.com/watch?v=HJ-719EGIts
http://code.google.com/p/nbds/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.