Git Product home page Git Product logo

node-replicated-kernel's Introduction

Node Replicated Kernel

The Node Replicated Kernel is an (experimental) research OS kernel for x86-64 (amd64) machines written in rust. You can read more about it here.

Installation

Check-out the source tree

  1. git clone <repo-url> nrk
  2. cd nrk
  3. Note: In case you don't have the SSH key of your machine registered with a github account, you need to convert the submodule URLs to the https protocol, to do so run: sed -i'' -e 's/[email protected]:/https:\/\/github.com\//' .gitmodules
  4. git submodule update --init

Install dependencies

Run bash setup.sh, this will install required dependencies on Linux to build and run nrk.

Build and run

  1. cd kernel
  2. python3 ./run.py

If you just want to compile the code you can also execute run.py with the --norun flag.

Development

Testing

To run the unit tests of the kernel:

  1. cd kernel
  2. RUST_BACKTRACE=1 RUST_TEST_THREADS=1 cargo test --bin nrk

To run the integration tests of the kernel:

  1. cd kernel
  2. RUST_TEST_THREADS=1 cargo test --features smoke --test integration-test

If you would like to run a specific integration test you can pass it with --:

  1. RUST_TEST_THREADS=1 cargo test --test integration-test -- --nocapture userspace_smoke

Note: Parallel testing is not possible at the moment due to reliance on build flags for testing.

Submitting a change

Update latest master:

  1. git checkout master
  2. git pull
  3. git submodule update --init

Create a new feature branch:

  1. git checkout -b <BRANCH-NAME>
  2. Make changes in code.

Make sure that the code compiles without warnings, is properly formatted and passes tests:

  1. cd kernel
  2. bash commitable.sh

Commit changes and push

  1. git add <CHANGED-FILES>
  2. git commit
  3. git push -u origin <BRANCH-NAME>
  4. Create a Pull Request on GitHub.

node-replicated-kernel's People

Contributors

achreto avatar amytai avatar ankitbhrdwj avatar bors[bot] avatar catleeball avatar chinkulkarni avatar dependabot[bot] avatar garfield96 avatar gz avatar hunhoffe avatar novakovic avatar shpark avatar zmckevitt 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  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

node-replicated-kernel's Issues

Unbounded TLB WorkQueue

Describe the bug

The TLB WorkQueue is currently not bounded in size. It holds both shootdown requests (which are important to handle) and advance replica work requests (which are less important to handle).

Currently, if the queue is full and enqueue is called the error is ignored:

let _ignore = IPI_WORKQUEUE[gtid as usize].push(s);

If this is uncommented, it becomes clear that some requests may be dropped if the queue is full.

Reproduction steps

  1. Change the line to check for failure to enqueue (use expect to unwrap the result)
  2. Run the fxmark benchmark with 96-ish cores
  3. Most of the time, it will cause an error.

Expected behavior

We would like a scenario where the queue has a theoretical bound, so that we can ensure it is always possible to enqueue. This is an important property because, overall, we just want to make sure shootdowns are not lost.

Additional context

No response

Safe form of release_core system call

Is your feature request related to a problem? Please describe.

Right now, the release_core() system call does not remove/clear an executor from that core (if there is one) so it is up to the process to make sure the core isn't executing anything before making the system call.

Describe the solution you'd like

We probably need to use an interrupt mechanism to clear the core to be released.

Describe alternatives you've considered

You could also make the system call fail (before submitting it to the log, for consistency) if there is an executor running on that core. I'm not sure what mechanism would be best for discerning if there is something running on that core.

Additional context

This feature wasn't added to the initial PR for introducing the release_core() system call due to time constraints; either potential solution shouldn't be too hard to implement.

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.