Skip to content

A collection of extensions to xv6, the ANSI C reimplementation of Dennis Ritchie's and Ken Thompson's Unix Version 6.

Notifications You must be signed in to change notification settings

clarkzinzow/xv6-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

xv6-extensions

A collection of extensions to xv6, the ANSI C reimplementation of Dennis Ritchie's and Ken Thompson's Unix Version 6. These extensions include:

  • A CPU scheduler supporting two pricing schemes similar to those used by AWS and other cloud services: reserved processes and spot processes. The former is implemented with a lottery scheduler.
  • A few modern virtual memory features, including:
    • Null-pointer dereference handling.
    • A stack rearrangement, with the stack placed at the high end of the address space.
  • Kernel threads.
  • Protection from data corruption via the addition of file checksums.

Getting Started

To run xv6, I suggest that you install the QEMU PC emulator. You can get a version of QEMU with patched debugging facilities from the IAP 6.828 crew at MIT. To build your own patched version of QEMU, do the following:

  1. Clone the IAP 6.828 QEMU git repository
$ git clone http://web.mit.edu/ccutler/www/qemu.git -b 6.828-2.3.0
  1. On Linux, you may need to install several libraries. We have successfully built 6.828 QEMU on Debian/Ubuntu 16.04 after installing the following packages: libsdl1.2-dev, libtool-bin, libglib2.0-dev, libz-dev, and libpixman-1-dev.

  2. Configure the source code (optional arguments are shown in square brackets; replace PFX with a path of your choice)

    • Linux:
    $ ./configure --disable-kvm [--prefix=PFX] [--target-list="i386-softmmu x86_64-softmmu"]
    
    • OS X:
    $ ./configure --disable-kvm --disable-sdl [--prefix=PFX] [--target-list="i386-softmmu x86_64-softmmu"]
    

    The prefix argument specifies where to install QEMU; without it QEMU will install to /usr/local by default. The target-list argument simply slims down the architectures QEMU will build support for.

  3. Run make && make install

To simulate one of the xv6 extensions in this repository, do the following:

  1. Clone or download this repository.
  2. Navigate to the src directory of the repository.
$ cd /path/to/repository/xv6-extensions/src
  1. Choose which extension you want to emulate. E.g., if you want to simulate the kernel thread extension of xv6, we would proceed as follows:
$ cd xv6-kernel
  1. Run the QEMU emulator.
$ make qemu
  1. Test it out!

About

A collection of extensions to xv6, the ANSI C reimplementation of Dennis Ritchie's and Ken Thompson's Unix Version 6.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published