KOS (pronouce "Chaos")

UPDATE: KOS is now hosted at https://git.uwaterloo.ca/mkarsten/KOS.

KOS download (Apr 4, 2015) - read files README and COPYING first.

The goal of this project is to implement a simple and modular operating system kernel on x86-64 hardware. At this time, the system is comprised of a small runtime kernel that serves as a platform for current and future research. The long-term plan is to carry out a systematic study of communication and synchronization mechanisms across a spectrum of platforms ranging from multi-core to networked systems.

The existing software runs on a bare-metal AMD/Intel 64-bit platform, uses all CPU cores in 64-bit mode and virtual memory through 64-bit paging. It provides simple memory management, scheduling, threads, address spaces, processes, system calls, etc. The system implements APIC programming, interrupt handling, and PCI enumeration. A few device drivers are included. It also comes with basic logging and debugging support. The software has been tested on PC emulators bochs, qemu, and VirtualBox, as well as a few actual machines.

The system does not yet directly address research questions, but it lays the groundwork for future development. In particular, care has been taken to future-proof the code by being compact and simple and avoiding design shortcuts that could negatively impact later development. For example, the entire code base is written in C++, except for small assembler parts. The C++ code makes use of advanced language features, such as efficient strong type safety using templates.

Existing open-source software is reused as much as possible. Data structures (including I/O) are drawn from the C++ standard library, while newlib provides C-library routines for both the kernel and user-level applications. The ACPI Component Architecture is partially integrated and used to identify hardware resources. Where appropriate, third-party software is adapted to increase its utility, but with an emphasis on keeping the modifications small and non-intrusive, so that compatibility with future versions of such software is maintained.


last updated: Apr 4, 2015 - Martin Karsten