xv6 is a learning OS Kernel. It completely decribes the basic working of a UNIX based system.
This is a reference guide for understanding and adding system calls in the kernel.
Here is a complete guide to install Ubuntu.
To start off first we must have git on our laptops to clone the official repo of xv6 by MIT.
Git install command:
sudo apt-get install git
Commands to install QEMU (an emulator) and cloning the xv6 repo:
sudo apt-get install qemu
sudo apt-get install libc6-dev:i386
git clone https://github.com/mit-pdos/xv6-public.git xv6
chmod 700 -R xv6
Test whether xv6 is installed by running the following:
cd xv6
make
make qemu
Congragulations, you've successfully installed xv6 on your computer!
Now, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on.
A system call is a way for programs to interact with the operating system.
Video references to begin with:
- For ps (a system call for listing process ID's)
- For cp (a system call for copying files)
- For adding and changing priority of processes.
- For changing the default RR scheduer to a simple Priority scheduler
- For adding clear (a system call to clear the terminal)
- For adding shutdown (a system call to shutdown xv6)
I have uploaded a zip file of my project after adding these system calls.
To run my project, download the zip file, extract and run the make commands given above.
Enjoy!
Few helpful resources used:
Foo Soo: https://www.youtube.com/watch?v=DZ0-GMtOtEc
Tong Yu: https://www.youtube.com/watch?v=21SVYiKhcwM