Giter Site home page Giter Site logo

human37 / xv6-lottery-scheduler Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 1.0 17.15 MB

A lottery implementation of a process scheduler within the XV6 operating system.

License: Other

Emacs Lisp 0.04% Makefile 2.02% C 91.99% C++ 2.35% Assembly 3.34% Perl 0.27%
lottery-scheduler qemu risc xv6

xv6-lottery-scheduler's Introduction

XV6 Operating System

xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is implemented for a modern RISC-V multiprocessor using ANSI C. I added a lottery ticket scheduler, in addition to the default "round-robin" schduler found on xv6. This lottery ticket scheduler assigns every process a number of tickets, and then draws a ticket, and the process that owns the winning ticket is the next process to run.

Building and Running XV6

You will need a RISC-V "newlib" tool chain from https://github.com/riscv/riscv-gnu-toolchain, and qemu compiled for riscv64-softmmu. Once they are installed, and in your shell search path, you can run "make qemu".

Testing the New Lottery Scheduler

For the default round-robin scheduler:

$ make qemu 

For lottery scheduler and equal ticket number assignment:

$ make qemu SCHEDPOLICY=RANDOM

For lottery scheduler and random ticket number assignment:

$ make qemu SCHEDPOLICY=RANDOM RANDOMTICKETNUMBER=RANDOMTICKETTRUE

xv6-lottery-scheduler's People

Contributors

4ge32 avatar aclements avatar anishathalye avatar beordle avatar chibby0ne avatar d0iasm avatar gw avatar human37 avatar icenowy avatar jrrk2 avatar kaashoek avatar kehao95 avatar mikecat avatar phf avatar rsc avatar rui314 avatar saarett avatar takahirox avatar tchajed avatar xiw avatar zeldovich avatar

Stargazers

 avatar  avatar

Forkers

kingnuel1

xv6-lottery-scheduler's Issues

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.