xk Operating System

xk is a primitive operating system running on a simulated virtual machine (qemu). It can handle some system calls, run multiple processes, contains a full-featured virtual memory system, and supports transactional updates to the file system.

Specifically, it is able to

  1. handle traps, interrupts and sys-calls(i.e. open(), read(), write(), dup(), close()).
  2. handle concurrent requests through multiprocessing using fork(), wait(), exit(). Inter-process communication(IPC) is achieved through pipe. Simple program can be loaded and execute by invoking exec()
  3. dynamically allocate space on the heap through sbrk(). User stack grows on demand by handling page fault trap. To increase the efficiency when fork, Copy-on-write fork is also well supported.
  4. contain a “robust” file system that is able to create files, delete files, extend files, and write data to files, all concurrently. The file system is also crash-safe, handling file system recovery through transactions and journaling.