xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix Version 6. Advanced-xv6 is a repository that contains some modernizations to improve upon the base implementation. There are seven versions of xv6 detailed below:
-
Round-Robin (RR) scheduler in xv6
-
First-Come-First-Serve (FCFS) scheduler in xv6
-
Priority scheduler in xv6
-
Completely-Fair-Scheduler (CFS) in xv6
-
Doubly-Indirect-Block filesystem in xv6
-
Triply-Indirect-Block filesystem in xv6
-
Berkley Fast Filesystem (FFS) in xv6
- An x86 Linux ELF machine
- Tested on Ubuntu 16.04 with QEMU
- Clone the directory:
git clone
- Navigate to the source directory:
cd Advanced-xv6/<version>
- Compile the operating system:
make
- Run:
make qemu
The base xv6 implementation provides a great foundation for a simple Operating System. However, there are two areas of improvement that would make it a tad more modern...
The Linux Completely Fair Scheduler (CFS) is based around the idea that every process should be given even amounts of CPU power. For example, if there are four processes each should get a quarter of the total available CPU time.
This repository contains a partially implemented CFS as it lacks the implementation for NICE priority values with a Red-Black Tree.
You can read more about the Linux CFS here.
The Berkley Fast Filesystem (FFS) uses the notion of cylinder/block groups which places multiple similar files together in order to ensure short disk seek time on disk. This implementation followed three heuristics for locality maintenance:
-
Placing new directories in one of the least-used block groups.
-
Placing files in the same directory in the same block group whenever possible.
-
Chunking and spreading large files across multiple block groups.
More details can be found in the 7 - Filesystem - Fast File System/README.md
and here.
All source code in this repository is released under the MIT license. See LICENSE for details.